users@jax-rpc.java.net

Re: deserialization error for value type

From: Alex Duncan <alex.duncan_at_ADI-LIMITED.COM>
Date: Thu, 18 Sep 2003 10:59:03 +1000

Hi Amlan,

>hi Alex,
>
>what kind of client are you using ?
>
>AMlan

We may have got ourselves into a race condition ;-) because I may have
provided the answer to this in my follow-up post without first seeing your
reply. Anyway, I'm using a dynamic proxy (not DII) where I do a getPort on
the Service object where I specify the name of the port. I create the
service by providing the URL to my WSDL (I get back the WSDL from my URL
when I enter it into my browser). For the client (an application client,
actually a JUnit TestCase at the moment) I am using libraries supplied with
the JWSDP 1.2 (same as for my web service). In fact, I'm using the same
development environment and version of the JDK, and the client and web
service both reside on localhost. The version of Tomcat is that supplied
with the JWSDP. I should mention that putting my client code into a
servlet (which I'd like to do eventually as well) didn't work either.

I am also using rpc encoding.

Obtaining the proxy occurs without complaint. Now, (see my follow-up post)
I can set primitive type members of application class A in my web service
and marshal them back to my client, but playing with the innards of one of
A's instance fields "b" (an instance of class B) appears to work within my
web service but does not get marshalled back to my client. What I am
considering now refers to the following revised implementation of getA():

     public A getA() { a.b.s = "blah"; return a; }

When my client looks at the value of a.b.s, I get the initial value of
"hello", not "blah" as I would expect.

The problem I have now is very frustrating because I don't have an
exception as a starting point. If I construct "b" and initialise its
fields outside the constructor of B (using only a instance initialiser
where "b" is declared) then those do get marshalled and a.b.s simply
returns the initial value, not the value set from inside my web service
endpoint method implementation. As far as my remote debugging session
(attached to catalina) is concerned, everything is OK all to the opint of
returning from getA().

Do I need to do something fancy with TypeMapping objects somewhere in my
client code?

Amlan, can you shed any light on the timeframe for taking JAX-RPC in JWSDP
1.2 out of Early Access (maybe JWSDP 1.3)? I thought I came across a post
that asked this question a while ago, but I'm not sure if there was an
answer or whether I couldn't find the answer embedded in another post?
Could it coincide with release of source code that was mentioned on the
list recently?


Alex




DISCLAIMER:-----------------------------------------------------------------------------------------------
This Email may contain confidential and/or privileged information and is intended
solely for the addressee(s) named. If you have received this information in error, or
are advised that you have been posted this Email by accident, please notify the
sender by return Email, do not redistribute it, delete the Email and keep no copies.
----------------------------------------------------------------------------------------------------------------------