Web Service Example - Defining the Web Service Profile
Use the following instructions to create a WS profile:
Click theÂ
button in the upper left part of the Desktop window, and then select from the menu.The WS profile configuration dialog opens.
ÂIn the Configuration tab, click on the  button, and select the WSDL file you want to import.
You can now see the file contents on the View WSDL Contents tab.
ÂAt the bottom of the Configuration tab, select the  in the Service Port Definition drop-down list.
ÂIn the WS profile, click on the menu and select the option.
ÂIn the Save as dialog box select a folder and type Example in the Name text box.
ÂClickÂ
.
ÂCheck the WS directory in the APL Code Editor and see the data structure that your WS profile just generated. The APL Code Editor is opened by clicking on the button in Desktop, and then selecting  from the menu.
ÂRight-click on the text pad and select theÂ
option.The UDR Internal Format Browser opens.
ÂScroll down to the WS directory and expand it to see where data is stored once you save your WS profile.
The WSDL File
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/webservice/charger" xmlns:x1="http://example.com/webservice/charger/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Charger" targetNamespace="http://example.com/webservice/charger"> <wsdl:types> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.com/webservice/charger/types" elementFormDefault="qualified" targetNamespace="http://example.com/webservice/charger/types"> <complexType name="ChargingEvent"> <sequence> <element name="id" type="string"/> <element name="amount" type="float"/> </sequence> </complexType> <element name="Charge"> <complexType> <sequence> <element name="serviceType" type="string"/> <element name="chargingEvent" type="tns:ChargingEvent"/> </sequence> </complexType> </element> <element name="ChargeResult"> <complexType> <sequence> <element name="success" type="boolean"/> <element name="message" type="string"/> </sequence> </complexType> </element> <element name="FaultDetail"> <complexType> <sequence> <element name="reason" type="int"/> <element name="message" type="string"/> </sequence> </complexType> </element> </schema> </wsdl:types> <wsdl:message name="ChargingRequest"> <wsdl:part name="in" element="x1:Charge" /> </wsdl:message> <wsdl:message name="ChargingRespone"> <wsdl:part name="in" element="x1:ChargeResult" /> </wsdl:message> <wsdl:message name="chargeFault"> <wsdl:part name="faultDetail" element="x1:FaultDetail"/> </wsdl:message> <wsdl:portType name="Charger"> <wsdl:operation name="charge"> <wsdl:input name="chargingRequest" message="tns:ChargingRequest"/> <wsdl:output name="chargingResponse" message="tns:ChargingRespone"/> <wsdl:fault name="chargingFault" message="tns:chargeFault"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="Charger_SOAPBinding" type="tns:Charger"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="charge"> <soap:operation soapAction="" style="document"/> <wsdl:input name="chargingRequest"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="chargingResponse"> <soap:body use="literal"/> </wsdl:output> <wsdl:fault name="chargingFault"> <soap:fault name="chargingFault" use="literal"/> </wsdl:fault> </wsdl:operation> </wsdl:binding> <wsdl:service name="Charger_Service"> <wsdl:port binding="tns:Charger_SOAPBinding" name="Charger"> <soap:address location="http://localhost:8080/charge"/> </wsdl:port> </wsdl:service> </wsdl:definitions>