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

RE: HTTP/1.1 400 Bad Request



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
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------