Hi, I am trying to expose Web Services using the the soap binding and XFire annotations. I can send soap messages and get the response without any problem, but when it comes to create a client from the generated WSDL (with .NET tools for instance), I get error messages telling me there is a namespace problem. I have been using XFire as a SOAP stack for some time and the WSDL it generates takes directly my parameter in the message instead of encapsulate it in another Response or Request structure (cf. wsdl:part of the WSDL). I included below the WSDL generated with servicemix and the one generated with XFire.
Cheers, Frederic WSDL generated using servicemix : <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions targetNamespace="http://com.sims.ts/test" xmlns:tns="http://com.sims.ts/test" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - <wsdl:types> - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <xsd:complexType name="Id"> - <xsd:sequence> <xsd:element minOccurs="0" name="extId" nillable="true" type="xsd:string" /> <xsd:element minOccurs="0" name="id" nillable="true" type="xsd:string" /> <xsd:element minOccurs="0" name="partnerId" nillable="true" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:schema> - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://com.sims.ts/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <xsd:element name="getMyBroker"> - <xsd:complexType> - <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="brokerId" nillable="true" type="ns1:Id" /> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:element name="getMyBrokerResponse"> - <xsd:complexType> - <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="getBrokerResult" nillable="true" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> - <wsdl:message name="getMyBrokerResponse"> <wsdl:part name="parameters" element="tns:getMyBrokerResponse" /> </wsdl:message> - <wsdl:message name="getMyBrokerRequest"> <wsdl:part name="parameters" element="tns:getMyBroker" /> </wsdl:message> - <wsdl:portType name="brokerServicePortType"> - <wsdl:operation name="getMyBroker"> <wsdl:input name="getMyBrokerRequest" message="tns:getMyBrokerRequest" /> <wsdl:output name="getMyBrokerResponse" message="tns:getMyBrokerResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="brokerServiceBinding" type="tns:brokerServicePortType"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="getMyBroker"> - <wsdl:input name="getMyBrokerRequest"> <wsdlsoap:body use="literal" /> </wsdl:input> - <wsdl:output name="getMyBrokerResponse"> <wsdlsoap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="brokerService"> - <wsdl:port name="brokerService" binding="tns:brokerServiceBinding"> <wsdlsoap:address location="http://localhost:8192/BrokerService/" /> </wsdl:port> </wsdl:service> </wsdl:definitions> WSDL generated with XFire : <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://mybeans.ts.sims.com" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://com.sims.ts.ws.broker/v1.0" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://com.sims.ts.ws.broker/v1.0"> - <wsdl:types> - <xsd:schema targetNamespace="http://com.sims.ts.ws.broker/v1.0" elementFormDefault="qualified" attributeFormDefault="qualified"> <xsd:element name="brokerId" type="xsd:string" /> <xsd:element name="getBrokerResult" type="ns1:Broker" /> </xsd:schema> - <xsd:schema targetNamespace="http://mybeans.ts.sims.com" elementFormDefault="qualified" attributeFormDefault="qualified"> - <xsd:complexType name="Broker"> - <xsd:sequence> <xsd:element name="country" type="ns1:Country" minOccurs="0" /> <xsd:element name="id" type="ns1:Id" minOccurs="0" nillable="true" /> <xsd:element name="name" type="xsd:string" minOccurs="0" nillable="true" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="Id"> - <xsd:sequence> <xsd:element name="extId" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="id" type="xsd:string" minOccurs="0" nillable="true" /> <xsd:element name="partnerId" type="xsd:string" minOccurs="0" nillable="true" /> </xsd:sequence> </xsd:complexType> - <xsd:simpleType name="Country"> - <xsd:restriction base="xsd:string"> <xsd:enumeration value="FRANCE" /> <xsd:enumeration value="USA" /> </xsd:restriction> </xsd:simpleType> </xsd:schema> </wsdl:types> - <wsdl:message name="getBrokerRequest"> <wsdl:part element="tns:brokerId" name="brokerId" /> </wsdl:message> - <wsdl:message name="getBrokerResponse"> <wsdl:part element="tns:getBrokerResult" name="getBrokerResult" /> </wsdl:message> - <wsdl:portType name="BrokerServiceIF"> - <wsdl:operation name="getBroker"> <wsdl:input message="tns:getBrokerRequest" name="getBrokerRequest" /> <wsdl:output message="tns:getBrokerResponse" name="getBrokerResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="BrokerServiceHttpBinding" type="tns:BrokerServiceIF"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="getBroker"> <wsdlsoap:operation soapAction="urn:BrokerId" /> - <wsdl:input name="getBrokerRequest"> <wsdlsoap:body use="literal" /> </wsdl:input> - <wsdl:output name="getBrokerResponse"> <wsdlsoap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="BrokerService"> - <wsdl:port binding="tns:BrokerServiceHttpBinding" name="BrokerServiceHttpPort"> <wsdlsoap:address location="http://localhost:8080/xfire-annotations/services/BrokerService" /> </wsdl:port> </wsdl:service> </wsdl:definitions> -- View this message in context: http://www.nabble.com/WSDL-Generation-with-SOAP-binding-t1516728.html#a4116768 Sent from the ServiceMix - User forum at Nabble.com.
