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

RE: 400 Bad Request Debug Log



I went to the debug txt and here it what it says. I have no idea what this means.

HTTP/1.1 400 Bad Request
Date: Mon, 01 Apr 2013 17:00:47 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 2


SetError() #13: HTTP/1.1 400 Bad Request
recvresp(): end with 400
recvdoc parms: identity 2
header_load_cookies() entered
recvdoc(): entered
recvdoc(): entered
SetError() #0:


SetError() #13: HTTP/1.1 400 Bad Request
http_close(): entered
HTTPAPI Ver 1.24 released 2012-01-23
OS/400 Ver V7R1M0

http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: VONMAUR.COM
DNS default domain: VONMAUR.COM
DNS server found: 64.22.192.4
DNS server found: 64.22.192.3
http_persist_post(): entered
http_persist_req(POST) entered.
http_long_ParseURL(): entered
do_oper(POST): entered
There are 0 cookies in the cache
POST /UpdateCMA.asmx HTTP/1.1
Host: webservices.vonmaur.vmc
User-Agent: http-api/1.24
Content-Type: text/xml
SOAPAction: http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal
Content-Length: 32767
senddoc(): entered
xml version="1.0" encoding="iso-8859-1" standalone="no"?> <soapenv:Envelope  xml
recvresp(): entered
HTTP/1.1 400 Bad Request


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
Sent: Tuesday, April 02, 2013 8:20 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Ftpapi Digest, Vol 78, Issue 6

Send Ftpapi mailing list submissions to
        ftpapi@xxxxxxxxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        http://scottklement.com/mailman/listinfo/ftpapi
or, via email, send a message with subject or body 'help' to
        ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx

You can reach the person managing the list at
        ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ftpapi digest..."


Today's Topics:

   1. Re: Ftpapi Digest, Vol 78, Issue 3 (Michael Ryan)


----------------------------------------------------------------------

Message: 1
Date: Tue, 2 Apr 2013 09:19:42 -0400
From: Michael Ryan <michaelrtr@xxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Ftpapi Digest, Vol 78, Issue 3
Message-ID:
        <CACjuy34L8b0fbEZZG2rUjVQ0iExeTQnDOx03JrYkwjFgnJ7Kag@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

Specify http_debug(*ON); in your code. Then look for a file named
/tmp/httpapi_debug.txt.

And start a new email with a different subject than FTPAPI Digest...When
replying, please edit your Subject line so it is more specific than "Re:
Contents of Ftpapi digest..."


On Tue, Apr 2, 2013 at 9:03 AM, Mauricio Diaz-Lapham <
MDiaz-Lapham@xxxxxxxxxxx> wrote:

