REST WebService targetnamespace XSD and output XML differ

Hi,

We are required to consume a REST web service. After talking to SAP support this is what they say.

"For example, in your WADL, the expected parent element of the results is ‘Extract’. However, the web-service is returning ‘ns7:Extract’.

The WADL has grammar tag that’s referencing the primary XSD with multiple targetNamespace.

In the above elements example with the first XSD its referenced as

<xsd:schema targetNamespace=“http://root/1.0” xmlns:c=“http://root/1.0
xmlns:a=“http://root/a/1.0” xmlns:bf=“http://root/b/1.0
xmlns:d=“http://root/d/1.0” xmlns:xsd=“http://www.w3.org/2001/XMLSchema
xmlns:n=“http://testing/proxy/xsd/2.0” xmlns:s=“http://testing/structures/2.0” xmlns:n=“http://testing/n/2.0
xmlns:j=“http://testing/domains/jxdm/4.1” xmlns:jxb=“http://java.sun.com/xml/ns/jaxb”>

Without making any changes to XSD’s or WADL when i am importing the WADL in datastore its parsing successfully and can see the same root element returned as ‘Extract’.

When accessing the same END point through a browser the XML file starts with


<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns7:Extract xmlns:ns1="http://testing/structures/2.0" xmlns:ns2="http://testing/form/2.0" xmlns:ns3="http://testing/domains/4.1" xmlns:ns4="http://root/a/1.0" xmlns:ns5="http://root/b/1.0" xmlns:ns6="http://root/d/1.0" xmlns:ns7="http://root/1.0"><ns7:Case [/b]

When running the ETL job its failing with following error:

I am guessing that at the point when the REST Web Service is invoked the Response from Web Service is returning the XML file as

while the layout in Query transform the same root Element is defined as Extract and hence the XML Parser failed error.

Can anyone recommend what might be the issue here? Did anyone encounter these namespace issues? In short the targetnamespace in XSD is different to the XML output response from Web service.

Regards,
Farha


Farha (BOB member since 2014-03-05)