Hello,
I have a very simple WCF web service and a ws4ee client running in Jboss 4.0.3sp1, but
using the ws4ee stack delivered with JBoss 4.0.4.
The WSDL of the WCF service is separated into two documents. The main document contains
the following wsdl:types definition
<wsdl:types>
| <xsd:schema
targetNamespace="http://tempuri.org/Imports">
| <xsd:import
schemaLocation="http://localhost/WsatTest1WebService/Service.svc?xsd=xsd0"
namespace="http://tempuri.org/" />
| </xsd:schema>
| </wsdl:types>
And the second, imported document looks the following:
<?xml version="1.0" encoding="utf-8" ?>
| <xs:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://tempuri.org/">
| <xs:element name="SayHello">
| <xs:complexType>
| <xs:sequence>
| <xs:element minOccurs="0" maxOccurs="1" name="t1"
type="xs:string" />
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="SayHelloResponse">
| <xs:complexType>
| <xs:sequence>
| <xs:element minOccurs="0" maxOccurs="1"
name="SayHelloResult" type="xs:string" />
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| </xs:schema>
When I call this web service from my ws4ee client, the wcf service does not deserialize
the request correctly (it receives null instead of its input data) and the client is not
able to deserialize the response, it throws a org.xml.sax.SAXException: Invalid element in
de.itinformatik.mes.serviceproxies.services.test.SayHelloResponse - SayHelloResult
| at
org.jboss.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:455)
| at
org.jboss.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1173)
| [...]
Looking at the SOAP messages exchanged, i found the reason: The ws4ee stack does not use
qualified xml names for the elements of complex types and does not allow them in the
response.
Now the strange thing: If I resolve the xsd:import by hand, integrating the imported xsd
document into the wsdl document, everything works fine.
Here the SOAP request messages my client sends to the WCF service,
1) using the original wsdl document:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <soapenv:Body>
| <ns1:SayHello
xmlns:ns1="http://tempuri.org/">
| <t1>foo</t1>
| </ns1:SayHello>
| </soapenv:Body>
| </soapenv:Envelope>
2) using the modified wsdl document without xsd:import
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <soapenv:Body>
| <ns1:SayHello
xmlns:ns1="http://tempuri.org/">
| <ns1:t1>foo</ns1:t1>
| </ns1:SayHello>
| </soapenv:Body>
| </soapenv:Envelope>
Could this be a bug in the ws4ee stack? Or are wsdl documents using xsd:import in their
wsdl:types definition not supported by the ws4ee stack?
Regards,
Martin
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011863#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...