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

Facing 500 Internal Server Error while using HTTPAPI to call



Hi All,

I am still facing the 500 Internal Server Error from
the web service while using Http_Url_Post. I had the
web service people look in to the xml string I m
sending and it seems to be ok to them. the program
goes as below. Please have a look at it and suggest me
what may be wornng and where should I look at.

     H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
     D EMWEBSRV4       PR                 
ExtPgm('EMWEBSRV4')
     D MSSQLID                       10A   const
     D MSSQLPWD                      10A   const
     D FMPERSON                      30A   const
     D TOPERSON                      30A   const
     D MESSAGE                       30A   const
     D Subject                       30A   const
     D ReplyEmail                    30A   const
     D CC                            30A   const
     D BCC                           30A   const
     D BodyFormat                     1A   const
      *
     D EMWEBSRV4       PI
     D MSSQLID                       10A   const
     D MSSQLPWD                      10A   const
     D FMPERSON                      30A   const
     D TOPERSON                      30A   const
     D MESSAGE                       30A   const
     D Subject                       30A   const
     D ReplyEmail                    30A   const
     D CC                            30A   const
     D BCC                           30A   const
     D BodyFormat                     1A   const
      *
      /COPY HTTPAPI_H
     
     D Soap            S          32767A   Varying
     D Rc              S             10I 0
     D Test01          S            100A  
Inz('Testgsp')
     D*Success         S              8B 0
     D*Errmsg          S             30A
     D*Result          S               *

      /Free

       Soap = '<?xml version="1.0" encoding="UTF-8"?>'
       +'<soap:Envelope xmlns:xsi='
       +'"http://www.w3.org/2001/XMLSchema-instance";'
       +'xmlns:xsd="http://www.w3.org/2001/XMLSchema";'
      
+'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>'
       +'<soap:Body>'
       +'<executeSendEMail
xmlns="http://xxxxx.com/webservices/XXX/";>'
       +'<MSSQLUID>'    +%Trim(MSSQLID)   
+'</MSSQLUID>'
       +'<MSSQLPWD>'    +%Trim(MSSQLPWD)  
+'</MSSQLPWD>'
       +'<From_Person>' +%Trim(FMPERSON)  
+'</From_Person>'
       +'<To_Person>'   +%Trim(TOPERSON)  
+'</To_Person>'
       +'<Message>'     +%Trim(Message)   
+'</Message>'
       +'<Subject>'     +%Trim(Subject)   
+'</Subject>'
       +'<ReplyEmail>'  +%Trim(ReplyeMail)
+'</ReplyEmail>'
       +'<cc>'          +%Trim(CC)         +'</cc>'
       +'<bcc>'         +%Trim(Bcc)        +'</bcc>'
       +'<BodyFormat>'  +%Trim(Bodyformat)
+'</bodyFormat>'
       +'</executeSendEMail>'
       +'</soap:Body>'
       +'</soap:Envelope>';

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

         Rc = Http_url_post(
                  
'http://xxxdev/xxxwebservices/sqlmssql.asmx'
                    : %Addr(SOAP) + 2
                    : %Len(SOAP)
                    : Test01
                    : HTTP_TimeOut
                    : HTTP_UserAgent
                    : 'text/xml; charset=utf-8'
                    :
'http://xxxxx.com/webservices/XXX/executeSendEMail');
         If (Rc<>1);
            Http_Crash();
         Endif;
         *Inlr =*On;
      /End-Free

The WSDL Doc for the web Service goes as below

POST /xxxwebservices/sqlmssql.asmx HTTP/1.1
Host: xxxxx
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction:
"http://xxxxx.com/webservices/XXX/executeSendEMail";

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Body>
    <executeSendEMail
xmlns="http://xxxxx.com/webservices/XXX/";>
      <MSSQLUID>string</MSSQLUID>
      <MSSQLPWD>string</MSSQLPWD>
      <From_Person>string</From_Person>
      <To_Person>string</To_Person>
      <Message>string</Message>
      <Subject>string</Subject>
      <ReplyEmail>string</ReplyEmail>
      <cc>string</cc>
      <bcc>string</bcc>
      <BodyFormat>string</BodyFormat>
    </executeSendEMail>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Body>
    <executeSendEMailResponse
xmlns="http://xxxxx.com/webservices/XXX/";>
      <executeSendEMailResult>
        <Status>int</Status>
        <Success>boolean</Success>
        <ErrorMessage>string</ErrorMessage>
      </executeSendEMailResult>
    </executeSendEMailResponse>
  </soap:Body>
</soap:Envelope>

It would be help ful if you hve a look at it and
suggest me, what may be cuasing the problem.

Thanks and Regards,
Girija




--- ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx wrote:

> Send Ftpapi mailing list submissions to
> 	ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> 
> To subscribe or unsubscribe via the World Wide Web,
> visit
> 	http://www.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: Facing 500 Internal Error while using
> HTTPAPI to call a
>       web	service (girija patro)
>    2. Re :Re: Facing 500 Internal Error while using
> HTTPAPI to call
>       a web	service (Rizwan Khan)
>    3. RECV problem? (Eduard Sluis)
>    4. Re: Facing 500 Internal Error while using
> HTTPAPI to call a
>       web	service (Scott Klement)
>    5. Re: RECV problem? (Scott Klement)
> 
> 
>
----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 4 Oct 2006 13:20:41 -0700 (PDT)
> From: girija patro <girija79@xxxxxxxxx>
> Subject: Re: Facing 500 Internal Error while using
> HTTPAPI to call a
> 	web	service
> To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Message-ID:
>
<20061004202041.70085.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> Content-Type: text/plain; charset=iso-8859-1
> 
> Hi,
> 
> I am using the HTTPAPI to call one of our web
> services. The programs errors out with the following
> error.
> 
> HTTP/1.1 500 Internal Server Error.
> 
> It seems like a error in the server side. But the
> same
> webervices are being used by other systems easily.
> 
> Need help and sugestion about  what may be the issue
> and where should I start to look up.
> 
> 
> Thanks and Regards,
> 
> Girija Patro
> 
> 
> 
> 
> --- ftpapi-request@xxxxxxxxxxxxxxxxxxxxxx wrote:
> 
> > Send Ftpapi mailing list submissions to
> > 	ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> > 
> > To subscribe or unsubscribe via the World Wide
> Web,
> > visit
> > 
> http://www.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: SOCKUTIL vs HTTPAPI question
> > (Brian@xxxxxxxxxx)
> > 
> > 
> >
>
----------------------------------------------------------------------
> > 
> > Message: 1
> > Date: Mon, 2 Oct 2006 15:26:53 -0400
> > From: Brian@xxxxxxxxxx
> > Subject: Re: SOCKUTIL vs HTTPAPI question
> > To: HTTPAPI and FTPAPI Projects
> > <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> > Message-ID:
> > 
> >
>
<OF96579593.37787BD8-ON852571FB.006A60D1-852571FB.006AD244@xxxxxxxxxx>
> > Content-Type: text/plain; charset="us-ascii"
> > 
> > Scott,
> > 
> > Thanks for the reply.
> > 
> > Just to be clear, it's not that we added custom
> > routines to SOCKUTILR4. 
> > 
> > It is that we are using the version from SOCKTUT
> > (your Sockets Tutorial) 
> > and it has additional procedures over the version
> > from LIBHTTP.
> > 
> > 
> > If you choose to keep SOCKUTILR4 in LIBHTTP could
> > you make it the same 
> > version that is in SOCKTUT?   This will help with
> > the update problem you 
> > mention.
> > 
> > 
> > Brian J. Garland
> > Vermont Information Processing, Inc.
> > brian@xxxxxxxxxx
> > 
> > 
> > 
> > 
> > Scott Klement <sk@xxxxxxxxxxxxxxxx> 
> > Sent by: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> > 09/30/2006 02:01 AM
> > Please respond to
> > HTTPAPI and FTPAPI Projects
> > <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> > 
> > 
> > To
> > HTTPAPI and FTPAPI Projects
> > <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> > cc
> > 
> > Subject
> > Re: SOCKUTIL vs HTTPAPI question
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Hi Brian,
> > 
> > I strongly recommend that you never put any of
> your
> > own code in the same 
> > library with HTTPAPI.  I suggest that because it
> > makes it very hard to 
> > upgrade HTTPAPI.  I frequently create new versions
> > of HTTPAPI for the sole 
> > 
> > reason of fixing bugs, and you wouldn't be able to
> > use any of those bug 
> > fixes!  Or new features...  or whatever else.
> > 
> > The only stuff that should be in the same library
> > with HTTPAPI is the 
> > stuff that comes with it.  That way, you can
> delete
> > that library and 
> > install the new one, and none of your own code
> will
> > require any changes.
> > 
> > That being the case, there's really no harm in
> > having a separate copy of 
> > SOCKUTILR4 that has your own custom routines.
> > 
> > Having said that, I don't know of any reason why
> you
> > couldn't replace the 
> > copy of SOCKUTILR4 in HTTPAPI with the one from
> the
> > tutorial.  As far as I 
> > 
> > know, they're exactly the same (other than the
> extra
> > utilities, of 
> > course.)
> > 
> > Actually, I was considering eliminating SOCKUTILR4
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------