Child pages
  • Web Services-Testing Services with Terminal
Skip to end of metadata
Go to start of metadata

You can test your services using the telnet feature in Terminal. You'll need to know your service address and basic calls.

Open Terminal and type telnet and your server address and port:

telnet 80

Then quickly paste the following text with your service specifics in place of these generic names:

 POST /Apps/WebObjects/appName.woa/ws/ServiceName HTTP/1.0
 Content-Type: text/html; charset=utf-8
 Content-Length: 547
 SOAPAction: "OperationName"
 <?xml version="1.0" encoding="UTF-8" ?>
 <SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="">
     <ns0:OperationName xmlns:ns0="http://DefaultNamespace" SOAP-ENV:encodingStyle="">
       <inParameter1 xsi:type="xsd:string">49464</inParameter1>
       <inParameter2 xsi:type="xsd:int">10</inParameter2>

Of course this is just an example but you can get the idea that with the soap wrapper and proper naming you can user terminal for a soap request. The result will appear in the terminal window as well (showing you if your service works and what it returns).

  • No labels