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

RE: Web services



Hello All:

Thank you for your response back to answer your question does not support
any empty value, the weird part is that 
I do not see the Doble "||" in the Data or in my program but let me review
it once again

Thanks for all your help


Regards,

Carlos Lugo

Multitec Consultants Group Inc.

( 310-717-7327

JCLUGO@xxxxxxxxx


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Rick Connor
Sent: Monday, October 15, 2012 12:22 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: Web services

It would appear that it is now a matter of conforming to the provider's
parameter formatting convention. 

Just out of curiosity, does it support empty name~value pairs. Notice that
you are passing 

|BADDRESS~1234||BZIP~83852|INVOICE~8888|    

Is the service expecting (does it support) nothing between the pipe
delimiters?






-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of J. Carlos Lugo
Sent: Monday, October 15, 2012 1:07 PM
To: 'HTTPAPI and FTPAPI Projects'
Subject: RE: Web services

Hello Scott:

Thank you for your answer, Yes the Postdata is a Varying field
D postData        s          40000A   varying  

We are running V6R1 and this is how the Post data Look in the Program and
when is doing the Post
postData =                                                         
  'parmlist='                                                  +   
  'UN~demo123|PSWD~demo123|TERMS~Y|METHOD~ProcessTranx|'       +   
  'TRANXTYPE~Authorization|CC~4012881888818888|EXPMNTH~12|'    +   
  'EXPYR~12|AMOUNT~1.00|CSC~999|BADDRESS~1234|BZIP~83852|'     +   
  'INVOICE~8888|'                                              ;   
                                                                   
rc = http_url_post('https://paytrace.com/api/default.pay?'         
                      : %addr(postData:*DATA)                      
                      : %len(%trimr(postData))                     
                      : '/tmp/httptest.html');                     


Now I do not see the Special character anymore but now Still Paytrace is
sending me the following error below:

ERROR~990. Please provide a properly formatted parameter string.|   


See the attached Text File for the Debug Log 

I really appreciate all your help that you provide to all of us in using
your excellent tool for web services.


Regards,

Carlos Lugo

Multitec Consultants Group Inc.

( 310-717-7327

JCLUGO@xxxxxxxxx

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, October 12, 2012 3:51 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Web services

Hi Carlos,

My guess would be that postData is a VARYING field.  This is just a guess,
because you did not include the definition of this field in your message,
but it would explain the behavior you're seeing.

VARYING fields are stored in memory as a 2 or 4 byte unsigned integer that
keeps track of the current length of the field, followed by the actual
characters in the field.  So if your postData variable is 65535 
long or shorter, the first two bytes in memory would be the length.   
When you pass %addr(postData) to HTTPAPI, the address you're supplying
points to those length bytes, so HTTPAPI dutifully sends those length bytes
to the server.

That's why in some of my examples, you'll see me do:  %addr(myVar) + 
2.    The +2 provides an address that's two bytes higher -- i.e. it 
skips over those two length bytes.   On V6R1 and higher, IBM gave us a 
way to do that automatically with %ADDR(myVar:*DATA), which is better
because it's more self-documenting.

Anyway, try changing your code to %ADDR(postData: *DATA) or if you're still
on V5R4 or earlier, do %ADDR(postData)+2 and see if that solves the problem.

Good luck!



On 10/12/2012 1:48 PM, J. Carlos Lugo wrote:
>     Hello All:
>
>
>     I am submitting a HTTP Post to Pay Trace web services but when pay
>     trace received my Data String shows a weird character
>
>
>     Here is the Data String submitted to Pay Trace
>
>     Hello, and thank you for contacting Pay Trace.
>
>
>     We can see ' ¬- ' before the parmlist. Beyond that it is formatted
>     correctly. Here is the same information without the ' ¬- ' in there
>     which works correctly when submitted through a browser.
>
>
>
[1]https://paytrace.com/api/default.pay?parmlist=UN~demo123|PSWD~demo12
>
3|TERMS~Y|METHOD~ProcessTranx|TRANXTYPE~Authorization|CC~40128818888188
>
88|EXPMNTH~12|EXPYR~12|AMOUNT~1.00|CSC~999|BADDRESS~1234|BZIP~83852|INV
>     OICE~8888|
>
>
>
>     HERE is your string
>
>
>     [2]https://paytrace.com/api/default.pay?
>
>
¬-parmlist=UN~demo123|PSWD~demo123|TERMS~Y|METHOD~ProcessTranx|TRANXTYP
>
E~Authorization|CC~4012881888818888|EXPMNTH~12|EXPYR~12|AMOUNT~1.00|CSC
>     ~999|BADDRESS~1234|BZIP~83852|INVOICE~8888|
>
>
>
>     Here is what I have in the program to test the HTTP Post
>
>     postData =
>
>       'parmlist='                                                  +
>
>       'UN~demo123|PSWD~demo123|TERMS~Y|METHOD~ProcessTranx|'       +
>
>       'TRANXTYPE~Authorization|CC~4012881888818888|EXPMNTH~12|'    +
>
>       'EXPYR~12|AMOUNT~1.00|CSC~999|BADDRESS~1234|BZIP~83852|'     +
>
>       'INVOICE~8888|'+ CRLF                                        ;
>
>
>     rc = http_url_post('https://paytrace.com/api/default.pay?'
>
>                           : %addr(postData)
>
>                           : %len(%trimr(postData))
>
>                           : '/tmp/httptest.html');
>
>
>
>     Any advise will be appreciate it if I am using the right HTTP_URL_POST
>     or should I use a Different POST Process to void the character that
>     they Pay trace found in my data string.
>
>     http_url_post_raw?
>
>
>
>     Regards,
>
>     Carlos Lugo
>
>     Multitec Consultants Group Inc.
>
>     ( 310-717-7327
>
>     JCLUGO@xxxxxxxxx
>
> References
>
>     1.
https://paytrace.com/api/default.pay?parmlist=UN~demo123|PSWD~demo123|TERMS~
Y|METHOD~ProcessTranx|TRANXTYPE~Authorization|CC~4012881888818888|EXPMNT
Y|H~12
|EXPYR~12|AMOUNT~1.00|CSC~999|BADDRESS~1234|BZIP~83852|INVOICE~8888|
>     2. https://paytrace.com/api/default.pay
>
>
>
> ----------------------------------------------------------------------
> - 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
-----------------------------------------------------------------------