> Thank You all for your help. How do I look at the debug logs? I never done
> that. thanks
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:
> ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
> Sent: Monday, April 01, 2013 3:16 PM
> To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Ftpapi Digest, Vol 78, Issue 3
>
> Send Ftpapi mailing list submissions to
>         ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://scottklement.com/mailman/listinfo/ftpapi
> or, via email, send a message with subject or body 'help' to
>         ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
>
> You can reach the person managing the list at
>         ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of Ftpapi digest..."
>
>
> Today's Topics:
>
>    1. RE: HTTP/1.1 400 Bad Request (Robert Gilsdorf)
>    2. Re: HTTP/1.1 400 Bad Request (Charles Wilt)
>    3. Re: HTTP/1.1 400 Bad Request (Scott Klement)
>    4. Re: HTTPAPI with CDATA (Scott Klement)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 1 Apr 2013 15:57:27 -0400
> From: Robert Gilsdorf <rgilsdor@xxxxxxxxxxxxxxxx>
> To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: RE: HTTP/1.1 400 Bad Request
> Message-ID:
>         <
> F911C5CB2047A14F823096C71297EEE1014CCB7A7CF7@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
>
> Content-Type: text/plain; charset="us-ascii"
>
> No space after xmlns:soapenv url could lead to a misfire.
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:
> ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mauricio Diaz-Lapham
> Sent: Monday, April 01, 2013 2:28 PM
> To: 'ftpapi@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: HTTP/1.1 400 Bad Request
>
> Hello, Can someone help me! I keep getting this error and I have no clue
> as to what is causing it. Below is my code.
>
> H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
>
> d Setup           pr
>
> d WebService      pr            10i 0
>
> D Incoming        PR
> d   ProcessJrn                 100A
> D   depth                       10I 0 value
> D   name                      1024A   varying const
> D   path                     24576A   varying const
> D   value                    65535A   varying const
> D   attrs                         *   dim(32767)
> D                                     const options(*varsize)
>
> d ARWBSRV01       pi
> d  ErrMsg                     1024a   varying
>  *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
> c*====================================================================
> c* Copybooks
> c*====================================================================
>
>  /copy config_h
>  /copy httpapi_h
>
> d Soap            s          32767a
> d ProcessJrn      s            100a
> d ReturnCode      s             10i 0
> d WebSite         s            100a
> D soapfile        s             50a   varying
>
> dVariableRecords...
> d                 ds                  Qualified
> d Number                        10i 0
>
> c*====================================================================
> c* Main
> c*====================================================================
>  /free
>
>      Setup();
>
> /end-free
>
> **********************************************************************
> * Main processing - Call the Webservice to update CMA
> **********************************************************************
>
> /Free
>
>      // Call the web service that will update the client smart file.
>      ReturnCode = WebService();
>      If ReturnCode <> 1;
>         ErrMsg = http_error();
>         ReturnCode = -1;
>      EndIf;
>
>   /end-free
> c*====================================================================
> c* Setup();
> c*
> c* General setup.
> c*====================================================================
>
> p Setup           b
>  /free
>
>   VariableRecords.Number = 4; // Number of keys.
>
>   // Turn HTTP debug on or off
>   http_debug(*ON);
>
>   // Set the correct CCSID.
>   http_setCCSIDs(1208:0);
>
>   // Strip off back end CRLFs on the returned XMLs.
>   http_XmlStripCRLF(*ON);
>
>  /end-free
> p Setup           e
>
> c*====================================================================
> c* WebService(); Call The Web Service.
> c*====================================================================
>
> p WebService      b
> d WebService      pi            10i 0
>  /free
>
>    Soap =
>    '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
>       +' <soapenv:Envelope '
>       +  ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; '
>       +  ' xmlns:upd="http://webservices.vonmaur.vmc/UpdateCMA.asmx";>'
>       +   '   <soapenv:Header/>'
>       +   '   <soapenv:Body>'
>       +   '      <upd:ProcessJournal/>'
>       +   '   </soapenv:Body>'
>       + '</soapenv:Envelope>';
>
>   // Consume the web service.
>   ReturnCode = http_url_post_xml(
>     'http://webservices.vonmaur.vmc/UpdateCMA.asmx'
>     : %addr(SOAP) + 2
>     : %len(SOAP)
>     : *NULL
>     : %paddr(Incoming)
>     : %addr(ProcessJrn)
>     : HTTP_TIMEOUT
>     : HTTP_USERAGENT
>     : 'text/xml'
>     : 'http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal');
>
>   return ReturnCode;
>
>  /end-free
> p WebService      e
> c*====================================================================
> c* Incoming1();
> c* Parse the XML coming in to see what the client ID we received is.
> c*====================================================================
>
> p Incoming        B
> d Incoming        PI
> d   ProcessJrn                 100a
> d   depth                       10i 0 value
> d   name                      1024a   varying const
> d   path                     24576a   varying const
> d   value                    65535a   varying const
> d   attrs                         *   dim(32767)
> d                                     const options(*varsize)
>
> D atof            PR             8F   extproc('atof')
> D   string                        *   value options(*string)
>  /free
>
>   if (name = 'ProcessJournal');
>    ProcessJrn = value;
>   endif;
>
>  /end-free
> p Incoming        E
>
>
>
>
>
> This message contains confidential information and is intended only for
> the individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and
> delete this e-mail from your system. E-mail transmission cannot be
> guaranteed to be secure or error-free as information could be intercepted,
> corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
> The sender therefore does not accept liability for any errors or omissions
> in the contents of this message, which arise as a result of e-mail
> transmission. If verification is required please request a hard-copy
> version. Rush Trucking, PO Box 1011, Wayne, MI 48184 www.rushtrucking.com
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 1 Apr 2013 16:00:50 -0400
> From: Charles Wilt <charles.wilt@xxxxxxxxx>
> To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: HTTP/1.1 400 Bad Request
> Message-ID:
>         <CAJ=
> Tnc7SjCKr-JPUcv5U+hTfUKwe0z2kP-JjnTLdKi16oN1p0Q@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"
>
> You should post the debug log, making sure to strip out user IDs and
> passwords.
>
> But generally speaking, a 400 Bad Request means you didn't send your
> request correctly.
>
> Does the web service you are trying to call have a WSDL that provides a
> definition of how to use the service?
>
> Charles
>
>
> On Mon, Apr 1, 2013 at 2:27 PM, Mauricio Diaz-Lapham <
> MDiaz-Lapham@xxxxxxxxxxx> wrote:
>
> >    Hello, Can someone help me! I keep getting this error and I have no
> >    clue as to what is causing it. Below is my code.
> >
> >
> >    H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
> >
> >
> >    d Setup           pr
> >
> >
> >    d WebService      pr            10i 0
> >
> >
> >    D Incoming        PR
> >
> >    d   ProcessJrn                 100A
> >
> >    D   depth                       10I 0 value
> >
> >    D   name                      1024A   varying const
> >
> >    D   path                     24576A   varying const
> >
> >    D   value                    65535A   varying const
> >
> >    D   attrs                         *   dim(32767)
> >
> >    D                                     const options(*varsize)
> >
> >
> >    d ARWBSRV01       pi
> >
> >    d  ErrMsg                     1024a   varying
> >
> >
> > *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
> >
> >
> > c*====================================================================
> >
> >    c* Copybooks
> >
> >
> > c*====================================================================
> >
> >
> >
> >     /copy config_h
> >
> >     /copy httpapi_h
> >
> >
> >    d Soap            s
> >    32767a
> >
> >    d ProcessJrn      s            100a
> >
> >    d ReturnCode      s             10i 0
> >
> >    d WebSite         s            100a
> >
> >    D soapfile        s             50a   varying
> >
> >
> >
> >    dVariableRecords...
> >
> >    d                 ds                  Qualified
> >
> >    d Number                        10i 0
> >
> >
> >
> >
> > c*====================================================================
> >
> >    c* Main
> >
> >
> > c*====================================================================
> >
> >     /free
> >
> >
> >
> >         Setup();
> >
> >
> >    /end-free
> >
> >
> >
> > **********************************************************************
> >
> >    * Main processing - Call the Webservice to update CMA
> >
> >
> > **********************************************************************
> >
> >
> >    /Free
> >
> >
> >         // Call the web service that will update the client smart file.
> >
> >         ReturnCode = WebService();
> >
> >         If ReturnCode <> 1;
> >
> >            ErrMsg = http_error();
> >
> >            ReturnCode = -1;
> >
> >         EndIf;
> >
> >
> >      /end-free
> >
> >
> > c*====================================================================
> >
> >    c* Setup();
> >
> >    c*
> >
> >    c* General setup.
> >
> >
> > c*====================================================================
> >
> >
> >
> >    p Setup           b
> >
> >     /free
> >
> >
> >
> >      VariableRecords.Number = 4; // Number of keys.
> >
> >
> >
> >      // Turn HTTP debug on or off
> >
> >      http_debug(*ON);
> >
> >
> >
> >      // Set the correct CCSID.
> >
> >      http_setCCSIDs(1208:0);
> >
> >
> >      // Strip off back end CRLFs on the returned XMLs.
> >
> >      http_XmlStripCRLF(*ON);
> >
> >
> >
> >     /end-free
> >
> >    p Setup           e
> >
> >
> >
> >
> > c*====================================================================
> >
> >    c* WebService(); Call The Web Service.
> >
> >
> > c*====================================================================
> >
> >
> >
> >    p WebService      b
> >
> >    d WebService      pi            10i 0
> >
> >     /free
> >
> >
> >
> >       Soap =
> >
> >       '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
> >
> >          +' <soapenv:Envelope '
> >
> >          +  ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> '
> >
> >          +  ' xmlns:upd="http://webservices.vonmaur.vmc/UpdateCMA.asmx
> ">'
> >
> >          +   '   <soapenv:Header/>'
> >
> >          +   '   <soapenv:Body>'
> >
> >          +   '      <upd:ProcessJournal/>'
> >
> >          +   '   </soapenv:Body>'
> >
> >          + '</soapenv:Envelope>';
> >
> >
> >
> >      // Consume the web service.
> >
> >      ReturnCode = http_url_post_xml(
> >
> >        'http://webservices.vonmaur.vmc/UpdateCMA.asmx'
> >
> >        : %addr(SOAP) + 2
> >
> >        : %len(SOAP)
> >
> >        : *NULL
> >
> >        : %paddr(Incoming)
> >
> >        : %addr(ProcessJrn)
> >
> >        :
> >    HTTP_TIMEOUT
> >
> >        : HTTP_USERAGENT
> >
> >        : 'text/xml'
> >
> >        : 'http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal');
> >
> >
> >
> >      return ReturnCode;
> >
> >
> >
> >     /end-free
> >
> >    p WebService      e
> >
> >
> > c*====================================================================
> >
> >    c* Incoming1();
> >
> >    c* Parse the XML coming in to see what the client ID we received is.
> >
> >
> > c*====================================================================
> >
> >
> >
> >    p Incoming        B
> >
> >    d Incoming        PI
> >
> >    d   ProcessJrn                 100a
> >
> >    d   depth                       10i 0 value
> >
> >    d   name                      1024a   varying const
> >
> >    d   path                     24576a   varying const
> >
> >    d   value                    65535a   varying const
> >
> >    d   attrs                         *   dim(32767)
> >
> >    d                                     const options(*varsize)
> >
> >
> >
> >    D atof            PR             8F   extproc('atof')
> >
> >    D   string                        *   value options(*string)
> >
> >     /free
> >
> >
> >
> >      if (name = 'ProcessJournal');
> >
> >       ProcessJrn = value;
> >
> >      endif;
> >
> >
> >
> >     /end-free
> >
> >    p Incoming        E
> >
> > ----------------------------------------------------------------------
> > - This is the FTPAPI mailing list.  To unsubscribe, please go to:
> > http://www.scottklement.com/mailman/listinfo/ftpapi
> > ----------------------------------------------------------------------
> > -
> >
> >
> -------------- next part --------------
>    You should post the debug log, making sure to strip out user IDs and
>    passwords.
>    But generally speaking, a 400 Bad Request means you didn't send your
>    request correctly.
>    Does the web service you are trying to call have a WSDL that provides a
>    definition of how to use the service?
>    Charles
>
>    On Mon, Apr 1, 2013 at 2:27 PM, Mauricio Diaz-Lapham
>    <[1]MDiaz-Lapham@xxxxxxxxxxx> wrote:
>
>         Hello, Can someone help me! I keep getting this error and I have
>      no
>         clue as to what is causing it. Below is my code.
>         H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
>         d Setup           pr
>         d WebService      pr            10i 0
>         D Incoming        PR
>         d   ProcessJrn                 100A
>         D   depth                       10I 0 value
>         D   name                      1024A   varying const
>         D   path                     24576A   varying const
>         D   value                    65535A   varying const
>         D   attrs                         *   dim(32767)
>         D                                     const options(*varsize)
>         d ARWBSRV01       pi
>         d  ErrMsg                     1024a   varying
>
>      *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
>      *=
>
>      c*==================================================================
>      ==
>         c* Copybooks
>
>      c*==================================================================
>      ==
>          /copy config_h
>          /copy httpapi_h
>         d Soap            s
>         32767a
>         d ProcessJrn      s            100a
>         d ReturnCode      s             10i 0
>         d WebSite         s            100a
>         D soapfile        s             50a   varying
>         dVariableRecords...
>         d                 ds                  Qualified
>         d Number                        10i 0
>
>      c*==================================================================
>      ==
>         c* Main
>
>      c*==================================================================
>      ==
>          /free
>              Setup();
>         /end-free
>
>      ********************************************************************
>      **
>         * Main processing - Call the Webservice to update CMA
>
>      ********************************************************************
>      **
>         /Free
>              // Call the web service that will update the client smart
>      file.
>              ReturnCode = WebService();
>              If ReturnCode <> 1;
>                 ErrMsg = http_error();
>                 ReturnCode = -1;
>              EndIf;
>           /end-free
>
>      c*==================================================================
>      ==
>         c* Setup();
>         c*
>         c* General setup.
>
>      c*==================================================================
>      ==
>         p Setup           b
>          /free
>           VariableRecords.Number = 4; // Number of keys.
>           // Turn HTTP debug on or off
>           http_debug(*ON);
>           // Set the correct CCSID.
>           http_setCCSIDs(1208:0);
>           // Strip off back end CRLFs on the returned XMLs.
>           http_XmlStripCRLF(*ON);
>          /end-free
>         p Setup           e
>
>      c*==================================================================
>      ==
>         c* WebService(); Call The Web Service.
>
>      c*==================================================================
>      ==
>         p WebService      b
>         d WebService      pi            10i 0
>          /free
>            Soap =
>            '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
>               +' <soapenv:Envelope '
>               +  '
>      xmlns:soapenv="[2]http://schemas.xmlsoap.org/soap/envelope/"; '
>               +  '
>      xmlns:upd="[3]http://webservices.vonmaur.vmc/UpdateCMA.asmx";>'
>               +   '   <soapenv:Header/>'
>               +   '   <soapenv:Body>'
>               +   '      <upd:ProcessJournal/>'
>               +   '   </soapenv:Body>'
>               + '</soapenv:Envelope>';
>           // Consume the web service.
>           ReturnCode = http_url_post_xml(
>             '[4]http://webservices.vonmaur.vmc/UpdateCMA.asmx'
>             : %addr(SOAP) + 2
>             : %len(SOAP)
>             : *NULL
>             : %paddr(Incoming)
>             : %addr(ProcessJrn)
>             :
>         HTTP_TIMEOUT
>             : HTTP_USERAGENT
>             : 'text/xml'
>             :
>      '[5]http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal');
>           return ReturnCode;
>          /end-free
>         p WebService      e
>
>      c*==================================================================
>      ==
>         c* Incoming1();
>         c* Parse the XML coming in to see what the client ID we received
>      is.
>
>      c*==================================================================
>      ==
>         p Incoming        B
>         d Incoming        PI
>         d   ProcessJrn                 100a
>         d   depth                       10i 0 value
>         d   name                      1024a   varying const
>         d   path                     24576a   varying const
>         d   value                    65535a   varying const
>         d   attrs                         *   dim(32767)
>         d                                     const options(*varsize)
>         D atof            PR             8F   extproc('atof')
>         D   string                        *   value options(*string)
>          /free
>           if (name = 'ProcessJournal');
>            ProcessJrn = value;
>           endif;
>          /end-free
>         p Incoming        E
>      --------------------------------------------------------------------
>      ---
>      This is the FTPAPI mailing list.  To unsubscribe, please go to:
>      [6]http://www.scottklement.com/mailman/listinfo/ftpapi
>      --------------------------------------------------------------------
>      ---
>
> References
>
>    1. mailto:MDiaz-Lapham@xxxxxxxxxxx
>    2. http://schemas.xmlsoap.org/soap/envelope/
>    3. http://webservices.vonmaur.vmc/UpdateCMA.asmx
>    4. http://webservices.vonmaur.vmc/UpdateCMA.asmx
>    5. http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal'
>    6. http://www.scottklement.com/mailman/listinfo/ftpapi
>
> ------------------------------
>
> Message: 3
> Date: Mon, 01 Apr 2013 15:05:16 -0500
> From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
> To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: HTTP/1.1 400 Bad Request
> Message-ID: <5159E87C.908@xxxxxxxxxxxxxxxx>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> I don't see anything obvious in your code that would cause this
> problem.   Please generate a debug/trace file so we can see what's going
> on.
>
> On 4/1/2013 1:27 PM, Mauricio Diaz-Lapham wrote:
> >     Hello, Can someone help me! I keep getting this error and I have no
> >     clue as to what is causing it. Below is my code.
> >
> >
> >
>
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 01 Apr 2013 15:15:35 -0500
> From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
> To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: HTTPAPI with CDATA
> Message-ID: <5159EAE7.3020002@xxxxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hello,
>
> The format of the XML you are sending is probably NOT related to the
> format of the XML you're getting back.  So telling us that you've encoded
> the XML you're sending to the server properly, does not (at least in my
> experience) have any impact on what you're getting back.
>
> It's a matter of keeping the "payload" of the SOAP message separate from
> the XML that makes up the SOAP message itself.
>
> Remember, a web service call is really calling a program/procedure over
> the web.  The XML documents are used to represent parameters passed either
> into or out of the routine you're calling.  In this example, the server is
> sending you an output document.... so it has output
> parameters.   Here's a simple example:
>
> <Envelope>
>    <Body>
>      <document>
>        <parm1>any data can go here</parm1>
>        <parm2>any data can go here</parm2>
>      </document>
>    </Body>
> </Envelope>
>
> Now suppose you decided to pass an XML document in "parm2".  After all, an
> XML document is just a character string -- so what if parm2 contains
> a whole XML document inside it.   That document would HAVE TO have it's
> tags converted to &lt; and &gt;, otherwise it'd interfere with the
> integrity of the Envelope/Body/document/parm2 tags themselves.
>
> It's important to understand that almost everyone calling a SOAP web
> service is using SOAP tooling.  They aren't coding the SOAP document by
> hand like you are doing here -- they actually call a 3rd party program that
> GENERATES the code.  So from their perspective, they have something
> like:
>
>      parm1 = "data";
>      parm2 = "whole XML document here";
>
>      call WebService(parm1, parm2);
>
> And, under the covers, the 3rd party tool converts this to the SOAP
> message.  The data you got back in parm2 would already be removed from the
> SOAP message and un-escaped.  The caller would never even know that it was
> escaped during transit, because the 3rd party tool does all of that for
> them.
>
> But, HTTPAPI doesn't know anything about SOAP... it's not a SOAP tool,
> it's purely an HTTP transfer tool (unlike IWS or Thomas's WSDL2RPG).
> So HTTPAPI takes a string, and sends it over the network.  It's up to you
> to format it all correctly, and to handle the data that comes back
> correctly.  It doesn't know it's SOAP.
>
> As Mike said (and pointed you to examples) when HTTPAPI parses the XML
> that's sent back, it'll automatically convert the &lt; and &gt; stuff back
> to the < and > characters, so I don't even see why this is causing you a
> problem.. it's very simple to deal with.
>
>
> On 4/1/2013 9:57 AM, Kim Tay wrote:
> >     Hi,
> >
> >     We used the HTTPAPI with CDATA to consume of of the Vendor Web
> Service,
> >     but the response is  returning result tag with &lt; and &gt; instead
> of
> >     < >, I asked the Vendor why and  ithey asked me what tool that I
> used?
> >     I old them simple XML via HTTPAPI from IBM i.  Did I miss out some
> >     functions/method? Appreciate if you can advise me.
> >
> >     Thanks!
> >
> >     Hereby is my send doc
> >
> >     SENDDOC): entered
> >     <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> >     xmlns:soap="[1]http://schemas.xmlsoap.org/soap/envelope/";
> >     xmlns:xsi="[2]http://www.w3.org/2001/XMLSchema-instance";
> >     xmlns:xsd="[3]http://www.w3.org/2001/XMLSchema";><soap:Body><Audit
> >     xmlns="[4]http://tempuri.org/McKessonAudit/Claim
> "><ClaimIn><![CDATA[<?x
> >     ml version="1.0" standalone="yes"?><MIM-UI>  <SYSTEM-DATA>
> >     <MIM-OPTIONS>      <DEFINITION-NAME>MIM</DEFINITION-NAME>
> >     <UNIT-EXP-PRE-OPT>2</UNIT-EXP-PRE-OPT>
> >     <UNIT-EXP-POST-OPT>1</UNIT-EXP-POST-OPT>
> >     <MOD-EXP-PRE-OPT>2</MOD-EXP-PRE-OPT>
> >     <MOD-EXP-POST-OPT>1</MOD-EXP-POST-OPT>
> >     <EXP-PAY-PCT-IND>Y</EXP-PAY-PCT-IND>    </MIM-OPTIONS>
> >     <PRODUCT-OPTIONS>      <PRODUCT-NAME>ClaimCheck</PRODUCT-NAME>
> >     <CALL-SEQUENCE>0</CALL-SEQUENCE>
> >     <CLAIMCHECK-ACCOUNT>GMISDEFAULT</CLAIMCHECK-ACCOUNT>
> >     <AGE-REPLACE-IND>Y</AGE-REPLACE-IND
> >
> >     ...
> >
> >     ...
> >
> >     ...
> >
> >     </MIM-UI>]]></ClaimIn></Audit></soap:Body></soap:Envelope>
> >     recvresp(): entered
> >     HTTP/1.1 200 OK
> >     Cache-Control: private, max-age=0
> >     Content-Type: text/xml; charset=utf-8
> >     Server: Microsoft-IIS/7.5
> >     X-AspNet-Version: 2.0.50727
> >     X-Powered-By: [5]ASP.NET
> >     Date: Sun, 31 Mar 2013 23:15:46 GMT
> >     Content-Length: 14099
> >
> >     and here is the result;
> >
> >     RECVDOC
> >     SetError() #13: HTTP/1.1 200 OK
> >     recvresp(): end with 200
> >     recvdoc parms: identity 14099
> >     header_load_cookies() entered
> >     recvdoc(): entered
> >     SetError() #0:
> >     <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> >     xmlns:soap="[6]http://schemas.xmlsoap.org/soap/envelope/";
> >     xmlns:xsi="[7]http://www.w3.org/2001/XMLSchema-instance";
> >     xmlns:xsd="[8]http://www.w3.org/2001/XMLSchema";><soap:Body>
> >     <AuditResponse
> >     xmlns="[9]http://tempuri.org/McKessonAudit/Claim";><AuditResult>
> >     &lt;![CDATA[&lt;?xml version="1.0"
> >
> standalone="yes"?&gt;&lt;MIM-UI&gt;&lt;CLAIM-GROUP&gt;&lt;CLAIM-DATA&gt
> >
> ;&lt;CLAIM-ID&gt;000140&lt;/CLAIM-ID&gt;&lt;MEMBER-DOB&gt;19540103&lt;/
> >
> MEMBER-DOB&gt;&lt;MEMBER-GENDER&gt;F&lt;/MEMBER-GENDER&gt;&lt;CLAIM-LAS
> >     T-LINE&gt;
> >
> >     ...
> >
> >     ...
> >
> >     ..
> >
> >     MSG-TEXT&gt;13152 CAN ONLY BE DONE  1 TIME(S) ON SINGLE DATE;
> >     DUPLICATE(S)
> >
> DENIED&lt;/MSG-TEXT&gt;&lt;/MESSAGE-ENTRY&gt;&lt;/MESSAGE-GROUP&gt;&lt;
> >     /MIM-UI&gt;
> >     ]]&gt;</AuditResult></AuditResponse></soap:Body></soap:Envelope>
> >     http_close(): entered
> >
> > References
> >
> >     1. http://schemas.xmlsoap.org/soap/envelope/
> >     2. http://www.w3.org/2001/XMLSchema-instance
> >     3. http://www.w3.org/2001/XMLSchema
> >     4. http://tempuri.org/McKessonAudit/Claim
> >     5. http://asp.net/
> >     6. http://schemas.xmlsoap.org/soap/envelope/
> >     7. http://www.w3.org/2001/XMLSchema-instance
> >     8. http://www.w3.org/2001/XMLSchema
> >     9. http://tempuri.org/McKessonAudit/Claim
> >
> >
> >
> > ----------------------------------------------------------------------
> > - This is the FTPAPI mailing list.  To unsubscribe, please go to:
> > http://www.scottklement.com/mailman/listinfo/ftpapi
> > ----------------------------------------------------------------------
> > -
>
> -------------- next part --------------
>    Hello,
>    The format of the XML you are sending is probably NOT related to the
>    format of the XML you're getting back.  So telling us that you've
>    encoded the XML you're sending to the server properly, does not (at
>    least in my experience) have any impact on what you're getting back.
>    It's a matter of keeping the "payload" of the SOAP message separate
>    from the XML that makes up the SOAP message itself.
>    Remember, a web service call is really calling a program/procedure over
>    the web.  The XML documents are used to represent parameters passed
>    either into or out of the routine you're calling.  In this example, the
>    server is sending you an output document.... so it has output
>    parameters.   Here's a simple example:
>    <Envelope>
>      <Body>
>        <document>
>          <parm1>any data can go here</parm1>
>          <parm2>any data can go here</parm2>
>        </document>
>      </Body>
>    </Envelope>
>
>    Now suppose you decided to pass an XML document in "parm2".  After all,
>    an XML document is just a character string -- so what if parm2 contains
>    a whole XML document inside it.   That document would HAVE TO have it's
>    tags converted to &lt; and &gt;, otherwise it'd interfere with the
>    integrity of the Envelope/Body/document/parm2 tags themselves.
>    It's important to understand that almost everyone calling a SOAP web
>    service is using SOAP tooling.  They aren't coding the SOAP document by
>    hand like you are doing here -- they actually call a 3rd party program
>    that GENERATES the code.  So from their perspective, they have
>    something like:
>        parm1 = "data";
>        parm2 = "whole XML document here";
>        call WebService(parm1, parm2);
>    And, under the covers, the 3rd party tool converts this to the SOAP
>    message.  The data you got back in parm2 would already be removed from
>    the SOAP message and un-escaped.  The caller would never even know that
>    it was escaped during transit, because the 3rd party tool does all of
>    that for them.
>    But, HTTPAPI doesn't know anything about SOAP... it's not a SOAP tool,
>    it's purely an HTTP transfer tool (unlike IWS or Thomas's WSDL2RPG).
>    So HTTPAPI takes a string, and sends it over the network.  It's up to
>    you to format it all correctly, and to handle the data that comes back
>    correctly.  It doesn't know it's SOAP.
>    As Mike said (and pointed you to examples) when HTTPAPI parses the XML
>    that's sent back, it'll automatically convert the &lt; and &gt; stuff
>    back to the < and > characters, so I don't even see why this is causing
>    you a problem.. it's very simple to deal with.
>
>    On 4/1/2013 9:57 AM, Kim Tay wrote:
>
>    Hi,
>
>    We used the HTTPAPI with CDATA to consume of of the Vendor Web Service,
>    but the response is  returning result tag with &lt; and &gt; instead of
>    < >, I asked the Vendor why and  ithey asked me what tool that I used?
>    I old them simple XML via HTTPAPI from IBM i.  Did I miss out some
>    functions/method? Appreciate if you can advise me.
>
>    Thanks!
>
>    Hereby is my send doc
>
>    SENDDOC): entered
>    <?xml version="1.0" encoding="utf-8"?><soap:Envelope
>    xmlns:soap="[1][1]http://schemas.xmlsoap.org/soap/envelope/";
>    xmlns:xsi="[2][2]http://www.w3.org/2001/XMLSchema-instance";
>    xmlns:xsd="[3][3]http://www.w3.org/2001/XMLSchema";><soap:Body><Audit
>    xmlns="[4][4]http://tempuri.org/McKessonAudit/Claim
> "><ClaimIn><![CDATA[<?x
>    ml version="1.0" standalone="yes"?><MIM-UI>  <SYSTEM-DATA>
>    <MIM-OPTIONS>      <DEFINITION-NAME>MIM</DEFINITION-NAME>
>    <UNIT-EXP-PRE-OPT>2</UNIT-EXP-PRE-OPT>
>    <UNIT-EXP-POST-OPT>1</UNIT-EXP-POST-OPT>
>    <MOD-EXP-PRE-OPT>2</MOD-EXP-PRE-OPT>
>    <MOD-EXP-POST-OPT>1</MOD-EXP-POST-OPT>
>    <EXP-PAY-PCT-IND>Y</EXP-PAY-PCT-IND>    </MIM-OPTIONS>
>    <PRODUCT-OPTIONS>      <PRODUCT-NAME>ClaimCheck</PRODUCT-NAME>
>    <CALL-SEQUENCE>0</CALL-SEQUENCE>
>    <CLAIMCHECK-ACCOUNT>GMISDEFAULT</CLAIMCHECK-ACCOUNT>
>    <AGE-REPLACE-IND>Y</AGE-REPLACE-IND
>
>    ...
>
>    ...
>
>    ...
>
>    </MIM-UI>]]></ClaimIn></Audit></soap:Body></soap:Envelope>
>    recvresp(): entered
>    HTTP/1.1 200 OK
>    Cache-Control: private, max-age=0
>    Content-Type: text/xml; charset=utf-8
>    Server: Microsoft-IIS/7.5
>    X-AspNet-Version: 2.0.50727
>    X-Powered-By: [5]ASP.NET
>    Date: Sun, 31 Mar 2013 23:15:46 GMT
>    Content-Length: 14099
>
>    and here is the result;
>
>    RECVDOC
>    SetError() #13: HTTP/1.1 200 OK
>    recvresp(): end with 200
>    recvdoc parms: identity 14099
>    header_load_cookies() entered
>    recvdoc(): entered
>    SetError() #0:
>    <?xml version="1.0" encoding="utf-8"?><soap:Envelope
>    xmlns:soap="[6][5]http://schemas.xmlsoap.org/soap/envelope/";
>    xmlns:xsi="[7][6]http://www.w3.org/2001/XMLSchema-instance";
>    xmlns:xsd="[8][7]http://www.w3.org/2001/XMLSchema";><soap:Body>
>    <AuditResponse
>    xmlns="[9][8]http://tempuri.org/McKessonAudit/Claim";><AuditResult>
>    &lt;![CDATA[&lt;?xml version="1.0"
>    standalone="yes"?&gt;&lt;MIM-UI&gt;&lt;CLAIM-GROUP&gt;&lt;CLAIM-DATA&gt
>    ;&lt;CLAIM-ID&gt;000140&lt;/CLAIM-ID&gt;&lt;MEMBER-DOB&gt;19540103&lt;/
>    MEMBER-DOB&gt;&lt;MEMBER-GENDER&gt;F&lt;/MEMBER-GENDER&gt;&lt;CLAIM-LAS
>    T-LINE&gt;
>
>    ...
>
>    ...
>
>    ..
>
>    MSG-TEXT&gt;13152 CAN ONLY BE DONE  1 TIME(S) ON SINGLE DATE;
>    DUPLICATE(S)
>    DENIED&lt;/MSG-TEXT&gt;&lt;/MESSAGE-ENTRY&gt;&lt;/MESSAGE-GROUP&gt;&lt;
>    /MIM-UI&gt;
>    ]]&gt;</AuditResult></AuditResponse></soap:Body></soap:Envelope>
>    http_close(): entered
>
> References
>
>    1. [9]http://schemas.xmlsoap.org/soap/envelope/
>    2. [10]http://www.w3.org/2001/XMLSchema-instance
>    3. [11]http://www.w3.org/2001/XMLSchema
>    4. [12]http://tempuri.org/McKessonAudit/Claim
>    5. [13]http://asp.net/
>    6. [14]http://schemas.xmlsoap.org/soap/envelope/
>    7. [15]http://www.w3.org/2001/XMLSchema-instance
>    8. [16]http://www.w3.org/2001/XMLSchema
>    9. [17]http://tempuri.org/McKessonAudit/Claim
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> [18]http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
> References
>
>    1. http://schemas.xmlsoap.org/soap/envelope/
>    2. http://www.w3.org/2001/XMLSchema-instance
>    3. http://www.w3.org/2001/XMLSchema
>    4. http://tempuri.org/McKessonAudit/Claim
>    5. http://schemas.xmlsoap.org/soap/envelope/
>    6. http://www.w3.org/2001/XMLSchema-instance
>    7. http://www.w3.org/2001/XMLSchema
>    8. http://tempuri.org/McKessonAudit/Claim
>    9. http://schemas.xmlsoap.org/soap/envelope/
>   10. http://www.w3.org/2001/XMLSchema-instance
>   11. http://www.w3.org/2001/XMLSchema
>   12. http://tempuri.org/McKessonAudit/Claim
>   13. http://asp.net/
>   14. http://schemas.xmlsoap.org/soap/envelope/
>   15. http://www.w3.org/2001/XMLSchema-instance
>   16. http://www.w3.org/2001/XMLSchema
>   17. http://tempuri.org/McKessonAudit/Claim
>   18. http://www.scottklement.com/mailman/listinfo/ftpapi
>
> ------------------------------
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list digest.  To unsubscribe, go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
>
> End of Ftpapi Digest, Vol 78, Issue 3
> *************************************
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-------------- next part --------------
   Specify http_debug(*ON); in your code. Then look for a file named
   /tmp/httpapi_debug.txt.
   And start a new email with a different subject than FTPAPI
   Digest...When replying, please edit your Subject line so it is more
   specific than "Re: Contents of Ftpapi digest..."

   On Tue, Apr 2, 2013 at 9:03 AM, Mauricio Diaz-Lapham
   <[1]MDiaz-Lapham@xxxxxxxxxxx> wrote:

     Thank You all for your help. How do I look at the debug logs? I
     never done that. thanks
     -----Original Message-----
     From: [2]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     [mailto:[3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
     [4]ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
     Sent: Monday, April 01, 2013 3:16 PM
     To: [5]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
     Subject: Ftpapi Digest, Vol 78, Issue 3
     Send Ftpapi mailing list submissions to
             [6]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
     To subscribe or unsubscribe via the World Wide Web, visit
             [7]http://scottklement.com/mailman/listinfo/ftpapi
     or, via email, send a message with subject or body 'help' to
             [8]ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
     You can reach the person managing the list at
             [9]ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
     When replying, please edit your Subject line so it is more specific
     than "Re: Contents of Ftpapi digest..."
     Today's Topics:
        1. RE: HTTP/1.1 400 Bad Request (Robert Gilsdorf)
        2. Re: HTTP/1.1 400 Bad Request (Charles Wilt)
        3. Re: HTTP/1.1 400 Bad Request (Scott Klement)
        4. Re: HTTPAPI with CDATA (Scott Klement)
     --------------------------------------------------------------------
     --
     Message: 1
     Date: Mon, 1 Apr 2013 15:57:27 -0400
     From: Robert Gilsdorf <[10]rgilsdor@xxxxxxxxxxxxxxxx>
     To: HTTPAPI and FTPAPI Projects <[11]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Subject: RE: HTTP/1.1 400 Bad Request
     Message-ID:

     <[12]F911C5CB2047A14F823096C71297EEE1014CCB7A7CF7@IT4.rush03.rushtru
     cking.com>
     Content-Type: text/plain; charset="us-ascii"
     No space after xmlns:soapenv url could lead to a misfire.
     -----Original Message-----
     From: [13]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     [mailto:[14]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
     Mauricio Diaz-Lapham
     Sent: Monday, April 01, 2013 2:28 PM
     To: '[15]ftpapi@xxxxxxxxxxxxxxxxxxxxxx'
     Subject: HTTP/1.1 400 Bad Request
     Hello, Can someone help me! I keep getting this error and I have no
     clue as to what is causing it. Below is my code.
     H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
     d Setup           pr
     d WebService      pr            10i 0
     D Incoming        PR
     d   ProcessJrn                 100A
     D   depth                       10I 0 value
     D   name                      1024A   varying const
     D   path                     24576A   varying const
     D   value                    65535A   varying const
     D   attrs                         *   dim(32767)
     D                                     const options(*varsize)
     d ARWBSRV01       pi
     d  ErrMsg                     1024a   varying
      *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
     =*=
     c*==================================================================
     ==
     c* Copybooks
     c*==================================================================
     ==
      /copy config_h
      /copy httpapi_h
     d Soap            s          32767a
     d ProcessJrn      s            100a
     d ReturnCode      s             10i 0
     d WebSite         s            100a
     D soapfile        s             50a   varying
     dVariableRecords...
     d                 ds                  Qualified
     d Number                        10i 0
     c*==================================================================
     ==
     c* Main
     c*==================================================================
     ==
      /free
          Setup();
     /end-free
     ********************************************************************
     **
     * Main processing - Call the Webservice to update CMA
     ********************************************************************
     **
     /Free
          // Call the web service that will update the client smart file.
          ReturnCode = WebService();
          If ReturnCode <> 1;
             ErrMsg = http_error();
             ReturnCode = -1;
          EndIf;
       /end-free
     c*==================================================================
     ==
     c* Setup();
     c*
     c* General setup.
     c*==================================================================
     ==
     p Setup           b
      /free
       VariableRecords.Number = 4; // Number of keys.
       // Turn HTTP debug on or off
       http_debug(*ON);
       // Set the correct CCSID.
       http_setCCSIDs(1208:0);
       // Strip off back end CRLFs on the returned XMLs.
       http_XmlStripCRLF(*ON);
      /end-free
     p Setup           e
     c*==================================================================
     ==
     c* WebService(); Call The Web Service.
     c*==================================================================
     ==
     p WebService      b
     d WebService      pi            10i 0
      /free
        Soap =
        '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
           +' <soapenv:Envelope '
           +  '
     xmlns:soapenv="[16]http://schemas.xmlsoap.org/soap/envelope/"; '
           +  '
     xmlns:upd="[17]http://webservices.vonmaur.vmc/UpdateCMA.asmx";>'
           +   '   <soapenv:Header/>'
           +   '   <soapenv:Body>'
           +   '      <upd:ProcessJournal/>'
           +   '   </soapenv:Body>'
           + '</soapenv:Envelope>';
       // Consume the web service.
       ReturnCode = http_url_post_xml(
         '[18]http://webservices.vonmaur.vmc/UpdateCMA.asmx'
         : %addr(SOAP) + 2
         : %len(SOAP)
         : *NULL
         : %paddr(Incoming)
         : %addr(ProcessJrn)
         : HTTP_TIMEOUT
         : HTTP_USERAGENT
         : 'text/xml'
         :
     '[19]http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal');
       return ReturnCode;
      /end-free
     p WebService      e
     c*==================================================================
     ==
     c* Incoming1();
     c* Parse the XML coming in to see what the client ID we received is.
     c*==================================================================
     ==
     p Incoming        B
     d Incoming        PI
     d   ProcessJrn                 100a
     d   depth                       10i 0 value
     d   name                      1024a   varying const
     d   path                     24576a   varying const
     d   value                    65535a   varying const
     d   attrs                         *   dim(32767)
     d                                     const options(*varsize)
     D atof            PR             8F   extproc('atof')
     D   string                        *   value options(*string)
      /free
       if (name = 'ProcessJournal');
        ProcessJrn = value;
       endif;
      /end-free
     p Incoming        E
     This message contains confidential information and is intended only
     for the individual named. If you are not the named addressee you
     should not disseminate, distribute or copy this e-mail. Please
     notify the sender immediately by e-mail if you have received this
     e-mail by mistake and delete this e-mail from your system. E-mail
     transmission cannot be guaranteed to be secure or error-free as
     information could be intercepted, corrupted, lost, destroyed, arrive
     late or incomplete, or contain viruses. The sender therefore does
     not accept liability for any errors or omissions in the contents of
     this message, which arise as a result of e-mail transmission. If
     verification is required please request a hard-copy version. Rush
     Trucking, PO Box 1011, Wayne, MI 48184 [20]www.rushtrucking.com
     ------------------------------
     Message: 2
     Date: Mon, 1 Apr 2013 16:00:50 -0400
     From: Charles Wilt <[21]charles.wilt@xxxxxxxxx>
     To: HTTPAPI and FTPAPI Projects <[22]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Subject: Re: HTTP/1.1 400 Bad Request
     Message-ID:

     <CAJ=[23]Tnc7SjCKr-JPUcv5U+hTfUKwe0z2kP-JjnTLdKi16oN1p0Q@mail.gmail.
     com>
     Content-Type: text/plain; charset="iso-8859-1"
     You should post the debug log, making sure to strip out user IDs and
     passwords.
     But generally speaking, a 400 Bad Request means you didn't send your
     request correctly.
     Does the web service you are trying to call have a WSDL that
     provides a definition of how to use the service?
     Charles
     On Mon, Apr 1, 2013 at 2:27 PM, Mauricio Diaz-Lapham <
     [24]MDiaz-Lapham@xxxxxxxxxxx> wrote:
     >    Hello, Can someone help me! I keep getting this error and I
     have no
     >    clue as to what is causing it. Below is my code.
     >
     >
     >    H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
     >
     >
     >    d Setup           pr
     >
     >
     >    d WebService      pr            10i 0
     >
     >
     >    D Incoming        PR
     >
     >    d   ProcessJrn                 100A
     >
     >    D   depth                       10I 0 value
     >
     >    D   name                      1024A   varying const
     >
     >    D   path                     24576A   varying const
     >
     >    D   value                    65535A   varying const
     >
     >    D   attrs                         *   dim(32767)
     >
     >    D                                     const options(*varsize)
     >
     >
     >    d ARWBSRV01       pi
     >
     >    d  ErrMsg                     1024a   varying
     >
     >
     >
     *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
     *=
     >
     >
     >
     c*==================================================================
     ==
     >
     >    c* Copybooks
     >
     >
     >
     c*==================================================================
     ==
     >
     >
     >
     >     /copy config_h
     >
     >     /copy httpapi_h
     >
     >
     >    d Soap            s
     >    32767a
     >
     >    d ProcessJrn      s            100a
     >
     >    d ReturnCode      s             10i 0
     >
     >    d WebSite         s            100a
     >
     >    D soapfile        s             50a   varying
     >
     >
     >
     >    dVariableRecords...
     >
     >    d                 ds                  Qualified
     >
     >    d Number                        10i 0
     >
     >
     >
     >
     >
     c*==================================================================
     ==
     >
     >    c* Main
     >
     >
     >
     c*==================================================================
     ==
     >
     >     /free
     >
     >
     >
     >         Setup();
     >
     >
     >    /end-free
     >
     >
     >
     >
     ********************************************************************
     **
     >
     >    * Main processing - Call the Webservice to update CMA
     >
     >
     >
     ********************************************************************
     **
     >
     >
     >    /Free
     >
     >
     >         // Call the web service that will update the client smart
     file.
     >
     >         ReturnCode = WebService();
     >
     >         If ReturnCode <> 1;
     >
     >            ErrMsg = http_error();
     >
     >            ReturnCode = -1;
     >
     >         EndIf;
     >
     >
     >      /end-free
     >
     >
     >
     c*==================================================================
     ==
     >
     >    c* Setup();
     >
     >    c*
     >
     >    c* General setup.
     >
     >
     >
     c*==================================================================
     ==
     >
     >
     >
     >    p Setup           b
     >
     >     /free
     >
     >
     >
     >      VariableRecords.Number = 4; // Number of keys.
     >
     >
     >
     >      // Turn HTTP debug on or off
     >
     >      http_debug(*ON);
     >
     >
     >
     >      // Set the correct CCSID.
     >
     >      http_setCCSIDs(1208:0);
     >
     >
     >      // Strip off back end CRLFs on the returned XMLs.
     >
     >      http_XmlStripCRLF(*ON);
     >
     >
     >
     >     /end-free
     >
     >    p Setup           e
     >
     >
     >
     >
     >
     c*==================================================================
     ==
     >
     >    c* WebService(); Call The Web Service.
     >
     >
     >
     c*==================================================================
     ==
     >
     >
     >
     >    p WebService      b
     >
     >    d WebService      pi            10i 0
     >
     >     /free
     >
     >
     >
     >       Soap =
     >
     >       '<?xml version="1.0" encoding="iso-8859-1"
     standalone="no"?>'
     >
     >          +' <soapenv:Envelope '
     >
     >          +  '
     xmlns:soapenv="[25]http://schemas.xmlsoap.org/soap/envelope/"; '
     >
     >          +  '
     xmlns:upd="[26]http://webservices.vonmaur.vmc/UpdateCMA.asmx";>'
     >
     >          +   '   <soapenv:Header/>'
     >
     >          +   '   <soapenv:Body>'
     >
     >          +   '      <upd:ProcessJournal/>'
     >
     >          +   '   </soapenv:Body>'
     >
     >          + '</soapenv:Envelope>';
     >
     >
     >
     >      // Consume the web service.
     >
     >      ReturnCode = http_url_post_xml(
     >
     >        '[27]http://webservices.vonmaur.vmc/UpdateCMA.asmx'
     >
     >        : %addr(SOAP) + 2
     >
     >        : %len(SOAP)
     >
     >        : *NULL
     >
     >        : %paddr(Incoming)
     >
     >        : %addr(ProcessJrn)
     >
     >        :
     >    HTTP_TIMEOUT
     >
     >        : HTTP_USERAGENT
     >
     >        : 'text/xml'
     >
     >        :
     '[28]http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal');
     >
     >
     >
     >      return ReturnCode;
     >
     >
     >
     >     /end-free
     >
     >    p WebService      e
     >
     >
     >
     c*==================================================================
     ==
     >
     >    c* Incoming1();
     >
     >    c* Parse the XML coming in to see what the client ID we
     received is.
     >
     >
     >
     c*==================================================================
     ==
     >
     >
     >
     >    p Incoming        B
     >
     >    d Incoming        PI
     >
     >    d   ProcessJrn                 100a
     >
     >    d   depth                       10i 0 value
     >
     >    d   name                      1024a   varying const
     >
     >    d   path                     24576a   varying const
     >
     >    d   value                    65535a   varying const
     >
     >    d   attrs                         *   dim(32767)
     >
     >    d                                     const options(*varsize)
     >
     >
     >
     >    D atof            PR             8F   extproc('atof')
     >
     >    D   string                        *   value options(*string)
     >
     >     /free
     >
     >
     >
     >      if (name = 'ProcessJournal');
     >
     >       ProcessJrn = value;
     >
     >      endif;
     >
     >
     >
     >     /end-free
     >
     >    p Incoming        E
     >
     >
     --------------------------------------------------------------------
     --
     > - This is the FTPAPI mailing list.  To unsubscribe, please go to:
     > [29]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     --------------------------------------------------------------------
     --
     > -
     >
     >
     -------------- next part --------------
        You should post the debug log, making sure to strip out user IDs
     and
        passwords.
        But generally speaking, a 400 Bad Request means you didn't send
     your
        request correctly.
        Does the web service you are trying to call have a WSDL that
     provides a
        definition of how to use the service?
        Charles
        On Mon, Apr 1, 2013 at 2:27 PM, Mauricio Diaz-Lapham
        <[1][30]MDiaz-Lapham@xxxxxxxxxxx> wrote:
             Hello, Can someone help me! I keep getting this error and I
     have
          no
             clue as to what is causing it. Below is my code.
             H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
             d Setup           pr
             d WebService      pr            10i 0
             D Incoming        PR
             d   ProcessJrn                 100A
             D   depth                       10I 0 value
             D   name                      1024A   varying const
             D   path                     24576A   varying const
             D   value                    65535A   varying const
             D   attrs                         *   dim(32767)
             D                                     const
     options(*varsize)
             d ARWBSRV01       pi
             d  ErrMsg                     1024a   varying

     *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
          *=

     c*==================================================================
          ==
             c* Copybooks

     c*==================================================================
          ==
              /copy config_h
              /copy httpapi_h
             d Soap            s
             32767a
             d ProcessJrn      s            100a
             d ReturnCode      s             10i 0
             d WebSite         s            100a
             D soapfile        s             50a   varying
             dVariableRecords...
             d                 ds                  Qualified
             d Number                        10i 0

     c*==================================================================
          ==
             c* Main

     c*==================================================================
          ==
              /free
                  Setup();
             /end-free

     ********************************************************************
          **
             * Main processing - Call the Webservice to update CMA

     ********************************************************************
          **
             /Free
                  // Call the web service that will update the client
     smart
          file.
                  ReturnCode = WebService();
                  If ReturnCode <> 1;
                     ErrMsg = http_error();
                     ReturnCode = -1;
                  EndIf;
               /end-free

     c*==================================================================
          ==
             c* Setup();
             c*
             c* General setup.

     c*==================================================================
          ==
             p Setup           b
              /free
               VariableRecords.Number = 4; // Number of keys.
               // Turn HTTP debug on or off
               http_debug(*ON);
               // Set the correct CCSID.
               http_setCCSIDs(1208:0);
               // Strip off back end CRLFs on the returned XMLs.
               http_XmlStripCRLF(*ON);
              /end-free
             p Setup           e

     c*==================================================================
          ==
             c* WebService(); Call The Web Service.

     c*==================================================================
          ==
             p WebService      b
             d WebService      pi            10i 0
              /free
                Soap =
                '<?xml version="1.0" encoding="iso-8859-1"
     standalone="no"?>'
                   +' <soapenv:Envelope '
                   +  '

     xmlns:soapenv="[2][31]http://schemas.xmlsoap.org/soap/envelope/"; '
                   +  '

     xmlns:upd="[3][32]http://webservices.vonmaur.vmc/UpdateCMA.asmx";>'
                   +   '   <soapenv:Header/>'
                   +   '   <soapenv:Body>'
                   +   '      <upd:ProcessJournal/>'
                   +   '   </soapenv:Body>'
                   + '</soapenv:Envelope>';
               // Consume the web service.
               ReturnCode = http_url_post_xml(
                 '[4][33]http://webservices.vonmaur.vmc/UpdateCMA.asmx'
                 : %addr(SOAP) + 2
                 : %len(SOAP)
                 : *NULL
                 : %paddr(Incoming)
                 : %addr(ProcessJrn)
                 :
             HTTP_TIMEOUT
                 : HTTP_USERAGENT
                 : 'text/xml'
                 :

     '[5][34]http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal');
               return ReturnCode;
              /end-free
             p WebService      e

     c*==================================================================
          ==
             c* Incoming1();
             c* Parse the XML coming in to see what the client ID we
     received
          is.

     c*==================================================================
          ==
             p Incoming        B
             d Incoming        PI
             d   ProcessJrn                 100a
             d   depth                       10i 0 value
             d   name                      1024a   varying const
             d   path                     24576a   varying const
             d   value                    65535a   varying const
             d   attrs                         *   dim(32767)
             d                                     const
     options(*varsize)
             D atof            PR             8F   extproc('atof')
             D   string                        *   value options(*string)
              /free
               if (name = 'ProcessJournal');
                ProcessJrn = value;
               endif;
              /end-free
             p Incoming        E

     --------------------------------------------------------------------
          ---
          This is the FTPAPI mailing list.  To unsubscribe, please go to:
          [6][35]http://www.scottklement.com/mailman/listinfo/ftpapi

     --------------------------------------------------------------------
          ---
     References
        1. mailto:[36]MDiaz-Lapham@xxxxxxxxxxx
        2. [37]http://schemas.xmlsoap.org/soap/envelope/
        3. [38]http://webservices.vonmaur.vmc/UpdateCMA.asmx
        4. [39]http://webservices.vonmaur.vmc/UpdateCMA.asmx
        5. [40]http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal'
        6. [41]http://www.scottklement.com/mailman/listinfo/ftpapi
     ------------------------------
     Message: 3
     Date: Mon, 01 Apr 2013 15:05:16 -0500
     From: Scott Klement <[42]sk@xxxxxxxxxxxxxxxx>
     To: HTTPAPI and FTPAPI Projects <[43]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Subject: Re: HTTP/1.1 400 Bad Request
     Message-ID: <[44]5159E87C.908@xxxxxxxxxxxxxxxx>
     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
     I don't see anything obvious in your code that would cause this
     problem.   Please generate a debug/trace file so we can see what's
     going on.
     On 4/1/2013 1:27 PM, Mauricio Diaz-Lapham wrote:
     >     Hello, Can someone help me! I keep getting this error and I
     have no
     >     clue as to what is causing it. Below is my code.
     >
     >
     >
     ------------------------------
     Message: 4
     Date: Mon, 01 Apr 2013 15:15:35 -0500
     From: Scott Klement <[45]sk@xxxxxxxxxxxxxxxx>
     To: HTTPAPI and FTPAPI Projects <[46]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Subject: Re: HTTPAPI with CDATA
     Message-ID: <[47]5159EAE7.3020002@xxxxxxxxxxxxxxxx>
     Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
     Hello,
     The format of the XML you are sending is probably NOT related to the
     format of the XML you're getting back.  So telling us that you've
     encoded the XML you're sending to the server properly, does not (at
     least in my experience) have any impact on what you're getting back.
     It's a matter of keeping the "payload" of the SOAP message separate
     from the XML that makes up the SOAP message itself.
     Remember, a web service call is really calling a program/procedure
     over the web.  The XML documents are used to represent parameters
     passed either into or out of the routine you're calling.  In this
     example, the server is sending you an output document.... so it has
     output
     parameters.   Here's a simple example:
     <Envelope>
        <Body>
          <document>
            <parm1>any data can go here</parm1>
            <parm2>any data can go here</parm2>
          </document>
        </Body>
     </Envelope>
     Now suppose you decided to pass an XML document in "parm2".  After
     all, an XML document is just a character string -- so what if parm2
     contains
     a whole XML document inside it.   That document would HAVE TO have
     it's
     tags converted to &lt; and &gt;, otherwise it'd interfere with the
     integrity of the Envelope/Body/document/parm2 tags themselves.
     It's important to understand that almost everyone calling a SOAP web
     service is using SOAP tooling.  They aren't coding the SOAP document
     by hand like you are doing here -- they actually call a 3rd party
     program that GENERATES the code.  So from their perspective, they
     have something
     like:
          parm1 = "data";
          parm2 = "whole XML document here";
          call WebService(parm1, parm2);
     And, under the covers, the 3rd party tool converts this to the SOAP
     message.  The data you got back in parm2 would already be removed
     from the SOAP message and un-escaped.  The caller would never even
     know that it was escaped during transit, because the 3rd party tool
     does all of that for them.
     But, HTTPAPI doesn't know anything about SOAP... it's not a SOAP
     tool,
     it's purely an HTTP transfer tool (unlike IWS or Thomas's WSDL2RPG).
     So HTTPAPI takes a string, and sends it over the network.  It's up
     to you to format it all correctly, and to handle the data that comes
     back correctly.  It doesn't know it's SOAP.
     As Mike said (and pointed you to examples) when HTTPAPI parses the
     XML that's sent back, it'll automatically convert the &lt; and &gt;
     stuff back to the < and > characters, so I don't even see why this
     is causing you a problem.. it's very simple to deal with.
     On 4/1/2013 9:57 AM, Kim Tay wrote:
     >     Hi,
     >
     >     We used the HTTPAPI with CDATA to consume of of the Vendor Web
     Service,
     >     but the response is  returning result tag with &lt; and &gt;
     instead of
     >     < >, I asked the Vendor why and  ithey asked me what tool that
     I used?
     >     I old them simple XML via HTTPAPI from IBM i.  Did I miss out
     some
     >     functions/method? Appreciate if you can advise me.
     >
     >     Thanks!
     >
     >     Hereby is my send doc
     >
     >     SENDDOC): entered
     >     <?xml version="1.0" encoding="utf-8"?><soap:Envelope
     >     xmlns:soap="[1][48]http://schemas.xmlsoap.org/soap/envelope/";
     >     xmlns:xsi="[2][49]http://www.w3.org/2001/XMLSchema-instance";
     >
     xmlns:xsd="[3][50]http://www.w3.org/2001/XMLSchema";><soap:Body><Audi
     t
     >
     xmlns="[4][51]http://tempuri.org/McKessonAudit/Claim";><ClaimIn><![CD
     ATA[<?x
     >     ml version="1.0" standalone="yes"?><MIM-UI>  <SYSTEM-DATA>
     >     <MIM-OPTIONS>      <DEFINITION-NAME>MIM</DEFINITION-NAME>
     >     <UNIT-EXP-PRE-OPT>2</UNIT-EXP-PRE-OPT>
     >     <UNIT-EXP-POST-OPT>1</UNIT-EXP-POST-OPT>
     >     <MOD-EXP-PRE-OPT>2</MOD-EXP-PRE-OPT>
     >     <MOD-EXP-POST-OPT>1</MOD-EXP-POST-OPT>
     >     <EXP-PAY-PCT-IND>Y</EXP-PAY-PCT-IND>    </MIM-OPTIONS>
     >     <PRODUCT-OPTIONS>      <PRODUCT-NAME>ClaimCheck</PRODUCT-NAME>
     >     <CALL-SEQUENCE>0</CALL-SEQUENCE>
     >     <CLAIMCHECK-ACCOUNT>GMISDEFAULT</CLAIMCHECK-ACCOUNT>
     >     <AGE-REPLACE-IND>Y</AGE-REPLACE-IND
     >
     >     ...
     >
     >     ...
     >
     >     ...
     >
     >     </MIM-UI>]]></ClaimIn></Audit></soap:Body></soap:Envelope>
     >     recvresp(): entered
     >     HTTP/1.1 200 OK
     >     Cache-Control: private, max-age=0
     >     Content-Type: text/xml; charset=utf-8
     >     Server: Microsoft-IIS/7.5
     >     X-AspNet-Version: 2.0.50727
     >     X-Powered-By: [5][52]ASP.NET
     >     Date: Sun, 31 Mar 2013 23:15:46 GMT
     >     Content-Length: 14099
     >
     >     and here is the result;
     >
     >     RECVDOC
     >     SetError() #13: HTTP/1.1 200 OK
     >     recvresp(): end with 200
     >     recvdoc parms: identity 14099
     >     header_load_cookies() entered
     >     recvdoc(): entered
     >     SetError() #0:
     >     <?xml version="1.0" encoding="utf-8"?><soap:Envelope
     >     xmlns:soap="[6][53]http://schemas.xmlsoap.org/soap/envelope/";
     >     xmlns:xsi="[7][54]http://www.w3.org/2001/XMLSchema-instance";
     >
     xmlns:xsd="[8][55]http://www.w3.org/2001/XMLSchema";><soap:Body>
     >     <AuditResponse
     >
     xmlns="[9][56]http://tempuri.org/McKessonAudit/Claim";><AuditResult>
     >     &lt;![CDATA[&lt;?xml version="1.0"
     >
     standalone="yes"?&gt;&lt;MIM-UI&gt;&lt;CLAIM-GROUP&gt;&lt;CLAIM-DATA
     &gt
     >
     ;&lt;CLAIM-ID&gt;000140&lt;/CLAIM-ID&gt;&lt;MEMBER-DOB&gt;19540103&l
     t;/
     >
     MEMBER-DOB&gt;&lt;MEMBER-GENDER&gt;F&lt;/MEMBER-GENDER&gt;&lt;CLAIM-
     LAS
     >     T-LINE&gt;
     >
     >     ...
     >
     >     ...
     >
     >     ..
     >
     >     MSG-TEXT&gt;13152 CAN ONLY BE DONE  1 TIME(S) ON SINGLE DATE;
     >     DUPLICATE(S)
     >
     DENIED&lt;/MSG-TEXT&gt;&lt;/MESSAGE-ENTRY&gt;&lt;/MESSAGE-GROUP&gt;&
     lt;
     >     /MIM-UI&gt;
     >
     ]]&gt;</AuditResult></AuditResponse></soap:Body></soap:Envelope>
     >     http_close(): entered
     >
     > References
     >
     >     1. [57]http://schemas.xmlsoap.org/soap/envelope/
     >     2. [58]http://www.w3.org/2001/XMLSchema-instance
     >     3. [59]http://www.w3.org/2001/XMLSchema
     >     4. [60]http://tempuri.org/McKessonAudit/Claim
     >     5. [61]http://asp.net/
     >     6. [62]http://schemas.xmlsoap.org/soap/envelope/
     >     7. [63]http://www.w3.org/2001/XMLSchema-instance
     >     8. [64]http://www.w3.org/2001/XMLSchema
     >     9. [65]http://tempuri.org/McKessonAudit/Claim
     >
     >
     >
     >
     --------------------------------------------------------------------
     --
     > - This is the FTPAPI mailing list.  To unsubscribe, please go to:
     > [66]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     --------------------------------------------------------------------
     --
     > -
     -------------- next part --------------
        Hello,
        The format of the XML you are sending is probably NOT related to
     the
        format of the XML you're getting back.  So telling us that you've
        encoded the XML you're sending to the server properly, does not
     (at
        least in my experience) have any impact on what you're getting
     back.
        It's a matter of keeping the "payload" of the SOAP message
     separate
        from the XML that makes up the SOAP message itself.
        Remember, a web service call is really calling a
     program/procedure over
        the web.  The XML documents are used to represent parameters
     passed
        either into or out of the routine you're calling.  In this
     example, the
        server is sending you an output document.... so it has output
        parameters.   Here's a simple example:
        <Envelope>
          <Body>
            <document>
              <parm1>any data can go here</parm1>
              <parm2>any data can go here</parm2>
            </document>
          </Body>
        </Envelope>
        Now suppose you decided to pass an XML document in "parm2".
     After all,
        an XML document is just a character string -- so what if parm2
     contains
        a whole XML document inside it.   That document would HAVE TO
     have it's
        tags converted to &lt; and &gt;, otherwise it'd interfere with
     the
        integrity of the Envelope/Body/document/parm2 tags themselves.
        It's important to understand that almost everyone calling a SOAP
     web
        service is using SOAP tooling.  They aren't coding the SOAP
     document by
        hand like you are doing here -- they actually call a 3rd party
     program
        that GENERATES the code.  So from their perspective, they have
        something like:
            parm1 = "data";
            parm2 = "whole XML document here";
            call WebService(parm1, parm2);
        And, under the covers, the 3rd party tool converts this to the
     SOAP
        message.  The data you got back in parm2 would already be removed
     from
        the SOAP message and un-escaped.  The caller would never even
     know that
        it was escaped during transit, because the 3rd party tool does
     all of
        that for them.
        But, HTTPAPI doesn't know anything about SOAP... it's not a SOAP
     tool,
        it's purely an HTTP transfer tool (unlike IWS or Thomas's
     WSDL2RPG).
        So HTTPAPI takes a string, and sends it over the network.  It's
     up to
        you to format it all correctly, and to handle the data that comes
     back
        correctly.  It doesn't know it's SOAP.
        As Mike said (and pointed you to examples) when HTTPAPI parses
     the XML
        that's sent back, it'll automatically convert the &lt; and &gt;
     stuff
        back to the < and > characters, so I don't even see why this is
     causing
        you a problem.. it's very simple to deal with.
        On 4/1/2013 9:57 AM, Kim Tay wrote:
        Hi,
        We used the HTTPAPI with CDATA to consume of of the Vendor Web
     Service,
        but the response is  returning result tag with &lt; and &gt;
     instead of
        < >, I asked the Vendor why and  ithey asked me what tool that I
     used?
        I old them simple XML via HTTPAPI from IBM i.  Did I miss out
     some
        functions/method? Appreciate if you can advise me.
        Thanks!
        Hereby is my send doc
        SENDDOC): entered
        <?xml version="1.0" encoding="utf-8"?><soap:Envelope
        xmlns:soap="[1][1][67]http://schemas.xmlsoap.org/soap/envelope/";
        xmlns:xsi="[2][2][68]http://www.w3.org/2001/XMLSchema-instance";

     xmlns:xsd="[3][3][69]http://www.w3.org/2001/XMLSchema";><soap:Body><A
     udit

     xmlns="[4][4][70]http://tempuri.org/McKessonAudit/Claim";><ClaimIn><!
     [CDATA[<?x
        ml version="1.0" standalone="yes"?><MIM-UI>  <SYSTEM-DATA>
        <MIM-OPTIONS>      <DEFINITION-NAME>MIM</DEFINITION-NAME>
        <UNIT-EXP-PRE-OPT>2</UNIT-EXP-PRE-OPT>
        <UNIT-EXP-POST-OPT>1</UNIT-EXP-POST-OPT>
        <MOD-EXP-PRE-OPT>2</MOD-EXP-PRE-OPT>
        <MOD-EXP-POST-OPT>1</MOD-EXP-POST-OPT>
        <EXP-PAY-PCT-IND>Y</EXP-PAY-PCT-IND>    </MIM-OPTIONS>
        <PRODUCT-OPTIONS>      <PRODUCT-NAME>ClaimCheck</PRODUCT-NAME>
        <CALL-SEQUENCE>0</CALL-SEQUENCE>
        <CLAIMCHECK-ACCOUNT>GMISDEFAULT</CLAIMCHECK-ACCOUNT>
        <AGE-REPLACE-IND>Y</AGE-REPLACE-IND
        ...
        ...
        ...
        </MIM-UI>]]></ClaimIn></Audit></soap:Body></soap:Envelope>
        recvresp(): entered
        HTTP/1.1 200 OK
        Cache-Control: private, max-age=0
        Content-Type: text/xml; charset=utf-8
        Server: Microsoft-IIS/7.5
        X-AspNet-Version: 2.0.50727
        X-Powered-By: [5][71]ASP.NET
        Date: Sun, 31 Mar 2013 23:15:46 GMT
        Content-Length: 14099
        and here is the result;
        RECVDOC
        SetError() #13: HTTP/1.1 200 OK
        recvresp(): end with 200
        recvdoc parms: identity 14099
        header_load_cookies() entered
        recvdoc(): entered
        SetError() #0:
        <?xml version="1.0" encoding="utf-8"?><soap:Envelope
        xmlns:soap="[6][5][72]http://schemas.xmlsoap.org/soap/envelope/";
        xmlns:xsi="[7][6][73]http://www.w3.org/2001/XMLSchema-instance";

     xmlns:xsd="[8][7][74]http://www.w3.org/2001/XMLSchema";><soap:Body>
        <AuditResponse

     xmlns="[9][8][75]http://tempuri.org/McKessonAudit/Claim";><AuditResul
     t>
        &lt;![CDATA[&lt;?xml version="1.0"

     standalone="yes"?&gt;&lt;MIM-UI&gt;&lt;CLAIM-GROUP&gt;&lt;CLAIM-DATA
     &gt

     ;&lt;CLAIM-ID&gt;000140&lt;/CLAIM-ID&gt;&lt;MEMBER-DOB&gt;19540103&l
     t;/

     MEMBER-DOB&gt;&lt;MEMBER-GENDER&gt;F&lt;/MEMBER-GENDER&gt;&lt;CLAIM-
     LAS
        T-LINE&gt;
        ...
        ...
        ..
        MSG-TEXT&gt;13152 CAN ONLY BE DONE  1 TIME(S) ON SINGLE DATE;
        DUPLICATE(S)

     DENIED&lt;/MSG-TEXT&gt;&lt;/MESSAGE-ENTRY&gt;&lt;/MESSAGE-GROUP&gt;&
     lt;
        /MIM-UI&gt;
        ]]&gt;</AuditResult></AuditResponse></soap:Body></soap:Envelope>
        http_close(): entered
     References
        1. [9][76]http://schemas.xmlsoap.org/soap/envelope/
        2. [10][77]http://www.w3.org/2001/XMLSchema-instance
        3. [11][78]http://www.w3.org/2001/XMLSchema
        4. [12][79]http://tempuri.org/McKessonAudit/Claim
        5. [13][80]http://asp.net/
        6. [14][81]http://schemas.xmlsoap.org/soap/envelope/
        7. [15][82]http://www.w3.org/2001/XMLSchema-instance
        8. [16][83]http://www.w3.org/2001/XMLSchema
        9. [17][84]http://tempuri.org/McKessonAudit/Claim
     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [18][85]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---
     References
        1. [86]http://schemas.xmlsoap.org/soap/envelope/
        2. [87]http://www.w3.org/2001/XMLSchema-instance
        3. [88]http://www.w3.org/2001/XMLSchema
        4. [89]http://tempuri.org/McKessonAudit/Claim
        5. [90]http://schemas.xmlsoap.org/soap/envelope/
        6. [91]http://www.w3.org/2001/XMLSchema-instance
        7. [92]http://www.w3.org/2001/XMLSchema
        8. [93]http://tempuri.org/McKessonAudit/Claim
        9. [94]http://schemas.xmlsoap.org/soap/envelope/
       10. [95]http://www.w3.org/2001/XMLSchema-instance
       11. [96]http://www.w3.org/2001/XMLSchema
       12. [97]http://tempuri.org/McKessonAudit/Claim
       13. [98]http://asp.net/
       14. [99]http://schemas.xmlsoap.org/soap/envelope/
       15. [100]http://www.w3.org/2001/XMLSchema-instance
       16. [101]http://www.w3.org/2001/XMLSchema
       17. [102]http://tempuri.org/McKessonAudit/Claim
       18. [103]http://www.scottklement.com/mailman/listinfo/ftpapi
     ------------------------------
     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list digest.  To unsubscribe, go to:
     [104]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---
     End of Ftpapi Digest, Vol 78, Issue 3
     *************************************
     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [105]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---

