Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

This Weblog describes the the process I follow when creating Dashboard OS X Widgets that access Web Services. I will not cover general widget creation, but the tools and process I follow to determine the format of the Soap request that I need to recreate in Javascript. This example should be useful for any Javascript application, not just Widgets.

Tools

For creating a javascript interaction with a web service it is necessary to know the format of the soap request. For the masochists among us we could read the wsdl and work it out. However I prefer to use the SAP Scripting tool add on to Eclipse. I use this to generate a test php page for calling the web service. Executing the test script provides you a copy of the request and response documents.


Scripting tool



Request/Response



The PHP test script shows you the request and response texts.


!https://weblogs.sdn.sap.com/weblogs/images/2922/PHPScriptMoreDetails.png|height=309|alt=PHP Script|width=448|src=https://weblogs.sdn.sap.com/weblogs/images/2922/PHPScriptMoreDetails.png|border=0!

The request may require a SOAP Action. In this case it is possible to read it from the wsdl. However as I am always running tcpdump for debug purposes I can check the outgoing tcp packet to get the Soap Action from there


Another tool used to test the requests is another widget I created. This widget allows me to send SOAP requests to services. Using this widget I can manipulate the request to test the service. The response is made available in the resultant scrollable textarea (this widget will be covered in a future blog).

Implementation

2 Comments