canoo webtest json

377 Views Asked by At

I'm trying to test my rest services on Jboss 7.1 with canoo webtest. Below is the request. I'm not able to pass the json content to the server. However the same works with curl scripts. When i print the request object it comes as blank in my service. Tried with soapAction true/false too but nothing works out. Any suggestions please."

        <config host="localhost"
            port="8080"
            protocol="http">
            <header name="USEIR_ID" value="myusername"/>
            <header name="USER_PASSWORD" value="mypassword"/>
            <header name="Content-type" value="application/json"/>
         </config>
        <invoke method="post" url="/service/createPackage/getPackage" description="get package status"
            content='{signature:{applicationId:100,subInvId:2664}}' soapAction="true">
         </invoke>
1

There are 1 best solutions below

0
On

I was able to solve this problem. The solution was the in the invoke tag. The method="post" should be set to "POST" (all caps).