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

Re: [Ftpapi] HTTP_URL_POST_RAW Error



Dishant,

You are using the http_url_post_raw() routine. This routine calls the subprocedure you specified (in your example, this is a procedure called "Incoming") every time data arrives over the network.

So you are getting the "SUCCESS" in your "Incoming" routine. It is up to your routine to store this value into a variable or whatever it is that you want to do with it.

If you want this value to be placed in a file, then you are using the wrong routine in HTTPAPI. you should be using http_url_post (without "raw") instead.

Good luck!




On 1/3/2017 9:58 AM, Dishant Sharma wrote:
HI Scott,

We are using HTTPAPI Ver1.23 and I know that it is an older version we are using .
When I am saving the response of HTTP_URL_POST_RAW is the IFS folder then I am getting a SUCCESS as an response which I am getting in my Debug log too .

Is there any way that I can store this response in my RPG string file.

Any insight here will be helpful for me .

Thanks and Regards.
Dishant Sharma

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, January 03, 2017 6:05 PM
To: FTPAPI/HTTPAPI mailing list
Subject: Re: [Ftpapi] HTTP_URL_POST_RAW Error

This version of HTTPAPI is 9 years out of date.  Do you have the same problem with the current version?

On 1/2/2017 2:02 AM, Dishant Sharma wrote:
Hi Scott,

I am trying to post an XML to a Service which processes that XML and
Store it.

I am using HTTP_URL_POST_RAW () method for this.

rc = http_url_post_raw('http://10.201.223.193:9076/'

                    +'SalesOrder'

                   : %addr(SOAP)+ 2

                   : %len(SOAP)

                   : 1

                   : %paddr(Incoming)

                   : HTTP_TIMEOUT

                   : HTTP_USERAGENT

                   : 'text/xml; charset=utf-8');

While doing the HTTP_POST I am receiving an error on the code for
RC=PeProc(peFD:wwDATA:wwlen)   stating that    receiver value too
small to store result.

While Seeing the debug log of the Post I can see that the post was
successful.

Attached is the Debug Log for your reference.

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_persist_open(): entered

http_long_ParseURL(): entered

DNS resolver retrans: 2

DNS resolver retry  : 2

DNS resolver options: x'00000136'

DNS default domain: WARSAW.BMET

DNS server found: 10.1.3.4

DNS server found: 10.1.3.5

http_persist_post(): entered

http_long_ParseURL(): entered

do_post(): entered

POST /SalesOrder HTTP/1.1

Host: 10.201.223.193:9076

User-Agent: http-api/1.23

Content-Type: text/xml; charset=utf-8

Expect: 100-continue

Content-Length: 424

recvresp(): entered

HTTP/1.1 100 Continue

SetError() #13: HTTP/1.1 100 Continue

senddoc(): entered

<?xml version = "1.0" encoding =
"UTF-8"?><SalesOrder><Header><SourceSystem> XA
</SourceSystem><TargetSystem> JDE </TargetSystem><SalesOrderNo> 12345
</SalesOrderNo><DateCreated> 2016-12
</DateCreated></Header><Lines><LineID>1</LineID><ItemNo>113768</ItemNo
<AltItemNo>1137689</AltItemNo><ProductType>111</ProductType><Quantity
23</Quantity><UnitOfMeasure>EA
</UnitOfMeasure><UnitPrice>113</UnitPrice></Lines> </SalesOrder>

recvresp(): entered

HTTP/1.1 200 OK

Date: Mon, 02 Jan 2017 06:01:30 GMT

Server: Jakarta-HttpComponents-NIO/1.1

Content-Length: 7

Content-Type: text/html;charset=UTF-8

SetError() #13: HTTP/1.1 200 OK

recvdoc parms: identity 7

header_load_cookies() entered

recvdoc(): entered

SetError() #0:

SUCCESS

Kindly assist me what I have been doing wrong for this post operation.

Thanks and Regards.

Dishant Sharma

cid:image005.jpg@01D0B6FB.D1DB2170



::DISCLAIMER::
----------------------------------------------------------------------
----------------------------------------------------------------------
--------

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or may contain viruses in transmission. The e mail
and its contents (with or without referred errors) shall therefore not
attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of
the author and may not necessarily reflect the views or opinions of
HCL or its affiliates. Any form of reproduction, dissemination,
copying, disclosure, modification, distribution and / or publication
of this message without the prior written consent of authorized
representative of HCL is strictly prohibited. If you have received
this email in error please delete it and notify the sender
immediately.
Before opening any email and/or attachments, please check them for
viruses and other defects.

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



_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi

_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi


_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi