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 Thomas Grabietz <to...@toms-toy.de> on 2011/10/07 13:54:28 UTC
Re:
Which databinding are you using?
Why do you wrap your Object "MyObject"?
Post the lines of the message section from the wsdl...
Try
<xsd:element name="MyRequest" type="tns:MyObject"/>
<xsd:complexType name="MyObject">
<xsd:sequence>
< xsd:element name="firstName" nillable="true" type="string"/ >
< xsd:element name="lastName" nillable="true" type="string"/>
</ xsd:sequence>
</xsd:complexType>
Gruß Tom
Am 07.10.2011 13:44, schrieb Andreas Brunner:
> Hi all,
>
> I experienced some strange behavior with some stubs generated via Axis2. This stubs generate an invalid SOAP Request, like the following one:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <ns2:MyRequest xmlns:ns2="http://www.xyz.com/types">
> <ns2:http://www.xyz.com/types><ns2:http://www.xyz.com/types>Max</ns2:http://www.xyz.com/types>
> <ns2:http://www.xyz.com/types>Mustermann</ns2:http://www.xyz.com/types>
> </ns2:http://www.xyz.com/types>
> </ns2: MyRequest >
> <soapenv:Body>
> </soapenv:Envelope>
>
> Instead, to be valid, it should be:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <ns2:MyRequest xmlns:ns2="http://www.xyz.com/types">
> <ns2:MyObject><ns2:firstName>Max</ns2:http://www.xyz.com/types>
> <ns2:lastName>Mustermann</ns2:http://www.xyz.com/types>
> </ns2:MyRequest>
> </ns2: MyRequest >
> <soapenv:Body>
> </soapenv:Envelope>
>
> The server answers for the given invalid request with:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ':' (code 58) excepted space, or '>' or "/>"
> at [row,col {unknown-source}]: [1,222]</faultstring>
> <detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
>
> The types are defined in the following xsd schema fragment:
>
> <xsd:schema
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:types="http://www.xyz.com/types"
> attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://www.xyz.com/types">
>
>
> <xsd:complexType name="MyObject">
> < xsd:sequence>
> < xsd:element name="firstName" nillable="true" type="string"></ xsd:element>
> < xsd:element name="lastName" nillable="true" type="string"></ xsd:element>
> </ xsd:sequence>
> </ xsd:complexType>
>
>
> <xsd:element name="MyRequest">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="myObject" nillable="false" type="types:MyObject"></xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
>
> I am using the newest version of Axis2 (1.6.1). Please let me know if some additonal info is needed.
>
> Greetings, Andreas
>
>
>
>
--
Für's private
http://toms-toy.de/Thomas%20Grabietz%20tom@toms-toy.de%20(0xE43515AC)%20pub.asc
GIT d-(---)? s():()> a+ C$>++ UL$>+ P? L>++ E W>+++ N>++$ o K--? w>--- O
M>-- V PS>+ PE Y PGP>++$ t 5 X R tv b>+++ DI D G e> h>++ !r y>+
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org