1 / 34

Understanding the WSDL

Understanding the WSDL. Overview. When you complete this lesson you should be able to:. View a WSDL document from a Web browser Generate the 4GL WSDL documentation from a WSDL document Describe how to use the 4GL WSDL documentation Describe the sections of a WSDL document.

igor-guerra
Download Presentation

Understanding the WSDL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Understanding the WSDL

  2. Overview When you complete this lesson you should be able to: • View a WSDL document from a Web browser • Generate the 4GL WSDL documentation from a WSDL document • Describe how to use the 4GL WSDL documentation • Describe the sections of a WSDL document

  3. How the WSDL document is used

  4. Getting the WSDL document

  5. Demonstration 2-1:Viewing the WSDL document

  6. Sections of the WSDL document <wsdl:definitions> <wsdl:documentation> <wsdl:types> <wsdl:message> <wsdl:message> . . . <wsdl:portType> <wsdl:portType> . . . <wsdl:binding> <wsdl:binding> . . . <wsdl:service> <wsdl:service> . . . </wsdl:definitions>

  7. WSDL information used in 4GL code

  8. WSDL Analyzer

  9. bprowsdldoc

  10. Demonstration 2-2:Generating the 4GL WSDL documentation

  11. WSDL Analyzer files

  12. Index for navigating the WSDL documentation Start here

  13. Service documentation

  14. portType documentation PortType (persistent procedure) <portType name> Summary Connection information Operations (internal procedures) Connection details CONNECT method parameters Example Operation (internal procedure) detail Operation A Operation B Operation C

  15. portType summary

  16. Connection parameters

  17. Operation detail

  18. Operation detail for a function

  19. New types defined for an operation

  20. DataType detail

  21. Lab 2-1:Examining the 4GL WSDL documentation

  22. binding name = Bind-A type = PT1 … RPC/Encoded portType name = PT1 operation aa operation bb binding name = Bind-B type = PT1 … Document/Literal portType name = PT2 operation aa operation cc binding name = Bind-C type = PT2 … Document/Literal message message message Sections of the WSDL document service name = Service1 port name = SPort1-1 binding = Bind-A port name = SPort1-2 binding = Bind-B service name = Service2 port name = SPort2-1 binding = Bind-C types . . .

  23. WSDL at http://localhost:8080/wsa/wsa1/wsdl? <wsdl:definitions name="NewCoService" targetNamespace="urn:OpenEdgeServices:NewCoService" xmlns:tns="urn:OpenEdgeServices:NewCoService" xmlns:S2="urn:OpenEdgeServices:NewCoService:NewCoService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:S1="http://localhost:8080/wsa/wsa1" xmlns="http://schemas.xmlsoap.org/wsdl/"> . . . <wsdl:service name="NewCoServiceService"> <wsdl:port name="NewCoServiceJapan" binding="tns:NewCoServiceObjSOAPBinding"> <documentation>This service provides its users with the capability of placing Orders with NewCo and receiving Invoices.</documentation> <soap:address location="http://www.newco.com/Japan/wsa/wsa1"/> </wsdl:port> </wsdl:service> </wsdl:definitions>

  24. If WSDL and Web Service locations differ WSDL: port address location = B 1c www.newco.com/WS Web server A providing WSDL 2 • Web service consumer steps: • Connect to Web service • Get operation information • Prepare to invoke operation • cMyOrder = . . . • Invoke operation • Process result of operation • iNum = iInvoiceNum. • Disconnect from Web service • SERVER-DISCONNECT(). SERVER-CONNECT(-WSDL A) 1a NewCoService.wsdl 1b Web server B providing services RUN SendOrders(cMyOrder) 4a iInvoiceNum 4b www.newco.com/Japan 4GL client (consumer)

  25. portType information in WSDL <wsdl:definitions name="NewCoService“ targetNamespace="urn:OpenEdgeServices:NewCoService" xmlns:tns="urn:OpenEdgeServices:NewCoService" . . . <wsdl:portType name="NewCoServiceObj“> < wsdl: operation name=“SendMultiOrders” . . . < wsdl: operation name=“GetInvoice” . . . . . . </wsd:portType>

  26. Operation definitions in WSDL <wsdl:definitions name="NewCoService" . . . <wsdl:portType name="NewCoServiceObj"> <wsdl:operation name="SendMultiOrders" parameterOrder=“cDocument cID iNumDocs iInvoiceNum"> <wsdl:input message="tns:NewCoService_SendMultiOrders"/> <wsdl:output message="tns:NewCoService_SendMultiOrdersResponse"/> <wsdl:fault name="NewCoServiceFault" message="tns:FaultDetailMessage"/> </wsdl:operation> </wsdl:portType> </wsdl:definitions>

  27. Message definitions in WSDL <wsdl:definitions name="NewCoService" . . . <wsdl:message name="NewCoService_SendMultiOrders"> <wsdl:part name=“cDocument" type="xsd:string"/> <wsdl:part name="cID" type="xsd:string"/> <wsdl:part name="iNumDocs" type="xsd:int"/> </wsdl:message> <wsdl:message name="NewCoService_SendMultiOrdersResponse"> <wsdl:part name="iInvoiceNum" type="xsd:int"/> </wsdl:message> <wsdl:message name="FaultDetailMessage"> <wsdl:part name="FaultDetail" type="S1:FaultDetail"/> </wsdl:message> . . . </wsdl:definitions>

  28. SOAP messaging protocol Transport Protocol SOAP format Message style Encoding style RPC or Document? SOAP or WSDL defined? HTTP

  29. SOAP messaging definitions in WSDL <wsdl:definitions name="NewCoService" <wsdl:binding name="NewCoServiceObj" type="tns:NewCoServiceObj"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="CancelOrders"> <soap:operation soapAction="urn:OpenEdgeServices:NewCoService" style="rpc"/> <wsdl:input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:OpenEdgeServices:NewCoService:NewCoService"/> </wsdl:input> <wsdl:output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:OpenEdgeServices:NewCoService:NewCoService"/> </wsdl:output> <wsdl:fault name="NewCoServiceFault"> <soap:fault name="NewCoServiceFault" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/wsa/wsa1"/> </wsdl:fault> </wsdl:operation> </wsdl:binding> </wsdl:definitions>

  30. SOAP formats

  31. binding name = Bind-A type = PT1 … RPC/Encoded portType name = PT1 operation aa operation bb binding name = Bind-B type = PT1 … Document/Literal portType name = PT2 operation aa operation cc binding name = Bind-C type = PT2 … Document/Literal message message message References in the WSDL document service name = Service1 port name = SPort1-1 binding = Bind-A port name = SPort1-2 binding = Bind-B service name = Service2 port name = SPort2-1 binding = Bind-C types . . .

  32. Lab 2-2:Getting the WSDL information

  33. Summary You should now be able to: • View a WSDL document from a Web browser • Generate the 4GL WSDL documentation from a WSDL document • Describe how to use the 4GL WSDL documentation • Describe the sections of a WSDL document

  34. Review

More Related