[JBossWS] - Problem with ws4ee stack and wsdl description using xsd:impo
by stone_42
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#4011863
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011863
19 years, 2 months
[JBossWS] - Interop with WCF
by stone_42
Hello,
can you tell me how good the interoperability between JBossWS and Microsofts WCF web service implementation is? Currently, I am using the ws4ee stack and I'm even not able to call a hello world wcf web service, because ws4ee and wcf (configured to use soap 1.1) both do not understand the soap messages of the other partner (besides, I made ws-transactions with JBossWS and ws-security with a custom JaxRPC-Handler working - but not the communication of application data).
What I'm looking for are statements about handling application data, namely simple data types like strings, complex data types and arrays.
An answer could help me to decide whether migration from ws4ee to JBossWS (and subsequently from JBoss 4.0.3 to 4.0.4 or 4.0.5) is worthwhile to think about.
Searching the wiki, I found only this page http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWSAndDotNet about Interop with microsoft implementations, but it does not mention WCF at all.
Regards,
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011774#4011774
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011774
19 years, 2 months
[JBossWS] - Namespace for complex types
by pyuill
I am using a jsr181 pojo service that works well except that I have not been able to find a way to set the targetNamespace on all the complexTypes. Setting targetNamespace in the @Webservice() annotation sets the tns for the bindings and some of the complexTypes, but not all of them. Specifically it does not set the targetNamespace for complexTypes that are referenced as arrays eg:
@WebMethod
public SdmOrderStatus evaluateSdmOrder(SdmOrderRequest order) {
works fine for both the parameter and the return object
@WebMethod
public ProductDesc[] getProducts() {
results in a default namespace for ProductDesc, but my requested namespace for ProductDesc.Array
I am using jbossws from the jems-installer-1.2.0.GA (1.0.3 sp1 I think).
Any ideas would be appreciated.
Regards,
Peter Yuill
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011725#4011725
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011725
19 years, 2 months