Thanks for the tip, but I'm not quite getting there.

I've done more research and it turns out that the service is using NTLM
Autherization...

I've searched the mailing list and found the following:
http://www.nabble.com/NTLM-Support--td16447079.html#a19486039
http://www.nabble.com/NTLM-Support--td16447079.html#a19486039 

In this thread, benjwarner claims to have successfully used a service with
NTLM.

When I try to incorporate his code into the generated code, the only result
I can get is a IIS 401 HTML error message.

I've tried to set the http headers directly onto requestContext (used
soap-ui 2.5 to get those headers) - this results in the following:
Invoking readCustomer...
08-01-2009 00:43:40 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.ClassCastException: java.lang.String cannot be cast to
org.w3c.dom.Element
        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:120)
        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:76)
        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:57)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
        at $Proxy41.readCustomer(Unknown Source)
        at
test.client.MyCustomerService_BasicHttpBindingMyCustomerService_Client.main(MyCustomerService_BasicHttpBindingMyCustomerService_Client.java:89)
 

Does this mean that it has actually called the service, or does this happen
when serializing the request object to XML?

Any thoughts on this are very appreciated.


dkulp wrote:
> 
> 
> If it's just basic auth authentication, you just need to do:
> 
> ((BindingProvider)port).getRequestContext().put(
>        BindingProvider.USERNAME_PROPERTY, username);
> ((BindingProvider)port).getRequestContext().put(
>        BindingProvider.PASSWORD_PROPERTY, password);
> 
> 
> Dan
> 
> -- 
> Daniel Kulp
> [email protected]
> http://dankulp.com/blog
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Accessing-webservice-written-in-.Net-using-CXF-client-with-http%3ANegotiateAuthentication-tp21311978p21343034.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to