You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by jd...@assist.com.co on 2005/08/09 17:01:31 UTC
Array - Complex Type
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)
Re: Array - Complex Type
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
jdperez@assist.com.co wrote:
> 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?
>
i suspect that problem may be related to limited XML schemas support in
WSIF.
however could you try the version from CVS (or tomorrow nightly build)
and see if it helps? this will use then latest AXIS 1.2.1 and maybe that
helps ...
i would also try to disable multi-ref in AXIS service (and if necessary
on client side) and see if it helps.
how does XML-on-the-wire looks when you use tcpmon?
best,
alek
>
>
> 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)/
--
The best way to predict the future is to invent it - Alan Kay