My frustration is at an end! Having spent numerous hours trying to understand why my web service call refused to return a valid XML document, I finally tracked the issue down to the most common denominator: network access! That’s rather odd, considering a standard ABAP proxy generated from a WSDL is able to connect and transmit information. When coding the web service call in an ABAP program the situation is slightly different, though. I was able to get a SAP system running on a stand-alone machine on my home network. No proxies or firewalls interceding, the connection worked almost immediately. Some issues with the XML and SOAP envelope contained in the call where quickly resolved. The key is to ensure the following type of code is not included in the program:
* proxy server authentication
CALL METHOD http_client->authenticate
EXPORTING
proxy_authentication = ‘X’
username = user
password = password.
Removing the call to the authenticate method is the first step, whether the SAP system is behind a proxy or not. The easiest way of verifying that the connection cannot be established is to create a new connection of type G in transaction SM59. The URL is the destination. A click on the Test connection button should result in a failure. It seems that the global proxy settings in transaction SICF have no effect.
The overall solution is simple, yet not easy to implement in a corporate environment. Ideally, a change to the ISA server configuration is required to permit the WAS full access to the Internet. If that’s not possible, an easy solution in the Microsoft Server environment is the installation of the Firewall Client Tool. Browsing the Internet should be possible from the server hosting the Netweaver WAS and the relevant entries for the proxy made in Internet Explorer. Then, simply make the relevant entry in the Firewall Client.
Connection successful!
Now, on the unchartered territory of XSLT transformations to convert XML to flat ABAP structures…