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

Help with HTTPAPI "SOAP protocol"



   Hi,
   I'm trying to consume a Web Service using HTTPAPI 1.21 but I'm getting
   an "Missing parameter: idError." I have attached the following files:
   1. DeiErrores Web Service.mht      (Web Service , Browser Interface)
   2. DeiErrores.asmx                         (WSDL)
   3. JETADEI5OS.txt                          (RPG ILE Client Program to
   consume the web service)
   4. DeiRespuesta.soap.txt                (Response file from web
   service provider)  <---------Error
   5. httpapi_debug.txt                       (HTTPAPI debug file)
   if anybody have the time to take a look to this files and give me a
   hand, I will appreciate very much.
   thank you in advance.
   Jeffreehy Talavera
   Consultan
   S390, iSeries & Open Systems
--- Begin Message ---
Title: DeiErrores Web Service


DeiErrores


Click here for a complete list of operations.

GetDescripcion

Test

To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
idError:

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /WebServices/Tributos/DeiErrores.asmx HTTP/1.1
Host: 172.16.23.61
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://dei.gob.hn/FenixWeb/GetDescripcion"

<?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>
    <GetDescripcion xmlns="http://dei.gob.hn/FenixWeb">
      <idError>int</idError>
    </GetDescripcion>
  </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>
    <GetDescripcionResponse xmlns="http://dei.gob.hn/FenixWeb">
      <GetDescripcionResult>string</GetDescripcionResult>
    </GetDescripcionResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /WebServices/Tributos/DeiErrores.asmx HTTP/1.1
Host: 172.16.23.61
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetDescripcion xmlns="http://dei.gob.hn/FenixWeb">
      <idError>int</idError>
    </GetDescripcion>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetDescripcionResponse xmlns="http://dei.gob.hn/FenixWeb">
      <GetDescripcionResult>string</GetDescripcionResult>
    </GetDescripcionResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /WebServices/Tributos/DeiErrores.asmx/GetDescripcion?idError=string HTTP/1.1
Host: 172.16.23.61
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://dei.gob.hn/FenixWeb">string</string>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /WebServices/Tributos/DeiErrores.asmx/GetDescripcion HTTP/1.1
Host: 172.16.23.61
Content-Type: application/x-www-form-urlencoded
Content-Length: length

idError=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://dei.gob.hn/FenixWeb">string</string>

--- End Message ---

Attachment: DeiErrores.asmx
Description: Binary data

     H DFTACTGRP(*NO) BNDDIR('LIBHTTP/HTTPAPI')

     D SAMPLE1         PR                  ExtPgm('SAMPLE1')
     D   Country1                   200A
     D*  longitud                   200I 0 const

     D SAMPLE1         PI
     D   Country1                   200A
     D*  longitud                    10I 0 const


      /copy libhttp/qrpglesrc,httpapi_h

     D Incoming        PR
     D   rate                         8F
     D   depth                       10I 0 value
     D   name                      1024A   varying const
     D   path                     24576A   varying const
     D   value                    32767A   varying const
     D   attrs                         *   dim(32767)
     D                                     const options(*varsize)

     D SOAP            s          32767A   varying
     D rc              s             10I 0
     D rate            s              8F
     D Result          s             10A
     D msg             s             50A
     D wait            s              1A
     D datos           s             10A
     D size            s             10I 0
     D country2        s             10A
     D text            s            255a
      *    rate = %float(value);
     C*                  eval      Country2 = Country1
     C*                  eval      text=m(Country2)
     C*                  eval      text=%trim(Country2)
     C*                  eval      text=%trimr(text)
     C**   text          dsply
      /free


       SOAP =
         '<?xml version="1.0" encoding="iso-8859-1"?>'
        +'<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>'
        +'<GetDescripcion xmlns="http://dei.gob.hn/FenixWeb";>'
        +'<idError>'+'301'+'</idError>'
        +'</GetDescripcion>'
        +'</soap:Body>'
        +'</soap:Envelope>';
        

       rc = http_url_post(
                  'http://172.16.23.61/WebServices/Tributos/DeiErrores.asmx'+
                         '/GetDescripcion'
                         : %addr(SOAP) + 2
                         : %len(SOAP)
                         : '/tmp/DeiRespuesta.soap'
                         : HTTP_TIMEOUT
                         : HTTP_USERAGENT
                         : 'application/x-www-form-urlencoded'
                         : 'http://dei.gob.hn/FenixWeb/GetDescripcion');

       if (rc <> 1);
          msg = http_error();
       else;
         
          msg = 'Result = ' + Result;
       endif;

       *inlr = *on;

      /end-free

     P Incoming        B
     D Incoming        PI
     D   rate                         8F
     D   depth                       10I 0 value
     D   name                      1024A   varying const
     D   path                     24576A   varying const
     D   value                    32767A   varying const
     D   attrs                         *   dim(32767)
     D                                     const options(*varsize)
      /free
          if (name = 'GetDescripcion');
             Result = value;

		        endif;
      /end-free

     P                 E

Missing parameter: idError.
HTTPAPI Ver 1.13.1 released 2006-01-03

http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /WebServices/Tributos/DeiErrores.asmx/GetDescripcion HTTP/1.1
Host: 172.16.23.61
User-Agent: http-api/1.14
Content-Type: application/x-www-form-urlencoded
SOAPAction: http://172.16.23.61/WebServices/Tributos/DeiErrores.asmx?op=GetD
Expect: 100-continue
Content-Length: 341


recvresp(): entered
HTTP/1.1 100 Continue


SetError() ¬13: HTTP/1.1 100 Continue
senddoc(): entered
<?xml version="1.0" encoding="iso-8859-1"?><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><GetDescripcion xmlns="http://dei.gob.hn/FenixWeb";><idError>301</idError></GetDescripcion></soap:Body></soap:Envelope>

recvresp(): entered
HTTP/1.1 500 Internal Server Error
Date: Mon, 21 Jan 2008 22:37:20 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Content-Length: 29


SetError() ¬13: HTTP/1.1 500 Internal Server Error
recvdoc parms: identity 29
recvdoc(): entered
SetError() ¬0:
Missing parameter: idError.

SetError() ¬13: HTTP/1.1 500 Internal Server Error
http_close(): entered
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------