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

Re: REST WS Problem



This is what is in the debug text.

HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V6R1M0

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry  : 2
DNS resolver options: x'00000136'
DNS default domain: AD.CHURCHMUTUAL.COM
DNS server found: 10.20.4.2
DNS server found: 10.20.4.3
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /print-eor-service/rest/print/eor HTTP/1.1
Host: cmdev2:9080
User-Agent: http-api/1.23
Content-Type: text/xml; charset=utf-8
SOAPAction: /print-eor-service/rest/print/eor
Expect: 100-continue
Content-Length: 254


recvresp(): entered
HTTP/1.1 100 Continue
Content-Length: 0
Date: Fri, 02 Oct 2015 19:22:38 GMT


SetError() #13: HTTP/1.1 100 Continue
senddoc(): entered
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><printEORRequestType><CMUserName>dherald</CMUserName><CMPassword>kentucky</CMPassword><EORDocument><ClaimNumber>1234567</ClaimNumber><EORNumber>1234567</EORNumber></EORDocument></printEORRequestType>
recvresp(): entered
HTTP/1.1 500 Internal Server Error
Date: Fri, 02 Oct 2015 19:22:38 GMT
X-Powered-By: Servlet/3.0
Content-Type: text/html;charset=utf-8
$WSEP:
Content-Language: en-US
Content-Length: 42
Connection: Close


SetError() #13: HTTP/1.1 500 Internal Server Error
recvdoc parms: identity 42
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
Error 500: java.lang.NullPointerException
SetError() #13: HTTP/1.1 500 Internal Server Error
http_close(): entered
 ************End of Data********************

On 10/2/15, Jim Muehe <jmuehe@xxxxxxxxxxxxxxxx> wrote:
> I agree, the default location for the log is
>         /tmp/httpapi_debug.txt
>
> WRKLNK OBJ('/tmp/httpapi_debug.txt')
>
> Jim Muehe
>
>
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Charles Wilt
> Sent: Friday, October 02, 2015 1:00 PM
> To: HTTPAPI and FTPAPI Projects
> Subject: Re: REST WS Problem
>
> Should be
> http_debug(*ON);
>
> Charles
>
> On Fri, Oct 2, 2015 at 2:36 PM, Donna Herald <donna.g.herald@xxxxxxxxx>
> wrote:
>
>> Scott,
>> I appologize for my issues...if I add 'callp httpapi_debug(*on)' my
>> program will not compile.  I get the following error,, the name or
>> indicator is not defined (HTTPAPI).  I have libhttp added to my
>> library list.  I did find this in my link, Error 500:
>> java.lang.NullPointerException
>>
>> The purpose of the project is to send data over to the webservice.
>> The java programmer created a service web service program which takes
>> you to a web page for testing.  I cannot access this as I am on a
>> virtual and do not have access, however I have had someone else paste
>> in the xml and it seems to work right from there.
>>
>> From SOAPUI I asked someone to try and it will not work from SOAPUI.
>> I dont have the authority to try from SOAPUI either.
>>
>> I am not sure if I should even be using the http_url_post or the
>> http_url_post_xml.  The service I was given by the java programmer
>> says he is expecting one paramether but the http commands expects more
>> which I am passing.
>>
>> I think it must have to do with the wrong values in the paramets I am
>> passing.  Were you able to open up my attachments to see my program.
>>
>> Scott, thanks so much for your help.  I am at a loss of what to do and
>> no one here seems to know either.
>>
>> Donna
>>
>>
>>
>>
>> On 10/2/15, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
>> > Hey Donna,
>> >
>> > When it sends "500" as a response, this doesn't tell us anything
>> > specific.  It simply means that the web service noticed an error.
>> > Nothing more specific than that...
>> >
>> > However, the web service should have sent a response containing more
>> > information.   This may be in the form of an XML or JSON document
>> > containing the error message -- so you might check the document you
>> > received back to see if it has the error message in it (in place of
>> > the normal WS response.)
>> >
>> > You can also create an HTTPAPI debug/trace file that contains a lot
>> > of technical information about what is going on under the covers. To
>> > do that, you can add a line of code to your program (before calling
>> > HTTPAPI
>> > routines) like this:
>> >
>> > callp httpapi_debug(*on)
>> >
>> > When you run your program again, it will produce a file in the IFS
>> > named /tmp/httpapi_debug.txt that contains the aforementioned technical
>> > info.
>> > Please look that over and see if you can figure this out,.   If not,
>> > download the file to your PC, obscure any sensitive info (especially
>> > any passwords... remove any authorization/authenticate lines) and
>> > attach the file to an e-mail in reply to this mailing list.  This
>> > will give us information that we can use to try to understand what is
>> > going on.
>> >
>> > Hope that helps
>> >
>> >
>> >
>> > On 10/2/2015 9:16 AM, Donna Herald wrote:
>> >> Please see the prior email
>> >>
>> >> On 10/2/15, Donna Herald <donna.g.herald@xxxxxxxxx> wrote:
>> >>> Hello,
>> >>>
>> >>> I am trying to create a program to call a REST WS but I am getting
>> >>> an error, ‘HTTP/1.1 500 Internal Server Error’.  I am new to REST
>> >>> WS and API’s.  I have debugged my program several times but I
>> >>> cannot find the problem.  I think it must be with the parameters I
>> >>> am using for the post but I cannot find the problem.  I have
>> >>> attached my program and would appreciate any available assistance.
>> >>>
>> >>>
>> >>> Donna G Herald
>> >>>
>> >> -------------------------------------------------------------------
>> >> ---- This is the FTPAPI mailing list.  To unsubscribe, please go
>> >> to:
>> >> http://www.scottklement.com/mailman/listinfo/ftpapi
>> >> -------------------------------------------------------------------
>> >> ----
>> >>
>> >
>> > --------------------------------------------------------------------
>> > --- This is the FTPAPI mailing list.  To unsubscribe, please go to:
>> > http://www.scottklement.com/mailman/listinfo/ftpapi
>> > --------------------------------------------------------------------
>> > ---
>> >
>> ----------------------------------------------------------------------
>> - This is the FTPAPI mailing list.  To unsubscribe, please go to:
>> http://www.scottklement.com/mailman/listinfo/ftpapi
>> ----------------------------------------------------------------------
>> -
>>
>
> ________________________________
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
> for the sole use of the intended recipient(s) and may contain confidential
> and proprietary information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient(s), please
> contact the sender by reply e-mail and destroy all copies of the original
> message.
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------