I have a problem where I am expecting a Document to unmarshall with a null
ArrayList but I am getting an ArrayList with one Element in instead. Any
help would be greatly appreciated.

The Document that is being unmarshalled has the CategoryList coming in as
nil="true" but the resulting java
FindApplicationExceptionCategoryCallParameter structure ends up with an
ArrayList with one XmlValidationCategoryElement with null values in. - I
would expect a null ArrayList.

I have tried moving the nillable="true" onto the structure within the
collection but I can't do that as the binding compiler complains about it
(Error: No object for structure; nillable attribute forbidden; on
structure element at (line 35, col 81, in
FindApplicationExceptionCategoryParameter.xml))


<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<SOAP-ENV:Body>
<ns0:FindApplicationExceptionCategoryCallParameter
xmlns:ns0="http://ws.pancredit.com/wsdl";>
<ns0:SecurityToken>ypmjj1SkHSgZVvYuaC4SpF94IvsK9SlI0Ml8IZPGB8w4jj3hmq</ns0:SecurityToken>
<ns0:ApplicationExceptionDescription xsi:nil="true" />
<ns0:CategoryList xsi:nil="true" />
</ns0:FindApplicationExceptionCategoryCallParameter>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

I have the following binding

<binding>
 <include path="./classes/ValidationCategory.xml" />
 <include path="./classes/ApplicationExceptionCategory.xml" />
 <mapping name="FindApplicationExceptionCategoryCallParameter"
  
class="com.pancredit.gateway.base.param.classes.FindApplicationExceptionCategoryCallParameter"
  ordered="false">
  <namespace uri="http://ws.pancredit.com/wsdl"; prefix="tns"
default="elements" />
  <value name="SecurityToken" field="securityToken" usage="optional" />
  <value name="ApplicationExceptionDescription"
field="applicationExceptionDescription" nillable="true" />
  <collection field="categoryList" usage="optional" nillable="true">
   <structure map-as="ValidationCategory" name="CategoryList"/>
  </collection>
 </mapping>
 <mapping name="FindApplicationExceptionCategoryResponseParameter"
  
class="com.pancredit.gateway.base.param.classes.FindApplicationExceptionCategoryResponseParameter">
  <namespace uri="http://ws.pancredit.com/wsdl"; prefix="tns"
default="elements" />
  <collection field="applicationExceptionCategoryList">
   <structure map-as="ApplicationExceptionCategory"
name="ApplicationExceptionCategoryList" usage="optional"/>
  </collection>
 </mapping>
</binding>


This is the definition for ValidationCategory include
<binding>
 <mapping type-name="ValidationCategory"
class="com.pancredit.gateway.base.classes.XmlValidationCategory"
abstract="true" ordered="false">
  <namespace uri="http://ws.pancredit.com/wsdl"; prefix="tns"
default="elements"/>
  <value name="Code" field="code" usage="optional" nillable="true"/>
  <value name="Description" field="description" usage="optional"
nillable="true"/>
  <value name="ID" field="ID" usage="optional" nillable="true"/>
 </mapping>
</binding>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to