NTLM Authentication
can be done using CommonsHttpSender instead of HttpSender. But the UserID and
Password for the Credentials have to be set in the Stub-Class. Is there a more
elegant way to get to the UserID/PW of the running process (in my case Tomcat,
started with that User).
using the
ServiceFactory getting the WSDL seems to be able passing the Credentials
directly (Test-Class generated by WSDL2JAVA):
public void
testXxxxWSSoapWSDL() throws Exception
{
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
java.net.URL url = "" java.net.URL(new com.xxxx.XXXX.XxxxWS.XxxxWSLocator().getXxxxWSSoapAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new com.xxxx.XXXX.XxxxWS.XxxxWSLocator().getServiceName());
assertTrue(service != null);
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
java.net.URL url = "" java.net.URL(new com.xxxx.XXXX.XxxxWS.XxxxWSLocator().getXxxxWSSoapAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new com.xxxx.XXXX.XxxxWS.XxxxWSLocator().getServiceName());
assertTrue(service != null);
}
How can get the
UserId/PW in the stub class without setting it explicitly in the stub
binding?
rgrds
Kurt Spescha
Consor AG, CH-8006 Zürich
+41 (0)44 368 35 44
+41
(0)76 560 66 89
[EMAIL PROTECTED]
************ BITTE BEACHTEN ************
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter Ausschluss jeder Reproduktion zu zerstören und die absendende Person umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.
