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

Re: [Ftpapi] [EXTERNAL] Re: SetError() #2: Host name look up failed



David,

I see the problem, now.   Sorry, I did not look closely enough at your code.  You are not passing the correct parameters to http_url_post_raw.

Here is what you currently have:

          rc=http_url_post_raw(%trim(PR_Destination) +
                               %trim(PR_Content_Typ) :
                               %addr(data)           :
                               %len(%trimr(data))    :
                               1                     :
                               %paddr('INCOMING')) ;

Notice that after PR_Destination, you have a + sign?   That means that you are concatenating the PR_Content_Typ field onto the PR_Destination field and passing both together as the URL.  This makes HTTPAPI think that you are specifying a host name of '10.79.164.62text/xml'  -- which is not a valid host name.  That is why you get host not found.  Since its also not a valid IP address, you'll get the same error there, too.

The parameters should be passed like this:


          rc=http_url_post_raw(%trim(PR_Destination) :
                               %addr(data)           :
                               %len(%trimr(data))    :
                               1                     :
                               %paddr('INCOMING')    :
                               HTTP_TIMEOUT          :
                               *omit                 :
                               %trim(PR_Content_Typ) );

Hope that helps.

-- 
Scott Klement
sk@xxxxxxxxxxxxxxxx


On 12/2/2020 9:20 AM, David Hanneman wrote:
Scott,

I knew that the *ENTRY could be a problem, so I created a command to call the program. Here are the dumps of the fields.


PR_DESTINATION =                                                          
          ....5...10...15...20...25...30...35...40...45...50...55...60    
     1   'https://10.79.164.62                                        '  

PR_CONTENT_TYP =                                                        
          ....5...10...15...20...25...30...35...40...45...50...55...60  
     1   'text/xml                                                    '

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