English 中文(简体)
How to connect with an Axis webservice hosted in a password protected realm?
原标题:

I m trying to connect with a webservice that s in a password protected host, i.e. you must enter user+pass to access the remote WSDL.

The key word there is "trying", I have a client made by WSDL2JAVA that works ok if the service is unprotected, but I can t find how to add the login to that code.

To clarify, it s not the webservice who demands authentication, but the site itself. I m testing with a secured realm in a tomcat server, but I m lookin for a platform independent solution.

Has anybody been able to do this?

问题回答

I ve found a solution:

First create a HttpClient object and authenticate it, as explained here. Then without closing that connection, connect with the webservice as usual.

And that s it. I m not sure why that works, I think that the java process saves the connection cookie or something like that.





相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Remotely authenticating client Windows user on demand

Suppose I am writing a server for a particular network protocol. If I know that the client is running on a Windows machine, is it possible for my server to authenticate the Windows user that owns the ...

Role/Permission based forms authorizing/authentication?

While looking into forms authorizing/authentication, I found that it is possible to do role based authorizing by adding an array of roles to a FormsAuthenticationTicket. That way I can write User....

热门标签