[jbossws-users] Generated WSDL - soap encoded arrays
Tagged
tagged at seaoffire.net
Thu Oct 22 16:37:35 EDT 2009
Hello,
I have a small issue with a small app that has annotated Java and JBoss is
generating the WSDL.
I'm converting this from Weblogic 9, so the WSDLs are a little different.
The main problem is when returning an ArrayList, if there is only one
element, JBoss omits the <item> tag around it. If there are two elements,
then each is surrounded by an <item> tag.
In Weblogic, regardless of whether there was 1 or more elements, there is
always an item tag. (Which makes parsing much simpler when calling from
PHP, and apparent Cold Fusion.)
Some sample XML to explain this. This is the exact same code,
First from Weblogic :
<soapenv:Body>
<m:LookupResponse xmlns:m="http://host.com>
<m:return>
<m:Account soapenc:arrayType="xs:anyType[1]">
<item xsi:type="m:Account">
-- snip 1 result --
</item>
</m:Accounts>
<m:ErrorMessage xsi:nil="true"/>
</m:return>
</m:LookupResponse>
</soapenv:Body>
Then from JBoss :
<env:Body>
<ns2:LookupResponse xmlns:ns2="http://host.com">
<return>
<accounts>
-- snip 1 result - note the lack of <item> --
</accounts>
</return>
</ns2:LookupResponse>
</env:Body>
Is there a way to force JBoss to always treat this object as a soap
encoded array? So that it will always itemize the list of results whether
it be 1 or more?
Thank you very much,
Ben
More information about the jbossws-users
mailing list