header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
January 08, 2009, 09:52:55 pm
Username: Password:
Login with username, password and session length

Forgot your password?
 
Latest posts of: ind
Welcome, Guest. Please login or register.
January 08, 2009, 09:52:55 pm
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

  Show Posts
Pages: [1]
1  soapUI / soapUI / SOAP XML Parsing with Groovy. on: July 27, 2007, 10:31:34 am
Hi,

Here is my SOAP Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
   <soapenv:Header/>
   <soapenv:Body>
      <web:GetUKLocationByPostCode>
         <!--Optional:-->
         <web:PostCode>33</web:PostCode>
    <web:county>Manipal</web:county>
      </web:GetUKLocationByPostCode>
   </soapenv:Body>
</soapenv:Envelope



// //I need to get the  Postcode value/text.so here is my  Groovy Snippet To get the  Postcode  Text /Value ..But it didn't work...Because Of the  presence of    ":".



def output = ""
def rootNode = new XmlSlurper().parseText(xml)

rootNode.each {
  output += it.text().trim()
}
log.info(output)
log.info(rootNode.soapenv:Envelope.soapenv:Header.soapenv:Body.web:GetUKLocationByPostCode.web:PostCode.text())

But the same  code works fine with the Normal XML (i.e, Doesn't contain ":" ).
So, how to get  the Postcode.

Regards,
Franky.
2  soapUI / soapUI / Re: handling session in response on: July 27, 2007, 06:40:18 am
thanks for the prompt response.
i have tried with your code. but null value only it passes.

i have used this groovy code:
-------------------------------------
def step = testRunner.testCase.getTestStepByName( "GetUKLocationByPostCode - Request 1" )
def a = step.getPropertyValue( "//web:GetUKLocationByPostCode/web:PostCode" )
log.info(a)

the response i got is :

Fri Jul 27 11:07:11 IST 2007:INFO:null

the value is null.

thanks!!!
ind


3  soapUI / soapUI / Re: handling session in response on: July 26, 2007, 12:14:24 pm
thanks,

in case if i want to get a node value in request/response....how do i do that

request
----------
 <web:GetUKLocationByPostCode>
         <!--Optional:-->
         <web:PostCode>33</web:PostCode>
      </web:GetUKLocationByPostCode>

response
------------
<GetUKLocationByPostCodeResponse xmlns="http://www.webserviceX.NET">
         <GetUKLocationByPostCodeResult><![CDATA[<NewDataSet>
  <Table>
    <Town>Banavie</Town>
    <County>Highland</County>
    <PostCode>PH33</PostCode>
  </Table>

how to get country or postcode in response or web:PostCode in request
in groovy

thanks
ind

4  soapUI / soapUI / Re: handling session in response on: July 26, 2007, 10:21:03 am
hi all,

here is my SOAP response after i hit my login

<userlogin>
<action>success</action>
<sessionid>123asdf</sessionid>
</userlogin>

how to get the value of session id node ...

thanks
ind
5  soapUI / soapUI / handling session in response on: July 26, 2007, 10:17:31 am
Hi all,

I have a SOAP request for Login and i am getting proper response for the user credentials. Now in the SOAP response the session id(<session Id>)node is passed to it.

I need to get the value of the session id from the response.so that i can use those values for next coming request.

thanks
ind

6  soapUI / soapUI / log message on: July 25, 2007, 08:16:44 am
hi all,

i have just created a groovy script and i want to see the value for that.
how to read the value resulting from log information.

i have used,
def items = holder.getNodeValues( "//clientSession::*")
for (item in items)
{
log.info( item )
}

where to view the log info that holds the item value. i need to get the values of clientSession node and also suggest me that the above code snippet is correct?

thanks
ind


thanks
Pages: [1]


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header