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

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



That did the trick! I have a working prototype.

On Thu, Dec 3, 2020 at 3:38 PM Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:

David,

http_url_post_raw() has a parameter for SOAP action.

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

                               Your-Soap-Action-Here );

The newer routines (http_req, http_string, http_stmf) use a routine called http_setOption() for this.

          http_setOption('soap-action': Your-Soap-Action-Here);
          rc = http_req(...etc...);
-- 
Scott Klement
sk@xxxxxxxxxxxxxxxx
On 12/3/2020 12:26 PM, David Hanneman wrote:
Scott,

This server is looking for a SOAP action. Is there a variant of the POST raw to specify the SOAP action?


On Wed, Dec 2, 2020 at 4:46 PM Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:

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

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