You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by hu...@jpmorgan.com on 2002/04/05 00:17:32 UTC

Re: null handling in apache soap2.2

John,

     I ran into the same problem.  In my case, there was a conflict in the
webcontainer.jar file from IBM.  I don't know what the conflict was, but
moving the Apache SOAP jar file above webcontainer.jar in my runtime
classpath solved the problem.  It sounds like you have a similar conflict.
Try creating a very simple client and server with just the SOAP and Xerces
jar files.  If that test works just keep adding jar files back in until you
find the culprit.

Shawn.



                                                                                                                                             
                                                                                                                                             
                      john@sixthdimens         To:      soap-user@xml.apache.org                                                             
                      ion.com                  cc:                                                                                           
                                               Subject: null handling in apache soap2.2                                                      
                      04/04/2002 05:26                                                                                                       
                      PM                                                                                                                     
                      Please respond                                                                                                         
                      to soap-user                                                                                                           
                                                                                                                                             
                                                                                                                                             



Hi

I'm implementing an apache SOAP client that interacts with a WebLogic 6.1
sp2
based SOAP server application.

The server has a method that's supposed to return a null object.
For example,
    Person getPerson(String id)
and if this 'id' is bogus, this method returns a null object. Note that the
Person
class is a standard JavaBean.

Now, when I actually invoke this method on the weblogic hosted service with
a bogus id, I get the following XML fragment as the SOAP response:

<SOAP-env:
   ......
   <getPersonResponse>
      <return xsi:null='1' xsi:type='bean.Person'></return>
   </getPersonResponse>
<SOAP-env>

I was assuming that the SOAP deserializer would convert this into a 'null'
object.
Instead, within my apache based client, I get a Person object that has null
fields within.

btw, I'm using Apache SOAP 2.2 on the client side, with the standard
BeanSerializer/BeanDeserializer used to marshall/unmarshall the .java
classes

thanx
-john










This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase & Co., its
subsidiaries and affiliates.


Re: null handling in apache soap2.2

Posted by John Mani <jo...@sixthdimension.com>.
Interestingly enough, my client writting using the JAX-RPC RI code from
Sun also exhibits this same behaviour ... i.e., getting an 'empty' Person
object instead of just null

-john

> Hi
>
> I'm implementing an apache SOAP client that interacts with a WebLogic 6.1
> sp2
> based SOAP server application.
>
> The server has a method that's supposed to return a null object.
> For example,
>     Person getPerson(String id)
> and if this 'id' is bogus, this method returns a null object. Note that
the
> Person
> class is a standard JavaBean.
>
> Now, when I actually invoke this method on the weblogic hosted service
with
> a bogus id, I get the following XML fragment as the SOAP response:
>
> <SOAP-env:
>    ......
>    <getPersonResponse>
>       <return xsi:null='1' xsi:type='bean.Person'></return>
>    </getPersonResponse>
> <SOAP-env>
>
> I was assuming that the SOAP deserializer would convert this into a 'null'
> object.
> Instead, within my apache based client, I get a Person object that has
null
> fields within.
>
> btw, I'm using Apache SOAP 2.2 on the client side, with the standard
> BeanSerializer/BeanDeserializer used to marshall/unmarshall the .java
> classes
>
> thanx
> -john
>
>
>
>
>
>
>
>
>
>
> This communication is for informational purposes only.  It is not intended
as
> an offer or solicitation for the purchase or sale of any financial
instrument
> or as an official confirmation of any transaction. All market prices, data
> and other information are not warranted as to completeness or accuracy and
> are subject to change without notice. Any comments or statements made
herein
> do not necessarily reflect those of J.P. Morgan Chase & Co., its
> subsidiaries and affiliates.
>
>


Re: null handling in apache soap2.2

Posted by John Mani <jo...@sixthdimension.com>.
Interestingly enough, my client writting using the JAX-RPC RI code from
Sun also exhibits this same behaviour ... i.e., getting an 'empty' Person
object instead of just null

-john

> Hi
>
> I'm implementing an apache SOAP client that interacts with a WebLogic 6.1
> sp2
> based SOAP server application.
>
> The server has a method that's supposed to return a null object.
> For example,
>     Person getPerson(String id)
> and if this 'id' is bogus, this method returns a null object. Note that
the
> Person
> class is a standard JavaBean.
>
> Now, when I actually invoke this method on the weblogic hosted service
with
> a bogus id, I get the following XML fragment as the SOAP response:
>
> <SOAP-env:
>    ......
>    <getPersonResponse>
>       <return xsi:null='1' xsi:type='bean.Person'></return>
>    </getPersonResponse>
> <SOAP-env>
>
> I was assuming that the SOAP deserializer would convert this into a 'null'
> object.
> Instead, within my apache based client, I get a Person object that has
null
> fields within.
>
> btw, I'm using Apache SOAP 2.2 on the client side, with the standard
> BeanSerializer/BeanDeserializer used to marshall/unmarshall the .java
> classes
>
> thanx
> -john
>
>
>
>
>
>
>
>
>
>
> This communication is for informational purposes only.  It is not intended
as
> an offer or solicitation for the purchase or sale of any financial
instrument
> or as an official confirmation of any transaction. All market prices, data
> and other information are not warranted as to completeness or accuracy and
> are subject to change without notice. Any comments or statements made
herein
> do not necessarily reflect those of J.P. Morgan Chase & Co., its
> subsidiaries and affiliates.
>
>