2012-04-08 101 views
0

我正在使用基于java的工具,其中包含用于访问Web服务的jaxws-rt-2.1.4.jar。我可以以正确的结果成功访问https web服务,但希望在检索wsdl和在Fiddler中调用服务时查看https请求和响应。
JVM参数包括以下内容:如何在使用jaxws时查看Fiddler中的https调用

-DproxySet=true -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888 
-Djavax.net.ssl.trustStore=C:\test\xxx.jks -Djavax.net.ssl.trustStorePassword=pw 

密钥库包含需要访问Web服务的证书和说,这工作正常。代理设置指向Fiddler,因此我期望不仅看到工具前端(托管于http://localhost:8080)的http请求+响应,而且响应启动调用Web服务的作业,而且还看到https请求+响应。

我使用的检索WSDL和调用服务的代码是

url = "https://www.eway.com.au/gateway/rebill/test/manageRebill_test.asmx?wsdl" 
Definition definition = WSDLFactory.newInstance().newWSDLReader().readWSDL(url); 
... other code creating the envelopeXML ... 
URL wsdlLocation = new URL(url); 
Source result = 
    Service.create(wsdlLocation, serviceQName).createDispatch(
     portQName, 
     Source.class, 
     Service.Mode.MESSAGE).invoke(new StreamSource(new StringReader(envelopeXML)))); 

当URL是一个HTTP一个像http://www.webservicex.net/periodictable.asmx?wsdl我看到在提琴手的请求+响应。
我的设置中缺少在Fiddler中显示WSDL检索和服务调用的https请求+响应的内容?也许它需要额外的或不同的JVM设置? 或者它是证书问题 - 我必须给小提琴手颁发证书并让小提琴手根据它颁发证书,这是在密钥库中使用的,而不是原来的证书?

回答

0

确定这应该是很明显对我来说也许 - 但随后又没有观众看到它:-)
我需要有以下JVM PARMS补充说:

-DproxySet=true -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8888 

这样,抓住小提琴手https请求+响应。