WSO2 ESB - How to get and set cookies in WSDL calls in -
i utilize wso2 esb , want connect 2 web services - on timer pull info 1 service , force another.
the problem 1 of services authenticates callers cookies. first need phone call getsession method username , password. response phone call sets cookie. cookie create other calls.
i couldn't find anywhere in documentation, how can cookie result of 1 phone call , set subsequent call. @ achievable? if - how?
here sequence code:
<sequence xmlns="http://ws.apache.org/ns/synapse" name="samplename" trace="enable"> <payloadfactory media-type="xml"> <format> <envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <body> <getsessionwithcredentials xmlns="blabla"> <user>bla</user> <password>bla</password> </getsessionwithcredentials> </body> </envelope> </format> </payloadfactory> <call> <endpoint key="conf:/tracker"></endpoint> </call> <payloadfactory media-type="xml"> <format> <gettrackinglist xmlns="blabla"></gettrackinglist> </format> </payloadfactory> <property xmlns:ns="http://org.apache.synapse/xsd" name="cookie" expression="$trp:cookie"></property> <call> <endpoint key="conf:/tracker"></endpoint> </call> <log level="full"></log> </sequence>
thanks lot
get cookie header : <property name="cookie" expression="$trp:cookie"/>
if want 1 cookie , it's value, utilize xpath look 'substring' exemple
set cookie header value jsessionid=1 : <property name="cookie" value="jsessionid=1" scope="transport"/>
cookies wsdl wso2 wso2esb
No comments:
Post a Comment