namespaces - How to merge two wsdl in a wsdl file? -
i created proxy in wso2 esb, , used 2 different endpoints in it. want publish common wsdl. have 2 wsdl adresses 2 different web services.
1- http://localhost:12080/srv-csb-mock/csbservice?wsdl
<?xml version="1.0" ?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://csb.sgrs.ayesas.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="csbservice" targetnamespace="http://csb.sgrs.ayesas.com/"> <wsdl:types> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:tns="http://csb.sgrs.ayesas.com/" elementformdefault="unqualified" targetnamespace="http://csb.sgrs.ayesas.com/" version="1.0"> <xs:element name="carpma" type="tns:carpma"></xs:element> <xs:element name="carpmaresponse" type="tns:carpmaresponse"></xs:element> <xs:complextype name="carpma"> <xs:sequence> <xs:element name="ilk" type="xs:int"></xs:element> <xs:element name="son" type="xs:int"></xs:element> </xs:sequence> </xs:complextype> <xs:complextype name="carpmaresponse"> <xs:sequence> <xs:element name="return" type="xs:int"></xs:element> </xs:sequence> </xs:complextype> </xs:schema> </wsdl:types> <wsdl:message name="carpma"> <wsdl:part element="tns:carpma" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:message name="carpmaresponse"> <wsdl:part element="tns:carpmaresponse" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:porttype name="csbservice"> <wsdl:operation name="carpma"> <wsdl:input message="tns:carpma" name="carpma"> </wsdl:input> <wsdl:output message="tns:carpmaresponse" name="carpmaresponse"> </wsdl:output> </wsdl:operation> </wsdl:porttype> <wsdl:binding name="csbservicesoapbinding" type="tns:csbservice"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding> <wsdl:operation name="carpma"> <soap:operation soapaction="carpma" style="document"></soap:operation> <wsdl:input name="carpma"> <soap:body use="literal"></soap:body> </wsdl:input> <wsdl:output name="carpmaresponse"> <soap:body use="literal"></soap:body> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="csbservice"> <wsdl:port binding="tns:csbservicesoapbinding" name="csbserviceport"> <soap:address location="http://localhost:12080/srv-csb-mock/csbservice"></soap:address> </wsdl:port> </wsdl:service> </wsdl:definitions>
2- http://localhost:12080/srv_dbs_mock/mockgthbservice/mockgthbservice?wsdl
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://gthb.dbs.ayesas.com/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetnamespace="http://gthb.dbs.ayesas.com/"> <wsdl:types> <xsd:schema xmlns:xs="http://www.w3.org/2001/xmlschema" attributeformdefault="unqualified" elementformdefault="unqualified" targetnamespace="http://gthb.dbs.ayesas.com/" version="1.0"> <xsd:element name="add" type="tns:add"></xsd:element> <xsd:element name="addresponse" type="tns:addresponse"></xsd:element> <xsd:complextype name="add"> <xsd:sequence> <xsd:element name="x" type="xsd:int"></xsd:element> <xsd:element name="y" type="xsd:int"></xsd:element> </xsd:sequence> </xsd:complextype> <xsd:complextype name="addresponse"> <xsd:sequence> <xsd:element name="return" type="xsd:int"></xsd:element> </xsd:sequence> </xsd:complextype> </xsd:schema> </wsdl:types> <wsdl:message name="add"> <wsdl:part name="parameters" element="tns:add"></wsdl:part> </wsdl:message> <wsdl:message name="addresponse"> <wsdl:part name="parameters" element="tns:addresponse"></wsdl:part> </wsdl:message> <wsdl:porttype name="gthbproxyporttype"> <wsdl:operation name="add"> <wsdl:input message="tns:add" wsaw:action="add"></wsdl:input> <wsdl:output message="tns:addresponse" wsaw:action="http://gthb.dbs.ayesas.com/mockgthbservice/addresponse"></wsdl:output> </wsdl:operation> </wsdl:porttype> <wsdl:binding name="gthbproxysoap11binding" type="tns:gthbproxyporttype"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding> <wsdl:operation name="add"> <soap:operation soapaction="add" style="document"></soap:operation> <wsdl:input> <soap:body use="literal"></soap:body> </wsdl:input> <wsdl:output> <soap:body use="literal"></soap:body> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="gthbproxysoap12binding" type="tns:gthbproxyporttype"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap12:binding> <wsdl:operation name="add"> <soap12:operation soapaction="add" style="document"></soap12:operation> <wsdl:input> <soap12:body use="literal"></soap12:body> </wsdl:input> <wsdl:output> <soap12:body use="literal"></soap12:body> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="gthbproxyhttpbinding" type="tns:gthbproxyporttype"> <http:binding verb="post"></http:binding> <wsdl:operation name="add"> <http:operation location="add"></http:operation> <wsdl:input> <mime:content type="text/xml" part="parameters"></mime:content> </wsdl:input> <wsdl:output> <mime:content type="text/xml" part="parameters"></mime:content> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="gthbproxy"> <wsdl:port name="gthbproxyhttpsoap11endpoint" binding="tns:gthbproxysoap11binding"> <soap:address location="http://localhost.localdomain:8280/services/gthbproxy.gthbproxyhttpsoap11endpoint"></soap:address> </wsdl:port> <wsdl:port name="gthbproxyhttpssoap11endpoint" binding="tns:gthbproxysoap11binding"> <soap:address location="https://localhost.localdomain:8243/services/gthbproxy.gthbproxyhttpssoap11endpoint"></soap:address> </wsdl:port> <wsdl:port name="gthbproxyhttpssoap12endpoint" binding="tns:gthbproxysoap12binding"> <soap12:address location="https://localhost.localdomain:8243/services/gthbproxy.gthbproxyhttpssoap12endpoint"></soap12:address> </wsdl:port> <wsdl:port name="gthbproxyhttpsoap12endpoint" binding="tns:gthbproxysoap12binding"> <soap12:address location="http://localhost.localdomain:8280/services/gthbproxy.gthbproxyhttpsoap12endpoint"></soap12:address> </wsdl:port> <wsdl:port name="gthbproxyhttpsendpoint" binding="tns:gthbproxyhttpbinding"> <http:address location="https://localhost.localdomain:8243/services/gthbproxy.gthbproxyhttpsendpoint"></http:address> </wsdl:port> <wsdl:port name="gthbproxyhttpendpoint" binding="tns:gthbproxyhttpbinding"> <http:address location="http://localhost.localdomain:8280/services/gthbproxy.gthbproxyhttpendpoint"></http:address> </wsdl:port> </wsdl:service> </wsdl:definitions>
i want merge them in wsdl file. added schemas , methods of second wsdl first wsdl. cannot change targetnamespace="http://csb.sgrs.ayesas.com/" in definitions. can't access methods in second wsdl.
Comments
Post a Comment