Hi Vedha,
With JiBX, the order of the sub-elements is determined by the binding
definition. I don't know how you obtained the binding definition you're
using - if it was through the old Xsd2Jibx tool, that should have
preserved the order of sub-elements from the schema.
For a more specific answer, you need to supply more information about
the schema and binding.
- Dennis
Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
Vedha Vijayan wrote:
Hi,
I'm using JiBX for databinding and in my response, the sub-elements of
the object that gets marshalled, appear to not be in the order that the
schema reflects. The schema uses 'sequence' keyword to order the
sub-elements, but the response has the elements jumbled.
The object to be marshalled (UserBean) has an implementation for
toString and also encapsulates lot more information than what needs to
be exposed to the outside world as part of the Web Service response. I
see that the response element in the SOAP envelope has sub-elements
ordered in the same sequence as in the output of the toString method. To
better understand, if you consider that the following is the output of
the toString method,
<UserBean>
<A>...</A>
<B>...</B>
<C>...</C>
<D>...</D>
</UserBean>
and only fields B,D are to be exposed and defined as part of the
response object in the schema, the SOAP envelope contains the following
information;
<UserBean>
<B>...</B>
<D>...</D>
</UserBean>
although the schema defines a sequence with element D to appear before
B.
The JiBX documentation says that no additional coding is required to
support "sequence", but things are not working properly in my case. Can
anyone throw some light on this problem.
Thanks in advance,
vedha
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]