Hi,
 
Suppose we have a Java Bean like this:
 
package ro.csean.andrei;
public class TestClass
{
  private String[] test_strings;
  private String simple_string;
  public TestClass()
  {
  }
  public String[] getTest_strings()
  {
    return test_strings;
  }
  public void setTest_strings(String[] newTest_strings)
  {
    test_strings = newTest_strings;
  }
  public String getSimple_string()
  {
    return simple_string;
  }
  public void setSimple_string(String newSimple_string)
  {
    simple_string = newSimple_string;
  }
}
 
the SOAP message is:
 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SE="http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <ns0:echo_TestClass xmlns:ns0="http://localhost:8090/">
   <test_TestClass xsi:type="ns0:TestClass">
    <simple_string xsi:type="xsd:string">string simplu</simple_string>
    <test_strings SE:arrayType="xsd:string[5]">
     <item xsi:type="xsd:string">stringul 0</item>
     <item xsi:type="xsd:string">stringul 1</item>
     <item xsi:type="xsd:string">stringul 2</item>
     <item xsi:type="xsd:string">stringul 3</item>
     <item xsi:type="xsd:string">stringul 4</item>
    </test_strings>
   </test_TestClass>
  </ns0:echo_TestClass>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
Extract from BeanDeserializer::getDeserializer
 
            LogFunction("If there is not href, then get the deserializer");
            LogFunction("using the javaType and default XMLType,");
            LogFunction("If there is an href, the create the generic");
            LogFunction("DeserializerImpl and set its default type (the");
            LogFunction("default type is used if the href'd element does");
            LogFunction("not have an xsi:type.");
            LogFunction("if (href == null) -- href: "+href);
            if (href == null) {
                dSer = context.getDeserializer(javaType, defaultXMLType);
                LogFunction("dSer = context.getDeserializer(javaType, defaultXMLType);");
                LogFunction("dSer: "+dSer+" context: "+context+" javaType: "+javaType+" defaultXMLType: "+defaultXMLType);
            }
 
The uotput file generated by LogFunction (function written by me) is this:
 
If the xmlType is not set, get a default xmlType
TypeMapping tm = context.getTypeMapping(); tm: [EMAIL PROTECTED]
defaultXMLType = tm.getTypeQName(javaType); defaultXMLType: {http://schemas.xmlsoap.org/soap/encoding/}Array
If there is not href, then get the deserializer
using the javaType and default XMLType,
If there is an href, the create the generic
DeserializerImpl and set its default type (the
default type is used if the href'd element does
not have an xsi:type.
if (href == null) -- href: null
dSer = context.getDeserializer(javaType, defaultXMLType);
dSer: null context: [EMAIL PROTECTED] javaType: class [Ljava.lang.String; defaultXMLType: {http://schemas.xmlsoap.org/soap/encoding/}Array
 
 
So after calling getDeserializer from context with correct parameters the result is NULL. Why is that?
____________________________________________________
  IncrediMail - Email has finally evolved - Click Here

Reply via email to