well..this is my task... i have written a proxy i need to call a webservice ( http://www.webservicex.net/CurrencyConvertor.asmx?WSDL) and get the return value (the currency exchange rate) and pass that value to a class mediator. How could this be done?
Thanks and Regards, M.R.Aaquibah Nashry *Intern, Engineering**| **WSO2, Inc.* Mobile : +94 773946123 Tel : +94 112662541 Email : [email protected] <[email protected]> On Mon, Jun 22, 2015 at 3:08 PM, Sandapa Handakumbura <[email protected]> wrote: > If you can tell me the exact requirement, I can help you with the config. > Using the Payload factory mediator after the Call mediator will not make > any difference for the first web service call. > > What is the request that you're sending to the proxy service? Isn't it > something like this? > > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:web="http://www.webserviceX.NET/"> > <soapenv:Header/> > <soapenv:Body> > <web:ConversionRate> > <web:FromCurrency>AUD</web:FromCurrency> > <web:ToCurrency>LKR</web:ToCurrency> > </web:ConversionRate> > </soapenv:Body> > </soapenv:Envelope> > > If the request has required information Call mediator can send it to the > web service and get the correct response. > > Regards, > Sandapa > > On Mon, Jun 22, 2015 at 2:54 PM, Aaquibah Nashry <[email protected]> wrote: > >> Hi Sandapa, >> I need to call it using the call mediator. >> >> I did the following modifications, >> >> <call> >> <endpoint> >> <address uri=" >> http://www.webservicex.net/CurrencyConvertor.asmx?WSDL"/> >> </endpoint> >> </call> >> <header name="Action" value=" >> http://www.webserviceX.NET/ConversionRate"/> >> <payloadFactory media-type="xml"> >> <format> >> <m0:ConversionRate xmlns:m0="http://www.webserviceX.NET/"> >> <m0:request> >> <m0:FromCurrency>EUR</m0:FromCurrency> >> <m0:ToCurrency>USD</m0:ToCurrency> >> </m0:request> >> </m0:ConversionRate> >> </format> >> <args/> >> </payloadFactory> >> <log level="full"/> >> >> >> >> in the terminal i get the following when i try the proxy using 'try it' >> >> [2015-06-22 14:35:04,184] INFO {SERVICE_LOGGER.SalesForceProxy} - >> Connection = Login to Salesforce ..... >> [2015-06-22 14:35:05,840] INFO {SERVICE_LOGGER.SalesForceProxy} - To: >> http://www.w3.org/2005/08/addressing/anonymous, WSAction: >> http://www.webserviceX.NET/ConversionRate, SOAPAction: >> http://www.webserviceX.NET/ConversionRate, MessageID: >> urn:uuid:67c0e1d0-ac7d-496a-9cac-7779e7370791, Direction: request, >> Envelope: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap=" >> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" >> http://www.w3.org/2001/XMLSchema" xmlns:xsi=" >> http://www.w3.org/2001/XMLSchema-instance"><soap:Body><m0:ConversionRate >> xmlns:m0="http://www.webserviceX.NET/ >> "><m0:request><m0:FromCurrency>EUR</m0:FromCurrency><m0:ToCurrency>USD</m0:ToCurrency></m0:request></m0:ConversionRate></soap:Body></soap:Envelope> >> >> >> Why am i not getting the response from the webservice? >> >> Thanks and Regards, >> >> M.R.Aaquibah Nashry >> *Intern, Engineering**| **WSO2, Inc.* >> Mobile : +94 773946123 >> Tel : +94 112662541 >> Email : [email protected] <[email protected]> >> >> On Mon, Jun 22, 2015 at 2:40 PM, Sandapa Handakumbura <[email protected]> >> wrote: >> >>> Hi Aaquibah, >>> >>> FromCurrency and ToCurrency should be sent in the request. So you can >>> simply invoke the service using a tool like SoapUI. Did you try that option? >>> >>> >>> >>> >>> >>> Regards, >>> Sandapa >>> >>> >>> On Mon, Jun 22, 2015 at 12:11 PM, Aaquibah Nashry <[email protected]> >>> wrote: >>> >>>> Hi, >>>> i am trying to get the current currency exchange rate from EUR to USD >>>> from a webservice. i used a call mediator as follows: >>>> >>>> <call> >>>> <endpoint> >>>> <address uri=" >>>> http://www.webservicex.net/CurrencyConvertor.asmx?WSDL"/> >>>> </endpoint> >>>> </call> >>>> >>>> I need to send the FromCurrency and the ToCurrency to the webservice >>>> and get the rate. How can i do this? >>>> >>>> Also, >>>> how can i store the value returned, in my proxy and then send this >>>> value into a class mediator that i have written. >>>> <class name="mediator.CustomMediator"> >>>> <property name="rate" value="100"/> >>>> </class> >>>> I want to send the rate instead of the value 100 >>>> >>>> >>>> >>>> Please help... >>>> >>>> Thanks and Regards, >>>> >>>> M.R.Aaquibah Nashry >>>> *Intern, Engineering**| **WSO2, Inc.* >>>> Mobile : +94 773946123 >>>> Tel : +94 112662541 >>>> Email : [email protected] <[email protected]> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Sandapa Handakumbura >>> Associate Technical Lead >>> WSO2.Inc. ; http://wso2.com/ >>> M : +94777115866 >>> >> >> > > > -- > Sandapa Handakumbura > Associate Technical Lead > WSO2.Inc. ; http://wso2.com/ > M : +94777115866 >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
