OK, we are going.
To a WSDL file to modify something like this
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <wsdl:definitions targetNamespace="http://service.wsr.company.com/" name="webServiceExample" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://servicio.wsr.baz.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
In this small snippet, xmlns tags are important. They are used to deploy the XSD schema. Further
<wsdl:types> <xs:schema xmlns:tns="http://service.wsr.company.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://service.wsr.company.com/" version="1.0"> ... </xs:schema> </wsdl:types>
In this tag below you will get what you have in the service.xsd file or show it in http://localhost:8080/webService/servlet-url?xsd=1 , we continue
<wsdl:message name="your_method_name"> <wsdl:part name="parameters" element="tns:your_method_name"/> </wsdl:message> <wsdl:message name="your_method_nameResponse"> <wsdl:part name="parameters" element="tns:your_method_nameResponse"/> </wsdl:message>
Those tags above show your method name. Further
<wsdl:portType name="webServiceExample"> <wsdl:operation name="your_method_name"> <wsdl:input message="tns:your_method_name"/> <wsdl:output message="tns:your_method_nameResponse"/> </wsdl:operation> </wsdl:portType>
The ones above tar are for entering your operation. Proceed
<wsdl:binding name="webServiceExamplePortBinding" type="tns:webServiceExample"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="your_method_name"> <soap:operation soapAction=""/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding>
Following:)
<wsdl:service name="webServiceExample"> <wsdl:port name="webServiceExamplePort" binding="tns:webServiceExamplePortBinding"> <soap:address location="REPLACE_WITH_ACTUAL_URL"/> </wsdl:port>
And finally finished :)
Please note that you need to change the current tag with the <wsdl:...></wsdl:...>
You save it, the public, and enjoy the XSD scheme presented in WSDL .
I hope to help you. Ciao.
hekomobile
source share