Re: POST REST WebService in jmeter

2011-09-08 Thread eniveld
Thanks for the tip sebb - I went back and tried to get the SOAP/XML-RPC
element working in my REST test case (I earlier couldn't get it working),
and this time I got it working.  Possibly the reason it didn't work before
is that it doesn't seem to pick up the HTTP request defaults.  Guess that is
by design?

--
View this message in context: 
http://jmeter.512774.n5.nabble.com/POST-REST-WebService-in-jmeter-tp4778905p4782721.html
Sent from the JMeter - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



RE: POST REST WebService in jmeter

2011-09-07 Thread Ray Trejo
Try the HTTP Request HTTPClient vs the regular HTTP Request Sampler.  I had a 
similar issue with the HTTP Request and REST.

Ray

-Original Message-
From: testerinCO [mailto:cmola...@comcast.net] 
Sent: Wednesday, September 07, 2011 10:19 AM
To: jmeter-user@jakarta.apache.org
Subject: POST REST WebService in jmeter

I have to test some REST web services and I'm using the POSTER add on tool
(Firefox).  I'm successful running the services via the tool, but I'm not
able to get a POST to work in jmeter using the HTTP Request sampler.

Here are the parameters I input into the POSTER tool
in the header:
Name   Value
Authorization
child:1251829861345:95c4999b38661c7d450a0d58379b28fb

in the content to send section I added the following string:
{"title":"test","description":"this is a test"}

How can I send the authorization (header) and string (content to send) in
jmeter?  
I added the authorization into the "send parameters with the request"
section.
When I attempted to add the string into the section "send parameters with
the request" into the name column leaving the value null or the other way
around, I always get a 401 error:  2011/09/07 09:07:13 ERROR -
jmeter.protocol.http.sampler.HTTPJavaImpl: readRespo
nse: java.io.IOException: Server returned HTTP response code: 401 for URL:
http:
//blogsweb.dmz.arch.myoffice.com/blogs/blog/new.json/

When I use the POSTER add on tool, it returns code 201 as expected.

Can somebody help.

Thanks

--
View this message in context: 
http://jmeter.512774.n5.nabble.com/POST-REST-WebService-in-jmeter-tp4778905p4778905.html
Sent from the JMeter - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org

This email may include confidential information. If you received it in error, 
please delete it.


-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



Re: POST REST WebService in jmeter

2011-09-07 Thread sebb
On 7 September 2011 17:37, David Levine  wrote:
> I just use a normal HTTP Request with Method=POST, and specify a file for
> the XML contents to send.  Wish I could embed the XML contents in the JMeter
> test script instead of putting it in a separate file, but that's worked

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#SOAP/XML-RPC_Request

Allows XML as the body.

> great for testing my RESTful service (built using Jersey).
>
> D
>
> On Wed, Sep 7, 2011 at 9:34 AM, Bruce Ide  wrote:
>
>> I would swear that I've used the SOAP request for that in the past. My
>> service wanted a post in XML format, but it doesn't seem to provide a WSDL
>> or anything I'd normally associate with SOAP. If your service wants some
>> XML, I'd suggest giving that a try.
>>
>> --
>> Bruce Ide
>> flyingrhenqu...@gmail.com
>>
>

-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



Re: POST REST WebService in jmeter

2011-09-07 Thread Deepak Shetty
>I added the authorization into the "send parameters with the request"
section.
authorization is a header , not a parameter. - this will  cause the 401
error - because your request is not "authorized"
Typically you have to use the HTTP Authorization manager , but it did not
AFAIK support custom schemes like the one you are using


regards
deepak

On Wed, Sep 7, 2011 at 8:19 AM, testerinCO  wrote:

> I have to test some REST web services and I'm using the POSTER add on tool
> (Firefox).  I'm successful running the services via the tool, but I'm not
> able to get a POST to work in jmeter using the HTTP Request sampler.
>
> Here are the parameters I input into the POSTER tool
> in the header:
> Name   Value
> Authorization
> child:1251829861345:95c4999b38661c7d450a0d58379b28fb
>
> in the content to send section I added the following string:
> {"title":"test","description":"this is a test"}
>
> How can I send the authorization (header) and string (content to send) in
> jmeter?
> I added the authorization into the "send parameters with the request"
> section.
> When I attempted to add the string into the section "send parameters with
> the request" into the name column leaving the value null or the other way
> around, I always get a 401 error:  2011/09/07 09:07:13 ERROR -
> jmeter.protocol.http.sampler.HTTPJavaImpl: readRespo
> nse: java.io.IOException: Server returned HTTP response code: 401 for URL:
> http:
> //blogsweb.dmz.arch.myoffice.com/blogs/blog/new.json/
>
> When I use the POSTER add on tool, it returns code 201 as expected.
>
> Can somebody help.
>
> Thanks
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/POST-REST-WebService-in-jmeter-tp4778905p4778905.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
>
>


Re: POST REST WebService in jmeter

2011-09-07 Thread David Levine
I just use a normal HTTP Request with Method=POST, and specify a file for
the XML contents to send.  Wish I could embed the XML contents in the JMeter
test script instead of putting it in a separate file, but that's worked
great for testing my RESTful service (built using Jersey).

D

On Wed, Sep 7, 2011 at 9:34 AM, Bruce Ide  wrote:

> I would swear that I've used the SOAP request for that in the past. My
> service wanted a post in XML format, but it doesn't seem to provide a WSDL
> or anything I'd normally associate with SOAP. If your service wants some
> XML, I'd suggest giving that a try.
>
> --
> Bruce Ide
> flyingrhenqu...@gmail.com
>


Re: POST REST WebService in jmeter

2011-09-07 Thread Bruce Ide
I would swear that I've used the SOAP request for that in the past. My
service wanted a post in XML format, but it doesn't seem to provide a WSDL
or anything I'd normally associate with SOAP. If your service wants some
XML, I'd suggest giving that a try.

-- 
Bruce Ide
flyingrhenqu...@gmail.com


POST REST WebService in jmeter

2011-09-07 Thread testerinCO
I have to test some REST web services and I'm using the POSTER add on tool
(Firefox).  I'm successful running the services via the tool, but I'm not
able to get a POST to work in jmeter using the HTTP Request sampler.

Here are the parameters I input into the POSTER tool
in the header:
Name   Value
Authorization
child:1251829861345:95c4999b38661c7d450a0d58379b28fb

in the content to send section I added the following string:
{"title":"test","description":"this is a test"}

How can I send the authorization (header) and string (content to send) in
jmeter?  
I added the authorization into the "send parameters with the request"
section.
When I attempted to add the string into the section "send parameters with
the request" into the name column leaving the value null or the other way
around, I always get a 401 error:  2011/09/07 09:07:13 ERROR -
jmeter.protocol.http.sampler.HTTPJavaImpl: readRespo
nse: java.io.IOException: Server returned HTTP response code: 401 for URL:
http:
//blogsweb.dmz.arch.myoffice.com/blogs/blog/new.json/

When I use the POSTER add on tool, it returns code 201 as expected.

Can somebody help.

Thanks

--
View this message in context: 
http://jmeter.512774.n5.nabble.com/POST-REST-WebService-in-jmeter-tp4778905p4778905.html
Sent from the JMeter - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org