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

HTTP/1.1 500 Internal Server Error



   Hi Everybody,

   Thanks for help in my previous query. I am getting following error
   now. Can some body point out what mistake I am doing? I appreciate all
   the help.

   Here is Debug log:

   What is this suppose to mean?

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



   SetError() #13: HTTP/1.1 500 Internal Server
   Error.
   recvdoc parms: identity
   490
   header_load_cookies()
   entered
   recvdoc():
   entered
   SetError()
   #0:
   <?xml version="1.0"
   encoding="utf-8"?>
   <soap:Envelope
   xmlns:soap="[1]http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi=

   <soap:Body>


   <soap:Fault>


   <faultcode>soap:Server</faultcode>

         <faultstring>Server was unable to process request. --&gt; 'SOAP'
   is an unddeclared namespace. Line 1, position 56.</faultstring>
         <detail
   />
       </soap:Fault>



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

   MY RPG CODE IS ATTACHED,

   THX







   Vikas Mishra
   [2]vikasm@xxxxxxxxxx
   IT Applications
   SCJ Insurance Services
   925-474-3651 Direct
   925.474.3600 Company
   925.463.0822 Fax

References

   1. http://schemas.xmlsoap.org/soap/envelope/
   2. outbind://6/vikasm@xxxxxxxxxx
      *MODULE
      *
      **********
      * Echo Service Company
      *  This logs on to Lyons webserver
      *
      *  To Compile (requires V5R1):
      *     CRTBNDRPG PGM(WWW9112R1) SRCFILE(libhttp/QRPGLESRC)
      *
      *
     H*DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')

     D WWW9114         PR                  ExtPgm('WWW9114')
     D   Cmpid                       10  0 const
     D   usrname                     15A   const
     D   passwd                      15A   const
     D   tokensr                   1024A   varying
     D WWW9114         PI
     D   Cmpid                       10  0 const
     D   usrname                     15A   const
     D   passwd                      15A   const
     D   tokensr                   1024A   varying

      /copy httpapi_h

     D Incoming        PR
     D   String                   32767A   varying
     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 Add_SOAPACTION  PR
     D   Header                    1024A   varying
     D   UserData                      *   value

     D SOAP            s          32767A   varying
     D rc              s             10I 0
     D compid          s             10I 0
     D Result          s             12P 2
     D String          s          32767A   varying

      /free
              compid=cmpid  ;
       //       http_XmlStripCRLF(*ON);

       SOAP =
        '<?xml version="1.0" encoding="utf-8" standalone="no"?>'
       +'<SOAP:Envelope'
       +'    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";'
       +'    xmlns:xsd="http://www.w3.org/2001/XMLSchema";'
       +'    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";'
       +'    xmlns:tns="http://www.lyonsreg.com/WebService/ABAService";>'
       +'<SOAP:Body>'
       +'     <tns:Logon>'
       +'      <tns:companyID>'+ %trim(%char(Compid)) +'</tns:companyID>'
       +'      <tns:userName>'+ %trim(usrname) +'</tns:userName>'
       +'      <tns:password>'+ %trim(passwd)  +'</tns:password>'
       +'      </tns:Logon>'
       +'</SOAP:Body>'
       +'</SOAP:Envelope>';

       // HTTP_setCCSIDs(1208: 0);  // CCSID 1208 = UTF-8


       //  This tells HTTPAPI to call our subprocedure (in this example,
       //  the subprocedure is name ADD_SOAPACTION) when assembling the
       //  HTTP headers to send to the remote server.

        //  http_xproc( HTTP_POINT_ADDL_HEADER
        //         : %paddr(Add_SOAPACTION) );

       http_debug(*ON);

       rc = http_url_post_xml(
       'http://www.lyonsreg.com/webservices/abaexpress/ABAService.asmx'
                         : %addr(SOAP) + 2
                         : %len(SOAP)
                         : *NULL
                         : %paddr(Incoming)
                         : %addr(String)
                         : HTTP_TIMEOUT
                         : HTTP_USERAGENT
                         : 'text/xml'
                :'http://www.lyonsreg.com/WebService/ABAService/Logon') ;

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

       //  http_comp(String);
       tokensr=%trim(String)  ;
       http_comp(%trim(tokensr)) ;
       return;
       endif;

       *inlr = *on;

      /end-free

     P Incoming        B
     D Incoming        PI
     D   String                   32767A   varying
     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)

      /free
          if (name = 'LogonResult') ;
                 String = value;
          endif;
      /end-free
     P                 E

      *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      * HTTPAPI will call this (because we set it with http_xproc)
      * just before sending the HTTP headers to the remote server.
      * This procedure lets us add any header we like to the
      * HTTP request.
      *
      * In this example, I'll use it to supply the SoapAction:
      * header.  This way, I can supply a SOAPAction that's up to
      * 1024 characters long.
      *
      * NOTE: Make sure you leave off the SOAPAction header on the
      *       HTTP_url_post_xml, above, otherwise you'll send two
      *       of them!
      *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     P Add_SOAPACTION  B
     D Add_SOAPACTION  PI
     D   Header                    1024A   varying
     D   UserData                      *   value
      /free
         Header = 'SOAPAction: '
              + 'http://www.lyonsreg.com/WebService/ABAService/Logon'
                + x'0d25';
      /end-free
     P                 E

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