Before doing the http_url_post_stmf replace the special characters
gReference1 = %scanrpl('&' : 'AND' : gReference1);
gReference1 = %scanrpl('<' : ' ' : gReference1);
gReference1 = %scanrpl('>' : ' ' : gReference1);
gReference1 = %scanrpl('"' : ' ' : gReference1);
gReference1 = %scanrpl(x'7D': ' ' : gReference1);
lPos = %Scan( '&' : pVariableValue );
Dow lPos > *Zeros;
pVariableValue = %Replace( '&' : pVariableValue : lPos : 1 );
lPos = %Scan( '&' : pVariableValue : lPos + 1 );
lPos = %Scan( '<': pVariableValue );
Dow lPos > *Zeros;
pVariableValue = %Replace( '<' : pVariableValue : lPos : 1 );
lPos = %Scan( '<' : pVariableValue : lPos + 1 );
Chris Hayden Sr. Systems Analyst
Office: (904) 645-9999 ext.1252
Pilot Corporation of America
3855 Regent Blvd, Jacksonville, Florida 32224 United States
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Opt Out
scottklement.com[mailto:ftpapi-bounces@lists. scottklement.com] On Behalf Of Radu Botescu
Sent: Wednesday, February 15, 2017 11:24 AM
To: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Ftpapi] http_url_post_stmf with special characters
and thank you for your answer.
My problem is that the same file used in SOAPUI is working well :(...
Or maybe is there a way to use http_url_post_xml but in the procedure Incoming to receive pointers to the values (as in http_url_post_stmf ) and not the values ?
Any ideea is welcomed....
Thank you again,
On Wed, Feb 15, 2017 at 3:17 PM, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
This error is not coming from HTTPAPI. HTTPAPI doesn't know anything about your XML, it simply sends what you tell it to send. It is the web services server that is sending you this message.
On 2/12/17 7:11 AM, Radu Botescu wrote:
I have a problem when using http_url_post_stmf with special characters.
My project is to call a webservice and get back a shipping label.
In the area reserved to the shipping address, in my request, I could have special characters depends on the shipping country(é, Ü, etc).
If in my request I send:
<name><![CDATA[AAA BBB Ü]]></name>
I received this error:
xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas. xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/ 2001/XMLSchema" xmlns:xsi="http://www.w3.org/ 2001/XMLSchema-instance">< soapenv:Header/><soapenv:Body> <soapenv:Fault><faultcode> Server</faultcode>< faultstring>Internal Error</faultstring></soapenv: Fault></soapenv:Body></ soapenv:Envelope>"
If I remove the Ü ==> no error, I receive the right answer.
If I use http_url_post_xml with the exactly the same xml (the one with Ü) ==> no error, I do receive the right answer (but the answer is bigger than 65k...).
What I do in my pgm:
rc = http_url_post_stmf(
: '"'+'"' );
I'm using http-api/1.21.
Thank you in advance,
_________________Ftpapi mailing list
Ftpapi mailing list
_______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi