Hi All,

I have created an API in ESB 5.0.0 to access a secured SOAP BE service. As
per [1] I have added a dummy header into the paylaod so that my payload
will be as follows.

<payloadFactory media-type="xml">
            <format>
               <soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ser="
http://service.sample.nawaloka.com";>
                  <soapenv:Header>
                     <dummyvalue>12</dummyvalue>
                  </soapenv:Header>
                  <soapenv:Body>
                     <ser:read>
                        <ser:patientId>$1</ser:patientId>
                     </ser:read>
                  </soapenv:Body>
               </soapenv:Envelope>
            </format>
            <args>
               <arg evaluator="xml"
expression="get-property('uri.var.patientid')"/>
            </args>
         </payloadFactory>

My problem now is, when I tried to invoke the API using SOAPUI, it doen't
show any response and the server side, it logs an error as below.

[2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"GET /nawaloka/read/[email protected] HTTP/1.1[\r][\n]"
[2017-11-13 09:30:21,678] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"Accept-Encoding: gzip,deflate[\r][\n]"
[2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"Host: 172.17.0.1:8280[\r][\n]"
[2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"Connection: Keep-Alive[\r][\n]"
[2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
[2017-11-13 09:30:21,679] DEBUG - wire HTTP-Listener I/O dispatcher-3 >>
"[\r][\n]"
[2017-11-13 09:30:21,682] DEBUG - SynapseMessageReceiver Synapse received a
new message for message mediation...
[2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver Received To:
/nawaloka/read/[email protected]
[2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver SOAPAction: null
[2017-11-13 09:30:21,683] DEBUG - SynapseMessageReceiver WSA-Action: null
[2017-11-13 09:30:21,683] DEBUG - Axis2SynapseEnvironment Injecting
MessageContext
[2017-11-13 09:30:21,683] DEBUG - RESTRequestHandler Located specific API:
NawalokaPatientAPI for processing message
[2017-11-13 09:30:21,684] DEBUG - API Processing message with ID:
urn:uuid:9a9121dd-2025-489b-bba7-c4fba5a2eb95 through the API:
NawalokaPatientAPI
[2017-11-13 09:30:21,684] DEBUG - API No matching resource was found for
the request: urn:uuid:9a9121dd-2025-489b-bba7-c4fba5a2eb95
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"HTTP/1.1 404 Not Found[\r][\n]"
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"Date: Mon, 13 Nov 2017 04:00:21 GMT[\r][\n]"
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"Transfer-Encoding: chunked[\r][\n]"
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"Connection: Keep-Alive[\r][\n]"
[2017-11-13 09:30:21,687] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"[\r][\n]"
[2017-11-13 09:30:21,688] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"0[\r][\n]"
[2017-11-13 09:30:21,688] DEBUG - wire HTTP-Listener I/O dispatcher-3 <<
"[\r][\n]"


But it shows a response when I enter a value for patientId parameter as
follows.

 <ser:patientId>[email protected]</ser:patientId>

FYI: patientId should be the patient's e-mail address.

[1] "API gives "SOAP Envelope can not have children other than SOAP Header
and Body" Exception"
-- 


*Buddhimala Ranasinghe *
Software Engineer-Support Team | WSO2
Emil: [email protected]
Mobile:+94771563138
Web:http://wso2.com
[image: https://wso2.com/signature] <https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to