BenX
16 years agoContributor
[SOLVED]groovy info from request
Hi!
i have one strange situation.
here is request nr1:
response is ok.
after this i have groovy script.
i can get value from it with:
works OK.
2nd case:
simmilar request like earlier:
response is the same as before.
groovy:
Doesn't work!
why can't i parse value from second request?
i really need help with this one please...
Beno
i have one strange situation.
here is request nr1:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ui="http://ui.ws.mmw.iskratel.si/">
<soapenv:Header/>
<soapenv:Body>
<ui:uiCallMW>
<!--Optional:-->
<!--Optional:-->
<sSessionID>12598504507454b3cf18cb8b94880939522609a3d0773</sSessionID>
<sCmd>get</sCmd>
<!--Optional:-->
<!--Optional:-->
<sTarget>homepage</sTarget>
<xParams><?xml version="1.0" encoding="utf-8"?><params><terminal_ip>192.168.60.61</terminal_ip></params></xParams>
</ui:uiCallMW>
</soapenv:Body>
</soapenv:Envelope>
response is ok.
after this i have groovy script.
i can get value from it with:
def request = context.expand( '${uiCallMW - Request 1#Request#//ui:uiCallMW/sTarget}' )
log.info request
Thu Dec 03 10:31:09 CET 2009:INFO:homepage
works OK.
2nd case:
simmilar request like earlier:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<uiCallMW xmlns="http://ui.ws.mmw.iskratel.si/">
<sSessionID xmlns="">12599180921925f9e46f1fd6745fe9cbe9c24516a70b1</sSessionID>
<sCmd xmlns="">get</sCmd>
<sTarget xmlns="">homepage</sTarget>
<xParams xmlns=""><?xml version="1.0" encoding="utf-8"?><params><terminal_ip>192.168.60.61</terminal_ip></params></xParams>
</uiCallMW>
</soapenv:Body>
</soapenv:Envelope>
response is the same as before.
groovy:
def request = context.expand( '${uiCallMW - Request 1#Request#//ns1:uiCallMW[1]/sTarget[1]}' )
log.info request
Thu Dec 03 10:32:24 CET 2009:INFO:
Doesn't work!
why can't i parse value from second request?

i really need help with this one please...
Beno