Natasha,
“401” is the appropriate HTTP status code that should be sent back from the HTTP server in the case of an authorization error.
Possible reasons for the behavious you are observing (that I can think of)
a) The HTTP server is not in total compliance with HTTP 1.1
b) The URL that you are invoking does not need an authentication
Perform a “bytesToString” operation on the response->body->bytes after pub.client:http and check the response message being sent back. That may give you some additional information.
Thanks,
Uday Yallapragada.
#webMethods#Integration-Server-and-ESB#webmethods-Protocol-and-Transport