aspose file tools*
The moose likes Web Services and the fly likes Issue in response in Spring WS with AJXB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Issue in response in Spring WS with AJXB" Watch "Issue in response in Spring WS with AJXB" New topic
Author

Issue in response in Spring WS with AJXB

Deepak Ram
Greenhorn

Joined: Aug 09, 2007
Posts: 12
Hello,

I am having a strange issue in generating response XMLs using Spring WS.

I use Spring WS with JAXB. PFB a snippet of the schema that I used to generate JAXB objects:

<xs:complexType name="Customer">
<xs:sequence>
<xs:element name="Accounts" type="Accounts" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Accounts">
<xs:sequence>
<xs:element name="Account" type="Account" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Account">
<xs:sequence>
<xs:element name="Account" type="xs:string" />
</xs:sequence>
</xs:complexType>


The expected output should look something like this:

<Customer>
<Accounts>
<Account>
<Name>xyzxxx</Name>
<Account>
<Account>
<Name>xasde</Name>
<Account>
<Accounts>
</Customer>

This is working in case of small XML requests. But, in case of huge XML requests, the output is modified to something as follows:

<Customer>
<Accounts>
<Account>
<Name>xyzxxx</Name>
<Account>

<Name>xasde</Name>

<Accounts>
</Customer>

The difference is that the account tag is not getting generated in a few cases. This is not happening regularly but intermittently. As a result, the XML formed does not conform to the schema and we are getting schema validation errors.

As I mentioned before, this issue occurs only in case of huge XMLs. I might say that the size of the XML is greater than 500 kb each time we encounter this error. Also, we are not able to reproduce this on a regular basis.

Has anyone encountered this error before? Or any suggestions as to what might cause this error? Or any workaround for this issue?

Any thoughts would be helpful and will be highly appreciated.

Thanks.
 
Don't get me started about those stupid light bulbs.
 
subject: Issue in response in Spring WS with AJXB