This looks like a null object to me, with xsi:null='1':
<return xsi:null='1' xsi:type='bean.Person'></return>

Wouldn't an empty Person object look like
<return xsi:type='bean.Person'><fieldname xsi:type='fieldType'/></return>



                                                                                       
                                          
                      "John Mani"                                                      
                                          
                      <john@sixthdimens        To:       <[EMAIL PROTECTED]>    
                                          
                      ion.com>                 cc:                                     
                                          
                                               Subject:  null handling in apache 
soap2.2                                         
                      05/04/2002 08:26                                                 
                                          
                      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








Reply via email to