You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Olivier Gauwin <ga...@campus.dtrd.de> on 2002/12/09 10:56:37 UTC
supported ?
Hi,
I'm trying to send a Union parameter via SOAP with Axis 1.0 (and Tomcat
4.1.12) and I've got the following problem.
(My WSDD file contains the <wsdlFile> tag, so my WSDL is used for
deployment. I use WSDL2Java on the client side.)
---- WSDL ----
<xsd:complexType name="DataUnion">
<xsd:sequence>
<xsd:element name="discriminator" type="xsd:int" />
<xsd:choice>
<!-- case 1 -->
<xsd:element name="arr" type="tns1:ArrayOfArrayOfFloat"
nillable="true" minOccurs="0" maxOccurs="1"/>
<!-- case 2 -->
<xsd:element name="l" type="xsd:int" minOccurs="0" maxOccurs="1"/>
<!-- default case -->
<xsd:element name="c" type="xsd:string" minOccurs="0"
maxOccurs="1"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="DataUnion" nillable="true" type="tns1:DataUnion"/>
---- Java Client ----
Interop.DataUnion input = new Interop.DataUnion();
input.setL(new Integer(14));
input.setDiscriminator(2);
output = binding.echoUnion(input);
---- WSDD ----
I use a Bean(De)SerializerFactory.
---- SOAP Request ----
<ns1:echoUnion
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://soapinterop.org/">
<inputUnion href="#id0"/>
</ns1:echoUnion>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:DataUnion"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://Interop/xsd">
<discriminator xsi:type="xsd:int">2</discriminator>
<arr xsi:type="ns2:ArrayOfArrayOfFloat" xsi:nil="true"/>
<l xsi:type="soapenc:int">14</l>
<c xsi:type="xsd:string" xsi:nil="true"/>
</multiRef>
---- Exception (Tomcat)----
- Exception:
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXException: Invalid element in
Interop.DataUnion - discriminator
faultActor: null
faultDetail:
stackTrace: org.xml.sax.SAXException: Invalid element in
Interop.DataUnion - discriminator
at ...
This exception is raised by Axis before the method call.
I've tried to use <xsd:element ref=...> instead of <xsd:element
name=...> but the problem is the same. When you look at the SOAP
request, it seems that discriminator is a part of the <xsd:choice>, but
it should not be (it's not in the WSDL file). Is it an Axis bug /
limitation ??
Thanks in advance,
Olivier
Re: supported ?
Posted by Olivier Gauwin <ga...@campus.dtrd.de>.
> I'm trying to send a Union parameter via SOAP with Axis 1.0 (and
> Tomcat 4.1.12) and I've got the following problem.
I've found a solution. The problem was on the server side, and not
related to Apache...