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

Re: [Ftpapi] Additional Space In http_url_post_xml Parameters



Thank you so much SK for the detailed explanation.

The problem I am facing got resolved by replacing the latest service program HTTPAPIR4. We recently migrated from V5R4 to V7R3.

Regards,
Ramesh M.

On Mon, May 21, 2018 at 1:48 AM, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:

Hello Ramesh,

That procedure does not remove spaces.  

That procedure was added in order to allow HTTPAPI to preserve backward compatability.  Old versions of HTTPAPI used very small, fixed-length, fields that were too small for many HTTPAPI users.  That procedure detects if you're using one of these old, small, style parameters or whether you're using the much larger VARYING (aka VARCHAR) parameters.  This way, I could convert the parameters to much longer ones, but still allow things to work with older versions of HTTPAPI (without requiring you to recompile all the calling programs.)

-SK


On 5/17/18 9:53 PM, Ramesh Mannepalli wrote:
Hi Scott,

First of all thank you so much for the reply. I am glad sir.

 

I figured out what causing the issue why the extra spaces are appending while passing as parameters in the below API.

 

rc = http_url_post_xml('http://HELLOWORLD.COM/testService.svc' 

                  : %addr(SOAP) + 2                             

                  : %len(SOAP)                                  

                  : *NULL                                       

                  : %paddr(Incoming)                            

                  : *NULL                                        

                  : HTTP_TIMEOUT                                

                  : HAGENT                                      

                  : CONTT                                       

                  : SACTN);  

I am passing the values as below.

 

HAGENT= 'http-api/1.23'

CONTT = 'text/xml'    

SACTN = 'SubmitMessage'

 

But when the above API gets processed and when the call happens to service program HTTPAPIR4 there is a call to another API http_url_post_raw happening, there I see the parameters have the values like below.

 

wwRC = http_url_post_raw( peURL           

                        : pePostData      

                        : pePostDataLen   

                        : 9               

                        : %paddr(ParseXML)

                        : peTimeout       

                        : peUserAgent     

                        : peContentType   

                        : peSOAPAction ) ;

 

peUserAgent    = '  http-api/1.23'

peContentType = '  text/xml'    

peSOAPAction = '  SubmitMessage'

 

And when I proceed with this API its calling another API http_persist_post and here I noticed another API called getSA for get ridding of the additional space.

 

if        %parms>=10                         

          and %addr(peUserAgent)<>*null     

eval      p_UserAgent = %addr(wwUA)         

eval      wwUserAgent = getSA(peUserAgent)  

else                                        

eval      p_UserAgent = *NULL               

endif                                       

 

But in my PROD I don’t see getSA line of code and then I realized there is difference between my DEV and PROD service pgm versions.

 

I am now downloading the latest SAV file from your website and restoring the same in PROD and I hope this will resolve the issue.


Regards,
Ramesh M.


On Thu, May 17, 2018 at 6:47 PM, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:

Hello Ramesh,

Sorry, I'm not understanding what you are doing.  These sound like HTTP headers, but you refer to them as "parameter values"...  but, I don't understand why you would want to use HTTP headers in your application.

Can you please show the relevant code where you are calling HTTPAPI and providing these values so that we can understand?

Also, please explain why this extra space matters to you. Does it cause an error? if so, what is that error?

Thanks

-SK


On 5/16/18 11:34 PM, Ramesh Mannepalli wrote:
Guys - I am trying to call biztalk service from 400 and passing the parameter values in the fields Agent,Content, Action as below.

'http-api/1.23' 
'text/xml'      
'SubmitMessage' 

but while processing HTTPAPIR4 service program  I noticed and additional space is getting added to the above values like below which causing error, Can any one encounter this issue, Please let me know how to resolve this issue.

' http-api/1.23' 
' text/xml'      
' SubmitMessage' 


Regards,
Ramesh M.





--
_______________________________________________
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