Skip to Content

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 !!!

To report this post you need to login first.

8 Comments

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

        1. Amit Dingorkar Post author
          I have already clarified that this blog is not copied from anywhere.It is based on my own experience.I leave it upto the SAP moderator to take a call, and I am sure they will go by evidences and not by mere allegations..
          (0) 
  1. Anoop Garg
    An interesting set of information. Thanks for sharing!

    @Amit, Do you have a feedback if such single handler class  could be maintained for all custom webservices developed in PI environment or it has to be more specific to each webservice URL?

    Had it been tested & evaluated in real time environment from your side as well?

    Thanks,
    Anoop

    (0) 
    1. Amit Dingorkar Post author
      Thanks Anoop,

      Yes it is tested in realtime environment. I would prefer to have a separate handler class for each WSDL.

      I don’t deny we can parameterize  the link by adding form fields and insert CASE statement inside the code to return different WSDL based on the value. However, I feel that may make the code difficult to compile and manage.

      CHEERS
      Amit

      (0) 

Leave a Reply