Skip to Content

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.

User List Widget

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

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

TCP Dump Capture

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).

SOAP Test Tool

Implementation

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Santhosh Lingaraju
    Hi John,
           Can you provide me the complete source code of (widget, Java script) for accessing Web services. Actually I am trying to build a simple widget which should integrate with SAP. For this Java script code of either RFC/Web services integration is required. Your response would be very helpfull.

    Thanks & Regards,
    Santhosh

    (0) 
  2. Ramatís Oliveira dos Santos
    Hi John,

    I was wondering if you could help me with the following issue:

    I need to call a WS from a JSP with SSO. Do you have something like source code or else ?

    PS: The WS I need to call is already consumed from  via Java WD using Logical Destination.

    Any help will be welcome.

    Thanx,
    Best Regards,
    Ramatís

    (0) 

Leave a Reply