Consuming SOAP 1.1 WebService using Telnet
-
Hi guys! I need to consume a WebService using the SOAP 1.1 standard via Telnet in Windows, but I´m getting a "Bad Request (Invalid Verb)" response. The request is this:
POST /WS_PRU_PRODUCTO_76/ws_initialize.asmx HTTP/1.1
Host: opnt08
Content-Type: text/xml; charset=utf-8
Content-Length: 510
SOAPAction: "OpenSystems.WebServices.UI/INITIALIZE_WS"<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
soap:Header
<AuthenticationHeader xmlns="OpenSystems.WebServices.UI">
<User>*******</User>
<Password>*******</Password>
<Instance>********</Instance>
</AuthenticationHeader>
</soap:Header>
soap:Body
<INITIALIZE_WS xmlns="OpenSystems.WebServices.UI" />
</soap:Body>
</soap:Envelope>So, I telnet the host, paste the request, but even before finishing pasting, the response arrives. Here's the output produced by the Telnet session:
POST /WS_PRU_PRODUCTO_76/ws_initialize.asmx HTTP/1.1
Host: opnt08
Content-Type: text/xml; charset=utf-8
Content-Length: 510
SOAPAction: "OpenSystems.WebServices.UI/INITIALIZE_WS"<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/en
velope/">
soap:Header
<AuthenticationHeader xmlns="OpenSystems.WebServices.UI">
<User>*******</User>
<Password>*******</Password>
<Instance>********</Instance>
</AuthenticationHeader>
</soap:Header>
soap:Body
<INITIALIZE_WS xmlns="OpenSystems.WebServices.UI/INITIALI
quest
Date: Thu, 24 Mar 2011 01:05:48 GMT
Server: Microsoft-IIS/6.0Z
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0_WS"
Content-Type: text/html
Date: Thu, 24 Mar 2011 01:05:48 GMT
Connection: close/
Content-Length: 35<h1>Bad Request (Invalid Verb)</h1>>
C:\Documents and Settings\cpantoja>
C:\Documents and Settings\cpantoja> </soap:Body>
The syntax of the command is incorrect.
C:\Documents and Settings\cpantoja></soap:Envelope>this guy