Array - Complex Type
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <OF87CEEE2E.C3E41FB3-ON05257058.0052892D-05257058.00528988@assist.com.co> |
Hi All,
I’m using WSIF distribution 2.0
I’m able to consume services that return arrays of complex objects but I
have problems consuming complex objects that have an array as an attribute.
Have any one of you look doing that?
For example:
<wsdl:types>
<schema elementFormDefault="qualified"
targetNamespace="http://service.test"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://service.test"
xmlns:intf="http://service.test" xmlns:tns2="http://beans.test"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<import namespace="http://beans.test"/>
<element name="getCompany">
<complexType>
<sequence>
<element name="nombre" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getCompanyResponse">
<complexType>
<sequence>
<element name="getCompanyReturn" nillable="true"
type="tns2:Company"/>
</sequence>
</complexType>
</element>
</schema>
<schema elementFormDefault="qualified"
targetNamespace="http://beans.test"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://service.test"
xmlns:intf="http://service.test"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<complexType name="Company">
<sequence>
<element maxOccurs="unbounded" name="employed" nillable="true"
type="tns2:Employed"/>
<element name="id" nillable="true" type="xsd:string"/>
<element name="nombre" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="Employed">
<sequence>
<element name="cedula" nillable="true" type="xsd:string"/>
<element name="nombre" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
---------
I’m always getting this exception:
---------
Error services invocation in WSIF using serviceParams={parameters=CANTV,
nombre=CANTV}; la excepción original es:
exception on AXIS invoke: ; nested exception is:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
which is NOT expected, in something it was trying to deserialize.; nested
exception is:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
which is NOT expected, in something it was trying to deserialize.
org.apache.wsif.WSIFException: exception on AXIS invoke: ; nested exception
is:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
which is NOT expected, in something it was trying to deserialize.; nested
exception is:
org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
which is NOT expected, in something it was trying to deserialize.
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeAXISDocStyle(Unknown
Source)
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeRequestResponseOperation(Unknown
Source)
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.executeRequestResponseOperation(Unknown
Source)
at
ve.com.cantv.common.hera.message.framework.wsif.WSIFInvoker.sendSyncMessage(WSIFInvoker.java:54)
at
ve.com.cantv.common.hera.message.framework.wsif.WSIFMessageHandlerSyncImpl.sendSyncMessage(WSIFMessageHandlerSyncImpl.java:50)
at
ve.com.cantv.common.hera.message.sync.MessageHandlerSyncManager.sendSyncMessage(MessageHandlerSyncManager.java:68)
at
ve.com.cantv.common.hera.message.util.MessageInvokerUtil.executeInvocation(MessageInvokerUtil.java:50)
at
ve.com.cantv.common.hera.message.test.temp.TestGetCompany.main(TestGetCompany.java:34)
Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to deserialize.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:120)
at org.apache.axis.client.Call.invoke(Call.java:1874)
at org.apache.axis.client.Call.invoke(Call.java:1777)
at org.apache.axis.client.Call.invoke(Call.java:1315)
... 8 more
Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to deserialize.
at
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:188)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:893)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
at org.apache.axis.client.Call.invoke(Call.java:1871)
-------
I'm attaching a wsdl that is giving me this probblem
Thanks in advance
___________________________________
Juan David Pérez
Assist
(See attached file: GetCompany.wsdl)
GetCompany.wsdl
(application/octet-stream, 3.3 KB) - not displayed