References

   1. mailto:MDiaz-Lapham@xxxxxxxxxxx
   2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. mailto:ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
   5. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   6. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   7. http://scottklement.com/mailman/listinfo/ftpapi
   8. mailto:ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx
   9. mailto:ftpapi-owner@xxxxxxxxxxxxxxxxxxxxxx
  10. mailto:rgilsdor@xxxxxxxxxxxxxxxx
  11. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  12. mailto:F911C5CB2047A14F823096C71297EEE1014CCB7A7CF7@xxxxxxxxxxxxxxxxxxxxxxxxxxx
  13. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  14. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  15. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  16. http://schemas.xmlsoap.org/soap/envelope/
  17. http://webservices.vonmaur.vmc/UpdateCMA.asmx
  18. http://webservices.vonmaur.vmc/UpdateCMA.asmx
  19. http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal'
  20. http://www.rushtrucking.com/
  21. mailto:charles.wilt@xxxxxxxxx
  22. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  23. mailto:Tnc7SjCKr-JPUcv5U%2BhTfUKwe0z2kP-JjnTLdKi16oN1p0Q@xxxxxxxxxxxxxx
  24. mailto:MDiaz-Lapham@xxxxxxxxxxx
  25. http://schemas.xmlsoap.org/soap/envelope/
  26. http://webservices.vonmaur.vmc/UpdateCMA.asmx
  27. http://webservices.vonmaur.vmc/UpdateCMA.asmx
  28. http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal'
  29. http://www.scottklement.com/mailman/listinfo/ftpapi
  30. mailto:MDiaz-Lapham@xxxxxxxxxxx
  31. http://schemas.xmlsoap.org/soap/envelope/
  32. http://webservices.vonmaur.vmc/UpdateCMA.asmx
  33. http://webservices.vonmaur.vmc/UpdateCMA.asmx
  34. http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal'
  35. http://www.scottklement.com/mailman/listinfo/ftpapi
  36. mailto:MDiaz-Lapham@xxxxxxxxxxx
  37. http://schemas.xmlsoap.org/soap/envelope/
  38. http://webservices.vonmaur.vmc/UpdateCMA.asmx
  39. http://webservices.vonmaur.vmc/UpdateCMA.asmx
  40. http://webservices.vonmaur.vmc/UpdateCMA/ProcessJournal
  41. http://www.scottklement.com/mailman/listinfo/ftpapi
  42. mailto:sk@xxxxxxxxxxxxxxxx
  43. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  44. mailto:5159E87C.908@xxxxxxxxxxxxxxxx
  45. mailto:sk@xxxxxxxxxxxxxxxx
  46. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  47. mailto:5159EAE7.3020002@xxxxxxxxxxxxxxxx
  48. http://schemas.xmlsoap.org/soap/envelope/
  49. http://www.w3.org/2001/XMLSchema-instance
  50. http://www.w3.org/2001/XMLSchema
  51. http://tempuri.org/McKessonAudit/Claim
  52. http://ASP.NET/
  53. http://schemas.xmlsoap.org/soap/envelope/
  54. http://www.w3.org/2001/XMLSchema-instance
  55. http://www.w3.org/2001/XMLSchema
  56. http://tempuri.org/McKessonAudit/Claim
  57. http://schemas.xmlsoap.org/soap/envelope/
  58. http://www.w3.org/2001/XMLSchema-instance
  59. http://www.w3.org/2001/XMLSchema
  60. http://tempuri.org/McKessonAudit/Claim
  61. http://asp.net/
  62. http://schemas.xmlsoap.org/soap/envelope/
  63. http://www.w3.org/2001/XMLSchema-instance
  64. http://www.w3.org/2001/XMLSchema
  65. http://tempuri.org/McKessonAudit/Claim
  66. http://www.scottklement.com/mailman/listinfo/ftpapi
  67. http://schemas.xmlsoap.org/soap/envelope/
  68. http://www.w3.org/2001/XMLSchema-instance
  69. http://www.w3.org/2001/XMLSchema
  70. http://tempuri.org/McKessonAudit/Claim
  71. http://ASP.NET/
  72. http://schemas.xmlsoap.org/soap/envelope/
  73. http://www.w3.org/2001/XMLSchema-instance
  74. http://www.w3.org/2001/XMLSchema
  75. http://tempuri.org/McKessonAudit/Claim
  76. http://schemas.xmlsoap.org/soap/envelope/
  77. http://www.w3.org/2001/XMLSchema-instance
  78. http://www.w3.org/2001/XMLSchema
  79. http://tempuri.org/McKessonAudit/Claim
  80. http://asp.net/
  81. http://schemas.xmlsoap.org/soap/envelope/
  82. http://www.w3.org/2001/XMLSchema-instance
  83. http://www.w3.org/2001/XMLSchema
  84. http://tempuri.org/McKessonAudit/Claim
  85. http://www.scottklement.com/mailman/listinfo/ftpapi
  86. http://schemas.xmlsoap.org/soap/envelope/
  87. http://www.w3.org/2001/XMLSchema-instance
  88. http://www.w3.org/2001/XMLSchema
  89. http://tempuri.org/McKessonAudit/Claim
  90. http://schemas.xmlsoap.org/soap/envelope/
  91. http://www.w3.org/2001/XMLSchema-instance
  92. http://www.w3.org/2001/XMLSchema
  93. http://tempuri.org/McKessonAudit/Claim
  94. http://schemas.xmlsoap.org/soap/envelope/
  95. http://www.w3.org/2001/XMLSchema-instance
  96. http://www.w3.org/2001/XMLSchema
  97. http://tempuri.org/McKessonAudit/Claim
  98. http://asp.net/
  99. http://schemas.xmlsoap.org/soap/envelope/
 100. http://www.w3.org/2001/XMLSchema-instance
 101. http://www.w3.org/2001/XMLSchema
 102. http://tempuri.org/McKessonAudit/Claim
 103. http://www.scottklement.com/mailman/listinfo/ftpapi
 104. http://www.scottklement.com/mailman/listinfo/ftpapi
 105. http://www.scottklement.com/mailman/listinfo/ftpapi

------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list digest.  To unsubscribe, go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------


End of Ftpapi Digest, Vol 78, Issue 6
*************************************
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------