Four Stars

tESBProviderRequest/Response - Job only uses soap:body - How to add header

Hi there,

 

i am not getting namespaces in the <soap:Envelope> tag in the output of my tESBProviderResponse. I assume it is a newbie-question, but i was not able to solve the problem by google, so i hope you help me. 

 

What have i done so far?

 Created a service out of an existing WSDL and 

assigned it to a simple job:

tESBProviderRequest -> tXMLMap -> tESBProviderResponse

It is working! I can send a request with SoapUI and i am getting a response.

 

So whats the problem?

 I need my output to start like this:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
...
 But my output is actually looking like that:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
...
The payload my Job is working with does not contain the <soap:Envelope> tag, it only contains the body of the Soap-Message. The globalMap element "tESBProviderRequest_1_HEADERS_SOAP" contains an empty array.

 

This is how the input starts:

(edit: i can not modify this incoming XML)

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
...
  

 So how do i get access to these parts of the Request/Response?

 I guess i have to use the WSDL Editor to define any properties or extensions that will carry the information i am missing. Can somebody explain me how to do that, or has any helpfull examples?

 

Thanks in advance

 

5 REPLIES
Five Stars

Re: tESBProviderRequest/Response - Job only uses soap:body - How to add header

Put your XML inside the " ". Replace any XML strings that have " with '

You may not even need the header

Four Stars

Re: tESBProviderRequest/Response - Job only uses soap:body - How to add header

Thank you for your answer jcruie.

I forgot to mention: I can not modify the incoming XML. The input and output is strictly set. So i have to create an output like shown in the example. 

Five Stars

Re: tESBProviderRequest/Response - Job only uses soap:body - How to add header

I'm sure you have reasons for this, java and .net strings are treated differently

you may know .net requires double quotes for start of string and end of string and when there are double quotes in the string you need to add more quotes to 'balance" it

in java you can replace quotes inside strings with single quotes

This has worked for me

Four Stars

Re: tESBProviderRequest/Response - Job only uses soap:body - How to add header

I think we missunderstood somehow, and try to explain it a bit different. 

 

When i create a new project in ESB Studio, and create an "empty" WSDL with an easy job

tESBProviderRequest -> tESBProviderResponse 

then i get an output like the one you can see in the screenshot.

 

Where in the studio can i configure the outcoming namespaces in the first line?

I only found options to add namespaces within the body.

 

SoapUI-Example.PNG

Five Stars

Re: tESBProviderRequest/Response - Job only uses soap:body - How to add header

api.PNG

Have you tried this?