[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

http_url_post Question



   Hi,
   I'm using http_url_post  to consume a Web Service with the following
   code:
   SOAP =


     '<?xml version="1.0" encoding="utf-8"?>'
    +'<soap:Envelope
   xmlns:xsi="[1]http://www.w3.org/2001/XMLSchema-instanc
    +'
   xmlns:xsd="[2]http://www.w3.org/2001/XMLSchema";'
    +'
   xmlns:soap="[3]http://schemas.xmlsoap.org/soap/envelope/";>'
    +'  <soap:Body>'
    +'    <Punteros_XML
   xmlns="[4]http://www.gobernacion.gob.hn/'
    +'WS_Punteros_Citas/Punteros" />'
    +'  </soap:Body>'
    +'</soap:Envelope>';

    rc = http_url_post(

   '[5]http://172.30.7.2/WS_Punteros_Citas/Punteros.asmx'
               //    +'/Punteros_XML'
                      : %addr(SOAP)
                      : %len(SOAP)
                      : '/tmp/PunterosCitas.soap'
                      : HTTP_TIMEOUT
                      : HTTP_USERAGENT
                      : 'text/xml'
                      :
   '[6]http://www.gobernacion.gob.hn/WS_Punteros_Citas'
                     +'/Punteros/Punteros_XML');

   I got an error message, because the SOAPAction is getting truncated.
   as you can see, the SOAPAction  is  greater than  64  characters and
   it gets truncated when I execute the program, as you can see in the
   httpapi_debug.txt file attached. I was looking the member HTTPAPI_H
   specifically  "http_url_post" procedure and I notice that
   the"peSOAPAction" field is 64 characters in legth. I changed to 84
   there and in the HTTPAPIR4,   but make not diference,  can someone
   help me.
   Thanks,

   --
   Jeffreehy Talavera Díaz
   Consultor Especialista
   S390, iSeries & Open Systems

References

   1. http://www.w3.org/2001/XMLSchema-instanc
   2. http://www.w3.org/2001/XMLSchema
   3. http://schemas.xmlsoap.org/soap/envelope/
   4. http://www.gobernacion.gob.hn/
   5. http://172.30.7.2/WS_Punteros_Citas/Punteros.asmx
   6. http://www.gobernacion.gob.hn/WS_Punteros_Citas
HTTPAPI Ver 1.13.1 released 2006-01-03

New tables set, ASCII=QTCPASC. EBCDIC=QTCPEBC
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /WS_Punteros_Citas/Punteros.asmx HTTP/1.1
Host: 172.30.7.2
User-Agent: http-api/1.14
Content-Type: text/xml
SOAPAction: http://www.gobernacion.gob.hn/WS_Punteros_Citas/Punteros/Puntero
Expect: 100-continue
Content-Length: 335


recvresp(): entered
HTTP/1.1 100 Continue
Via: 1.1 MIGRA-ISA


SetError() ¬13: HTTP/1.1 100 Continue
senddoc(): entered
|<?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:Body>    <Punteros_XML xmlns="http://www.gobernacion.gob.hn/WS_Punteros_Citas/Punteros"; />  </soap:Body></soap:Envelop

recvresp(): entered
HTTP/1.1 500 Internal Server Error.
Connection: Keep-Alive
Content-Length: 517
Date: Tue, 01 Apr 2008 21:17:40 GMT
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private


SetError() ¬13: HTTP/1.1 500 Internal Server Error.
recvdoc parms: identity 517
recvdoc(): entered
SetError() ¬0:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Server did not recognize the value of HTTP Header SOAPAction: http://www.gobernacion.gob.hn/WS_Punteros_Citas/Punteros/Puntero.</faultstring>
      <detail />
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
SetError() ¬13: HTTP/1.1 500 Internal Server Error.
http_close(): entered

   #[1]alternate

   Punteros

   Click [2]here for a complete list of operations.

Punteros_XML

Test

   The test form is only available for requests from the local machine.

SOAP

   The following is a sample SOAP request and response. The placeholders
   shown need to be replaced with actual values.
POST /WS_Punteros_Citas/Punteros.asmx HTTP/1.1
Host: 172.30.7.2
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.gobernacion.gob.hn/WS_Punteros_Citas/Punteros/Punteros_
XML"

<?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:Body>
    <Punteros_XML xmlns="http://www.gobernacion.gob.hn/WS_Punteros_Citas/Punter
os" />
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?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:Body>
    <Punteros_XMLResponse xmlns="http://www.gobernacion.gob.hn/WS_Punteros_Cita
s/Punteros">
      <Punteros_XMLResult>string</Punteros_XMLResult>
    </Punteros_XMLResponse>
  </soap:Body>
</soap:Envelope>

References

   1. http://172.30.7.2/WS_Punteros_Citas/Punteros.asmx?disco
   2. http://172.30.7.2/WS_Punteros_Citas/Punteros.asmx
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------