[英]SOAP. JAX-WS. Authorization
soapServicePortType = Interface, where is methods of WSDL. soapServicePortType = Interface,其中是WSDL 的方法。 getHouseCall = GETmethod of info
getHouseCall = GET 信息的方法
But i should authorizate但我应该授权
As i see in stacktrace, message building by HttpTransportPipe class.正如我在堆栈跟踪中看到的,通过 HttpTransportPipe 类构建消息。 In this class i found method "addBasicAuth", when i can insert Login and pass.
在这个类中,我找到了方法“addBasicAuth”,当我可以插入登录并通过时。
So, i have 2 questions:所以,我有两个问题:
I solved it so:我是这样解决的:
((BindingProvider) /*Insert InterfaceClass of port WSDL*/).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "login");
((BindingProvider) /*Insert InterfaceClass of port WSDL*/).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "password");
And no need to sending coockies并且无需发送cookies
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.