Example: Enhancement to Call Latest Version of a Third-Party Service

This section provides an example of the process for creating a version of a JD Edwards EnterpriseOne business service that consumes a third-party web service.

In this example, a JD Edwards EnterpriseOne consumer business service calls a third-party service for weather forecast. Originally, the web service used only a zip code as input, but now it accepts city and state, too. The consumer business service is J8500001.

Use these steps to create a version of the internal business service and the published business service that calls it:

  1. Create a new version of the value object to include the new fields; for example:

    Create a copy of GetWeatherInput and name it GetWeatherInputV2.

  2. Within the WeatherProcessor class, create a copy of the method getWeather and name it getWeatherV2.

  3. Use the endpoint of the new version of the weather forecast service to create a new proxy for the service, and name the new proxy ProxyV2.

  4. In the new getWeatherV2 method, change the code to call the method from the new proxy, ProxyV2.

  5. To support either version of the service, create processing options or system settings that indicate that city and state can be used.

  6. Enhance the JD Edwards EnterpriseOne applications and business function to follow the settings and allow users to enter city and state, as well as to include the values in the XML generated by the business function that calls the business service.

  7. Modify getWeatherV2 to map the new city and state fields from the value object to the input of the web service call.