Nothing wrong with using "item" for elements of different types of
arrays. I think your WSDL is OK but AXIS' output is wrong. You
probably need Eric Chijoke's famous Axis array patch to the bug http://issues.apache.org/jira/browse/AXIS-1547
Praveen Peddi wrote:
I have a service that references 2
bean arrays. One is Object[] and another is String[]. Looks like WSDL
generated by Axis is slightly incorrect. Well .NET complains about it.
Here is the snippet of WSDL:
<complexType name="ArrayOf_xsd_string">
<sequence>
<element maxOccurs="unbounded"
minOccurs="0" name="item"
type="xsd:string" />
</sequence>
</complexType>
<element name="fault" type="tns2:ContainerException" />
<element name="fault1" type="tns4:AuthenticationException" />
<complexType name="ArrayOf_xsd_anyType">
<sequence>
<element maxOccurs="unbounded"
minOccurs="0" name="item"
type="xsd:anyType" />
</sequence>
</complexType>
See above that it is using the same
attribute name "item" for both xsd array types.
Following is the error .NET is
throwing:
Unhandled Exception:
System.TypeInitializationException: The type initializer for
"WindowsApplication1.CMIServiceUtils" threw an exception. --->
System.InvalidOperationException: Method
CMISOAPContainerServiceService.getRootContainers can not be reflected.
---> System.InvalidOperationException: There was an error reflecting
'getRootContainersResult'. ---> System.InvalidOperationException:
There was an error reflecting type
'WindowsApplication1.localhost1.ContainerBean'. --->
System.InvalidOperationException: There was an error reflecting field
'children'. ---> System.InvalidOperationException: The XML element
named 'item' from namespace
'http://localhost:7001/axis/services/CMISOAPContainerService'
references distinct types System.String and System.Object. Use XML
attributes to specify another XML name or namespace for the element or
types.
I am not sure if Axis is doing the
right thing but .NET is complaining wrongly or vice versa.
Any help is appreciated. I am using
Feb 8th's build of Axis rc 1.2.
Thanks
Praveen
**************************************************************
Praveen Peddi
Sr Software Engg, Context Media, Inc.
email:[EMAIL PROTECTED]
Tel: 401.854.3475
Fax: 401.861.3596
web: http://www.contextmedia.com
**************************************************************
Context Media- "The Leader in Enterprise Content Integration"
|