I am using webMethods from the SAG and it seems if the service
pub.client.http
throws an exception on status code 401 "Unauthorized".
This leads me to the problem that I cannot handle the status code because nothing is written to the pipeline.
getLastError
does contain the string "Unauthorized" but not the status code. Except that I do not want to start parsing exception messages...
Any ideas?
The output parameter
header
from thepub.client.http
call should contain the information you’re after:See the webMethods Integration Server Built-In Services Reference page 122 for more details.
According the comment from @Hugo Ferreira probably there are ACL restriction whether inside your webMethods environment, or your client URLs.
Things you should consider:
Do your webMethods server located inside closed environment wherein need to get connected to proxy to get to the outgoing request. Which is likely you can investigate by run web-browser program directly from your wM server towards the URL address (i.e using SSH to run firefox in my case and popup appeared)
The client that your request will go to, have HTTP for authentication requests
Solution
To pass this all you need to do is input the
auth
user/password
or any other auth mechanism i.e kerberos, token, etc. inside thepub.client:http
Asked a SAG senior consultant. This is the normal behavior. There is no flag which you can set to enforce suppression of this exception...