[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tanslate problem with http_url_post_xml
Sender: "Richard ECUYER" <recuyer@xxxxxxx>
Found a piece of the solution, it does not come from the iserie, i tested
the same with 2 differents servers (apache + php script that only return the
received datas) one works, the other no ....
Still searching why ...
----- Original Message -----
From: "Richard ECUYER" <recuyer@xxxxxxx>
To: <ftpapi@xxxxxxxxxxxxx>
Sent: Wednesday, March 22, 2006 2:21 PM
Subject: Tanslate problem with http_url_post_xml
> Sender: "Richard ECUYER" <recuyer@xxxxxxx>
>
> Hi group,
>
> I have a little problem with a post.
>
> I receive xml data in server mode, and to use http_url_post_xml, i send
the
> data received to a cgi that will just re-send the data, so i can act as a
> client.(to my iserie)
>
> But when the parser try to parse, the data received seems to be ascii, and
i
> can't find where and why it is trsaleted.
> I have tested the same program with a http_url_post, the datas are stored
> into an ifs and look good.
>
> here is what i do :
>
> Enc = http_url_encoder_new ;
> http_url_encoder_addvar ( Enc : 'param'
> : %addr ( Param_in )
> : %len ( Param_in )
> ) ;
> http_url_encoder_getptr (Enc : myPointer : dataSize )
>
> // Envoi des données sur l'AS/400
> url = 'http://myiserie/cgifram/httpback.pgm' ;
> PostData = http_url_encoder_getstr(Enc) ;
>
> //rc = http_url_post ( Url
> // : %addr(PostData) + 2
> // : %len(PostData)
> // : '/tmp/xml/debugpost.txt' <<<<< debugpost.txt was
OK
> // : 180
> // ) ;
>
> rc = http_url_post_xml
> ( url // URL de requête GET
> : %addr(PostData) + 2
> : %len(PostData)
> : *NUll
> : %paddr(StartOfElement)
> : %paddr(EndOfElement)
> : %addr(retour)
> : 120
> ) ; // in debug everything seems ok, and i get garbage after
> do_post
>
> callp http_url_encoder_freeEnc) ;
>
> Hope this is clear, and excuse my poor english ...
>
>
> ----- Original Message -----
> From: "Scott Klement" <sk@xxxxxxxxxxxxxxxx>
> To: <ftpapi@xxxxxxxxxxxxx>
> Sent: Monday, March 20, 2006 6:30 PM
> Subject: Re: http_url_post_xml problem
>
>
> > Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>
> >
> >
> > > I am using http_url_post_xml to pass data to a web service for sending
> > > email.
> >
> > Why on earth would you use a webservice for sending e-mail? Aren't you
> > allowed to send mail directly?
> >
> > > Below is the list of parameters I am sending. Originally message
> > > was one field, but I was unable to get this to work with the length
over
> > > 999. Just as a test I split the message body in 2, but am only able to
> > > get each one to 850 otherwise I receive an error. The problem is the
> > > message body is often greater then 1700 characters. I also tried
upping
> > > the length of EmailRequest and postData, but did not seem to help. Is
> > > there a limitation on the length of a variable?
> >
> > HTTPAPI supports POST data up to 2.1gb. (Yes, that's gigabytes) The
> > largest size variable you can declare in RPG is 65535 chars.
> >
> >
> > > Or is there an overall limitation to the entire length of data passed?
> > > Or am I just missing something else?
> >
> > Hard to say, you really haven't provided any information except that you
> > can't exceed 850 characters. The only code you provided was a bunch of
> > variable definitions, that really didn't tell me anything.
> >
> > You said you were receiving an error when the data exceeded 850
> > characters. It might help to post that error message.
> >
> > Or, at least tell me how to reproduce the problem.
> > -----------------------------------------------------------------------
> > This is the FTPAPI mailing list. To unsubsribe from the list send mail
> > to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
> > -----------------------------------------------------------------------
> >
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubsribe from the list send mail
> to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------