Jump to content
patmandin

Modifying generated SOAP API after WSDL import, to properly handle namespace

Recommended Posts

Hello,

 

After having generated a SOAP API interface, calling it this way does not work, for targeted interface:

 

 <?xml version="1.0"?>
 <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>
     <getLocale xmlns="http://ws.eai.egr/">
       <sessionId>bbc1e217-3e8f-495c-85eb-b44afd4b9e3e</sessionId>
       <withTimeZone>false</withTimeZone>
     </getLocale>
   </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>

 

Comparing with test samples and curl, correct call is:

 

 <?xml version="1.0"?>
 <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>
     <getLocale xmlns="http://ws.eai.egr/">
       <sessionId xmlns="">bbc1e217-3e8f-495c-85eb-b44afd4b9e3e</sessionId>
       <withTimeZone xmlns="">false</withTimeZone>
     </getLocale>
   </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>

 

So i need to clear namespace with xmlns="" for parameters (sessionId and withTimeZone in the example).

 

Is it possible to modify the generated interface to handle this case?

Currently I use the RIO.OnBeforeExecute to modify the SOAP request on the fly.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×