[WebService] xfire客户端调用.net IIS 配置的webservice 总报错
yawin
2011-03-08
使用eclipse 生成了个 xfire的客户端,用来访问.net的webservice
1、服务端未加证书验证时调用正确 2、加入证书验证后,将客户端的证书已经导入到jdk的信任库中,但是调用的时候报如下错误: 011-3-8 10:20:41 org.codehaus.xfire.transport.http.HttpChannel sendViaClient 严重: Server returned error code = 403 for URI : https://192.168.172.129:444/WebSetup2/Service1.asmx?op=HelloWorld. 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 = 403 for URI : https://192.168.172.129:444/WebSetup2/Service1.asmx?op=HelloWorld. Check server logs for details org.codehaus.xfire.fault.XFireFault: Server returned error code = 403 for URI : https://192.168.172.129:444/WebSetup2/Service1.asmx?op=HelloWorld. 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 $Proxy7.helloWorld(Unknown Source) at org.tempuri.Service1Client.main(Service1Client.java:124) Caused by: org.codehaus.xfire.XFireRuntimeException: Server returned error code = 403 for URI : https://192.168.172.129:444/WebSetup2/Service1.asmx?op=HelloWorld. 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 查看服务端日志,发现报的是403 7 5( HTTP 错误 403.7 - 禁止访问:需要 SSL 客户证书。) 请问下xfire客户端该怎么把证书发送过去? 客户端部分代码: Service1Client client = new Service1Client(); //create a default service endpoint Service1Soap service = client.getService1Soap(); // The path to the certificate. System.out.println("begin test "); System.out.println("helloworld "+service.helloWorld()); System.out.println("test client completed"); System.exit(0); |
相关讨论
相关资源推荐
- 渐进式web应用程序_渐进式Web应用程序的原因为何不能忽略它们
- linux zend studio 10,Zend Studio 10发布,可编写mobile apps
- Kali Linux Web 渗透测试秘籍 第一章 配置 Kali Linux
- 在linux下实现web qq的桌面化
- Google为什么说Mozilla Thunderbird不那么安全?
- Linux
- Linux下的图标与文件关联机制:freedesktop
- Chrome OS:“比 Linux 更好的 Linux”,这样你就可以忘记 Windows
- Android--Web Apps
- Linux 部署 scrapydweb