JAX-RPC internals

From: Deepth Dinesan- CTD, Chennai. <deepthd_at_CTD.HCLTECH.COM>
Date: Mon, 21 Oct 2002 09:32:26 +0530

Hi ,

Does JAx-RPC supports serialization/deserialization of types that doesnt
adhere to Java Beans.

I have few complex types which are serializable and contains
ObjectStreamFields, readObject() and writeObject() .
Is there some way I can use reuse this to dictate whats being SOAP
serialized and why isnt this feature reused
and a TypeMappingRegistry approach is used instead ?

Dee Di

-----Original Message-----
From: Arun Gupta [mailto:arun.gupta_at_SUN.COM]
Sent: Saturday, October 19, 2002 5:31 AM
Subject: Re: Passing info from SOAP Handlers to Web Service methods

Hi Puny,

In your handleRequest, set the properties as:

context.setProperty("foo", "bar");

For a servlet-based endpoint, you service endpoint implementation has to
implement javax.xml.rpc.server.ServiceLifecycle. Then you can access the
servlet context in the init method as follows:

public void init(Object context) {
   servletEndpointContext = ((ServletEndpointContext)context);
   if (servletEndpointContext == null) {
       System.out.println("In init(): servletEndpointContext is null");

In the service endpoint implementation method, you can access the
properties as:

MessageContext messageContext =
if (messageContext != null) {
    String propVal1 = (String)messageContext.getProperty("foo");

If you want, you can modify this property in your method implementation
and access the modified property in handleResponse of your server-side

Thanks for your interest in JAX-RPC.


"Sen, Puny" wrote:
> Hi,
> Is it possible to pass information like a variable or object from a server
> side SOAP Handler to the Web Service methods?
> Thanks,
> Puny

There is only one me, I must live myself!
There is only one today, I must live itself!