changing the URL template to "/read/{*+*patientid}" resolved the issue.Thanks for the support. Regards, Buddhimala On Mon, Nov 13, 2017 at 11:25 AM, Buddhimala Ranasinghe <[email protected] > wrote: > Hi Thivya, > > Still it doesn't work. I'm getting the same error. > > Regards, > Buddhimala > > On Mon, Nov 13, 2017 at 11:19 AM, Thivya Mahenthirarasa <[email protected]> > wrote: > >> Hi Budhimala, >> >> Apologies for the above. I think the GET method you are having is in the >> name read. Can you try by adding >> <header name="Action" value="urn:readCMedi"/> >> >> On Mon, Nov 13, 2017 at 11:12 AM, Thivya Mahenthirarasa <[email protected]> >> wrote: >> >>> Hi Budhimala, >>> >>> Instead of <resource methods="GET" uri-template="/read/{patientid}"> >>> you need to refine your uri-template as follows since you are sending the >>> parameter via uri. >>> >>> <resource methods="GET" uri-template="/readCMedi/{patientId}"> >>> >>> >>> Hope it would be helpful. >>> >>> Thanks, >>> Thivya >>> >>> On Mon, Nov 13, 2017 at 10:24 AM, Buddhimala Ranasinghe < >>> [email protected]> wrote: >>> >>>> Here is my API configuartion. >>>> >>>> <api xmlns="http://ws.apache.org/ns/synapse" name="NawalokaPatientAPI" >>>> context="/nawaloka"> >>>> <resource methods="GET" uri-template="/read/{patientid}"> >>>> <inSequence> >>>> <property name="Authorization" value="Basic >>>> YnVkZGhpbWFsYTpidWRkaGltYWxhMTIz" scope="transport"/> >>>> <payloadFactory media-type="xml"> >>>> <format> >>>> <soapenv:Envelope xmlns:soapenv="http://schemas. >>>> xmlsoap.org/soap/envelope/" xmlns:ser="http://service.samp >>>> le.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> >>>> <log level="full"/> >>>> <property name="SOAPAction" value="urn:read" >>>> scope="transport"/> >>>> <property name="messageType" value="text/xml" scope="axis2"/> >>>> <property name="ContentType" value="text/xml" scope="axis2"/> >>>> <send> >>>> <endpoint> >>>> <address uri="https://192.168.55.160:94 >>>> 43/services/NawalokaPatientService" format="soap11"/> >>>> </endpoint> >>>> </send> >>>> </inSequence> >>>> <outSequence> >>>> <property name="messageType" value="application/json" >>>> scope="axis2"/> >>>> <send/> >>>> </outSequence> >>>> </resource> >>>> </api> >>>> >>>> On Mon, Nov 13, 2017 at 10:14 AM, Sam Sivayogam <[email protected]> wrote: >>>> >>>>> Seems like your synapse api context and resource definition doesn't >>>>> match with the URL you invoke.Thats why you are getting a error like No >>>>> matching resource. Can you please send your api configurations ? >>>>> >>>>> Thanks, >>>>> Sam >>>>> >>>>> On Mon, Nov 13, 2017 at 9:46 AM, Buddhimala Ranasinghe < >>>>> [email protected]> wrote: >>>>> >>>>>> 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.samp >>>>>> le.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 <+94%2077%20156%203138> >>>>>> 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 >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Sam Sivayogam* >>>>> >>>>> Senior Software Engineer >>>>> Mobile : +94 772 906 439 >>>>> Office : +94 112 145 345 >>>>> *WSO2, Inc. :** wso2.com <http://wso2.com/>* >>>>> lean.enterprise.middleware. >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> *Buddhimala Ranasinghe* >>>> Software Engineer-Support Team | WSO2 >>>> Emil: [email protected] >>>> Mobile:+94771563138 <+94%2077%20156%203138> >>>> 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 >>>> >>>> >>> >>> >>> -- >>> >>> *Thivya Mahenthirarasa* >>> >>> *Software Engineer -Support Team | WSO2* >>> >>> >>> *Email: [email protected] <[email protected]>* >>> >>> *Mobile: +94766461966 <+94%2076%20646%201966> >>> <http://wso2.com/signature>* >>> *Web: http://wso2.com <http://wso2.com>* >>> >> >> >> >> -- >> >> *Thivya Mahenthirarasa* >> >> *Software Engineer -Support Team | WSO2* >> >> >> *Email: [email protected] <[email protected]>* >> >> *Mobile: +94766461966 <+94%2076%20646%201966> <http://wso2.com/signature>* >> *Web: http://wso2.com <http://wso2.com>* >> > > > > -- > > > *Buddhimala Ranasinghe* > Software Engineer-Support Team | WSO2 > Emil: [email protected] > Mobile:+94771563138 <+94%2077%20156%203138> > Web:http://wso2.com > [image: https://wso2.com/signature] <https://wso2.com/signature> > -- *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
