- This topic has 3 replies, 3 voices, and was last updated 15 years, 6 months ago by Brian Fernandes.
-
AuthorPosts
-
pcableMemberHi —
I am VERY new to Web Services and I am trying to read a lot, but I am just not finding anything that is helping me with this issue.
I have a .NET Web Service that needs to implement security in some way because this web service will have to accessible from an external server. We are currently trying to implement it via Http Authenitcation and the .NET WebConfig file modification for this setup is as follows:
<authentication mode="Windows" /> <authorization> <allow roles="~~theRole~~"/> <deny users="*"/> </authorization>
I am writing a Java WS Client to consume the above Web Service. I am working in MyEclipse 6.0.1.GA using XFire. The security for the Client was setup followint the instruction on this article: http://www.targetprocess.com/support/Web_services_api/Web_services_java.aspx
However I continue to get the following error:
Apr 14, 2009 8:49:50 AM org.apache.commons.httpclient.HttpMethodBase writeRequest INFO: 100 (continue) read timeout. Resume sending the request Apr 14, 2009 8:49:50 AM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: ntlm authentication scheme selected Apr 14, 2009 8:49:50 AM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge INFO: No credentials available for NTLM <any realm>@<test>:80 Apr 14, 2009 8:49:50 AM org.codehaus.xfire.transport.http.HttpChannel sendViaClient SEVERE: Server returned error code = 401 for URI : http://<test>/wstest/WebService.asmx. Check server logs for details Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Server returned error code = 401 for URI : http://<test>/wstest/WebService.asmx. Check server logs for details org.codehaus.xfire.fault.XFireFault: Server returned error code = 401 for URI : http://<test>/wstest/WebService.asmx. Check server logs for details at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:83) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114) at org.codehaus.xfire.client.Client.invoke(Client.java:336) at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) at $Proxy11.helloWorld(Unknown Source) at com.test2.WebServiceClient.main(WebServiceClient.java:120) Caused by: org.codehaus.xfire.XFireRuntimeException: Server returned error code = 401 for URI : http://<test>/wstest/WebService.asmx. Check server logs for details at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:130) at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79) ... 6 more
Also, as noted in other posts, I have tried reviewing the articles on the xfire via http://xfire.codehaus.org/Articles and quite a few of them give an “Error 404 – Not Found”. From the articles that I reviewed, they didn’t seem to add any understanding to this issue.
If I need to develope security in .NET differently, that is fine, we can do that, but I really need some direction because our .NET crew is new to Web Services also. I just need some suggestions either way.
Thanks in advance for any light that can be shed on this issue,
Pam
Brian FernandesModeratorPam,
Sorry for the delayed response. Please note that XFire is a deprecated web service framework on which development has stopped. There are also several users who have had problems with authenticated web services, if you need help in this department I can only suggest the xfire-users mailing list.
If you are writing a WS client, I would recommend using the JAX-WS framework instead, especially since interoperability with .NET web services is better with this framework. MyEclipse 6.0.1 is a very old version of MyEclipse which does not support JAX-WS, I would recommend using version 6.6 (Eclipse 3.3) or 7.1 (Eclipse 3.4) instead.
More information on the framework itself is available: https://jax-ws.dev.java.net/
prismmedMemberGenuitec needs to update its help files then, as the Web Service help still uses XFire in its example.
Brian FernandesModeratorprismmed,
We do have XFire in our examples as it is still part of the product, but we also have tutorial for JAX-WS/REST web services along with a deprecated marking / notice for XFire if you use a more recent version of MyEclipse.
I will ask our documentation team to mention the deprecation in our tutorials, thank you for bringing that to our attention. Can you tell me which example you were referring to? Embedded help or online documentation? -
AuthorPosts