304 views

Description

An incorrect SOAP response message is generated when ElementFormDefault="unqualified". This is seen when the SOAP response does not state which table the record should be inserted into.

For instance, a SOAP response should contain a value such as this:

<n:getKeysResponse xmlns:n=http://www.service-now.com/incident>
<sys_id>005ae3231b203000f1129141be0713cf..... omitted ....</sys_id>
<count>216</count>
</getKeysResponse>

However, the following is seen:

<n:getKeysResponse>
<sys_id>005ae3231b203000f1129141be0713cf..... omitted ....</sys_id>
<count>216</count>
</getKeysResponse>

Steps to Reproduce

Make sure glide.wsdl.schema.UnqualifiedElementFormDefault=true in Web Services Properties


Use SOAP-UI to invoke getKeys from incident.do?WSDL

You would get following soap response: 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body> 
<getKeysResponse> 
<sys_id>005ae3231b203000f1129141be0713cf..... omitted ....</sys_id> 
<count>216</count> 
</getKeysResponse> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 


The problem is that getKeysResponse namespace is incorrectly omitted. 

What should be done is the global element getKeysResponse should be namespace-qualified and the local namespace should not be qualified since WSDL document defined ElementFormDefault="unqualified"
http://www.w3.org/TR/xmlschema-0/#NS 

This is what it should look like: 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body> 
<n:getKeysResponse xmlns:n=http://www.service-now.com/incident>
<sys_id>005ae3231b203000f1129141be0713cf..... omitted ....</sys_id> 
<count>216</count> 
</getKeysResponse> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope>

Workaround

Set the property glide.wsdl.schema.UnqualifiedElementFormDefault to false.


Related Problem: PRB576662

Seen In

Aspen Patch 2
Aspen Patch 6
Eureka Patch 6

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2015-11-09 11:26:54
Published:2013-09-09