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

WebService - Problems with HTTPAPI



   Hello,



   I have some problems with cosuming a web service on my system i,
   running on V5.4.



   If I test the service with SoapUI, it works. If I use a little
   test-program getartti, I don't receive the same data, than recieved
   with SoapUI.



   In the attached word-document, you will find the test with SoapUI. The
   little program and the data recieved, I have attached too, also the
   httpapi_debug.txt



   What am I doing wrong?



   Thank you in advance.



   Best regards



   Jan

   ______________________________________________________
   Jan Grove Vejlstrup
   WEMAG Consulting
   Bernstrasse 99, Postfach
   CH-3122 Kehrsatz

   Tel.: + 41 31 960 36 36
   Fax: + 41 31 960 36 37
   Mail: [1]jgv@xxxxxxxx

References

   1. mailto:jgv@xxxxxxxx

Attachment: soapenv.doc
Description: MS-Word document

     H DFTACTGRP(*NO) actgrp(*new) bnddir('HTTPAPI')

      *
      /copy HTTPAPI_H
      *
      *
     d getArtT         PR                  ExtPgm('GETARTT')
     d  p0ArtNrAlfa                   8a     const
     d getArtT         PI
     d  p0ArtNrAlfa                   8a     const

     d VARYINGDATAOFFSET...
     d                 c                     const(2)
     d SOAP            s           1024a     varying
     d rc              s             10i 0
     d artText         s             30a     varying
     d intArtNr        s              8a

      /free

        intArtNr = p0ArtNrAlfa;

        SOAP=  '<soapenv:Envelope xmlns:soapenv='
             + '"http://schemas.xmlsoap.org/soap/envelope/";'
             + 'xmlns:xsd="http://getat.wsbeans.iseries/xsd";>'
             + '   <soapenv:Header/>'
             + '   <soapenv:Body>'
             + '      <xsd:getat>'
             + '         <!--Optional:-->'
             + '         <xsd:param0>'
             + '            <!--Optional:-->'
             + '            <xsd:_P0ARTNR>' + intArtNr + '</xsd:_P0ARTNR>'
             + '            <!--Optional:-->'
             + '            <xsd:_P0TEXT>?</xsd:_P0TEXT>'
             + '         </xsd:param0>'
             + '      </xsd:getat>'
             + '   </soapenv:Body>'
             + '</soapenv:Envelope>';


           http_setCCSIDs(1208 : 0);
           http_debug(*ON);

           rc = http_post('http://chwemag1:10010/web/services/GETAT'
                            : %addr(SOAP) + VARYINGDATAOFFSET
                            : %len(SOAP)
                            : '/jgvtmp/arttext.txt'
                            : HTTP_TIMEOUT
                            : HTTP_USERAGENT
                            : 'text/xml; charset=UTF-8'
                            : 'urn.getat');

           if (rc <> 1);
             http_crash();
           endif;


           *inlr = *on;

      /end-free
HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V5R4M0

http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: WEMAG.ch
DNS server found: 195.186.1.110
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /web/services/GETAT HTTP/1.1
Host: chwemag1:10010
User-Agent: http-api/1.23
Content-Type: text/xml; charset=UTF-8
SOAPAction: urn.getat
Expect: 100-continue
Content-Length: 442


recvresp(): entered
HTTP/1.1 100 Weiter


SetError() #13: HTTP/1.1 100 Weiter
senddoc(): entered
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://getat.wsbeans.iseries/xsd";>   <soapenv:Header/>   <soapenv:Body>      <xsd:getat>         <!--Optional:-->         <xsd:param0>            <!--Optional:-->            <xsd:_P0ARTNR>00000090</xsd:_P0ARTNR>            <!--Optional:-->            <xsd:_P0TEXT>?</xsd:_P0TEXT>         </xsd:param0>      </xsd:getat>   </soapenv:Body></soapenv:Envelope>
recvresp(): entered
HTTP/1.1 500 OK
Date: Fri, 22 May 2009 08:16:20 GMT
Server: Lotus Expeditor Web Container/6.1
Content-Length: 550
Connection: close
Content-Type: text/xml; charset=UTF-8
Content-Language: de-CH, de-CH


SetError() #13: HTTP/1.1 500 OK
recvdoc parms: identity 550
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing";><wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv:Fault><faultcode></faultcode><faultstring>javax.xml.stream.XMLStreamException: Nach dem Elementtyp "soapenv:Envelope" müssen Attributspezifikationen, "&gt;" oder "/&gt;" folgen.</faultstring><detail></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
SetError() #13: HTTP/1.1 500 OK
http_close(): entered
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing";><wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv:Fault><faultcode></faultcode><faultstring>javax.xml.stream.XMLStreamException: Nach dem Elementtyp "soapenv:Envelope" müssen Attributspezifikationen, "&gt;" oder "/&gt;" folgen.</faultstring><detail></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------