osb

OSB simply copying the request payload into the response


I am new to OSB, I am using OSB 12C.

I have a webservice proxy service. The web service request has 2 parameters and the response has one parameter. The sample request message is below

<soapenv:Envelope   xmlns:soapenv="xxxx">
<soap:Header    xmlns:soap="xxxx">
</soap:Header>
<soapenv:Body>
<v1:MyTestRequest   xmlns:v1="xxx">
<v1:DocumentAuthor>Author</v1:DocumentAuthor>
<v1:DocumentName>Name</v1:DocumentName>
</v1:MyTestRequest>
</soapenv:Body>
</soapenv:Envelope>

I am able to test the proxy service from the SB console. However, the OSB simply copies and request payload into the Response Document and returns.

I was expecting the Response Document to be in the format defined in the WSDL.

Can someone help me understand why OSB simply copies the request payload into the Response Document? Thank you


Solution

  • You need to explicitly set contents of $body variable to change the response, otherwise OSB will just echo your request(request is held in $body).