Consuming an External Web Service in SAP CRM, Part Two
In Part One of this article series, we created a consumer proxy to call a web service to display weather data. Now we can use the web service to provide additional functionality in the CRM Web UI by adding weather information to an account’s address view.
Because there can be some work involved in building the request and unpacking the response in the service call, it is a good practice to write another function module to call the proxy object. The input to ourZZGETWEATHER function module will be a zip code string, and the output will be a string containing the current weather details for that zip code.
In the implementation class of the CURRENTWEATHER context node add a new attribute that refers to the context class implementation. We will use this attribute to access the zip code from the ZBUILADDRESScontext node.
Post a Comment