aspose file tools*
The moose likes Web Services and the fly likes Axis2 client to invoke NTLM .NET WCF web services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2 client to invoke NTLM .NET WCF web services" Watch "Axis2 client to invoke NTLM .NET WCF web services" New topic
Author

Axis2 client to invoke NTLM .NET WCF web services

WeiWei He
Greenhorn

Joined: Jun 17, 2009
Posts: 3
I am using Eclipse 3.4.0 and Axis2-1.4.1 to create a web service client to call a .NET WCF which is using NTLM windows authentication.

I use Axis2 Code Generator to generate a stub called Service1Stub.java first. Then I wrote the following code to try.



Then I got this error when running it. Basically the error happens when calling Service1Stub.GetDataResponse res = stub.GetData(getData);

line 40
org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at org.tempuri.Service1Stub.GetData(Service1Stub.java:472)
at org.tempuri.WcfClient.main(WcfClient.java:35)

Hope someone could give a help. Thanks in advance.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Try changing the following line:

to

Best wishes!
WeiWei He
Greenhorn

Joined: Jun 17, 2009
Posts: 3
Ivan,

Thank you for your reply. I tried as you suggested. But the problem is still the same.

whe
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
A 404 indicates that the requested resource could not be found. Are you sure the service is deployed properly and is accessible from where your client is located?
Try issuing a request for the WSDL in a regular browser to see if this is the case.
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis2 client to invoke NTLM .NET WCF web services
 
Similar Threads
[Axis2]Transport error: 411 Error: Length Required
axis2 ntlm authentication - No credentials available for NTLM
Setting cookies on Axis2 client request for Exchange server
org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized while invoking the webservice
ERROR in WebService AXIS2