Issue

The issue tends to occur when a REST web service is being called through a job after migrating from Stambia to XDI.
The problem presents itself as a 
`org.xml.sax.SAXException: Error on path` when calling the web service along with a java `NullPointerException`.
The error log indicates an issue with the `URLUtil` class.

Cause

The root cause of the exception is associated with the use of SOAP xDI metadata to handle REST API calls (which was common in Stambia).
When a REST API call is made using a SOAP metadata, it often cannot handle the call efficiently, causing errors.
SOAP and REST are different web service communication protocols, and using them interchangeably can result in issues like this one.

Solution

The recommended approach to resolve this error is to use a REST xDI metadata for making REST API calls. 

Follow the instructions below to resolve this issue.

  1. Reconfigure the existing SOAP metadata and replace it with a REST metadata in the job. The REST metadata is specifically designed to handle REST calls efficiently.
  2. If any mappings have been established using the SOAP metadata, they need to be recreated using REST metadata. 
  3. If there are multiple jobs using REST APIs with SOAP metadata, it is advisable to migrate them to use REST metadata instead. 
  4. Once the metadata changes have been made, apply these changes to the job and then re-run it. If the REST call was the only issue causing the error, the job should now complete successfully. 


Try to always use the appropriate metadata for the specific type of web service call. This will prevent such issues from occurring in the future.