Skip to Content

Realizing Web Services Inter-Operability using SAP PI 7.1 – Part III

Clue No.5. The WSDL should be accessible anonymously over a URL

In the last Realizing Web Services Inter-Operability using SAP PI 7.1 – Part II we discussed that the default WSDL generated from Sender Agreement is not WS-I compliant. We have to make it compliant by removing  the wsp:Policy tag. The next step is to make this modified WSDL accessible anonymously via HTTPS. I shall now describe the procedure I used to realize this.

 

  • Create a Service in transaction SICF
  • Configure the log-in parameters ( This will make sure that the caller need not enter credentials ). The user should have role SAP_XI_APPL_SERV_USER assigned to it.  

 

  • Define a handler class. The class should implement the interface IF_HTTP_EXTENSION.  

 

  • Write the logic inside the handler class for returning the custom WSDL as the HTML content. 

 

Now the WSDL can be reached over the URL corresponding to the service. 

Alternately, with PI 7.10 SP11, 7.11 SP6 and all later releases we can provide an anonymous access to the WSDL generated from Sender Agreement. See SAP Note 1466002 for more details. However, this does not take away the efforts to make the WSDL WS-I compliant.

 

Clue No.6. The Web Service should be callable anonymously

The WS client should be able to call the web service without providing any user credentials. The rationale behind this is that the SOA platform itself will take care that only a registered caller calls the web services published and also  that each call is recorded.

It is not possible to disable authentication while using SOAP adapter. The solution is to use Axis framework. Deploy the Axis adapter on the server and change the login stack configured for the message servlet of Axis adapter by going through NWA->Configuration Management->Authentication. Remove all login modules in order to enable web service without login credentials.

 

There are two simple steps in order to propagate the Axis adapter in the Configuration Scenario-

  1. Modify the SOAP communication channel with parameter Transport Protocol = Servlet (Axis)
  2. Update the end point URL in the WSDL by replacing the word ‘SOAP’ with ‘Axis’ ( e.g. https://myhost.mydomain.com:500001/ XIAxisAdapter/MessageServlet?………) and  make this new WSDL accessible via SICF service as described above in Clue 5.

 That’s pretty much of it !  Treasure conquered !!

 The final WSDL is submitted and it is published in the SOA platform. Now it is possible for any application in the landscape to call a PI web service, just like they would call any other web service built using any language, any platform.

 

There might be easier ways to achieve the above steps. Maybe SAP will come up with out-of-the-box methods to achieve these pre-requisites in future. Till then, SAP fans like us will continue to find our ways through the challenges of the heterogeneous landscapes. Happy Exploring !!!

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