2012-04-04 80 views
1

我有几个Web的服务,如:肥皂:从http地址位置为HTTPS

<wsdl:port name="CalcWithPerson22HttpSoap11Endpoint" binding="ns:CalcWithPerson22Soap11Binding"> 
      <soap:address location="http://localhost:8080/axis2/services/CalcWithPerson22"/> 
    </wsdl:port> 

在这些我需要在soap:address location从“HTTP”更改为“https”。

在WSDL文件中,我需要进行更改吗?

+0

里面我很少web服务,假设如下。 的 <皂:地址位置= “HTTP://本地主机:8080 /的axis2 /服务/ CalcWithPerson22”/> 在这些我需要将soap:地址位置从“http”更改为“https”。 在哪里我需要更改 – 2012-04-04 14:30:29

回答

0

将 “https” 这里的xml文件

<transportReceiver name="https" class="org.apache.axis2.transport.http.SimpleHTTPServer"> <parameter name="port">8443</parameter> </transportReceiver> 
0

1)首先,您必须确保您要部署这些服务的应用程序服务器需要在SSL/https上运行。

2)没有必要更改wsdl。只需将您打算将这些服务调入https的客户端中的端点更改为https即可。

但是,您仍然需要更改wsdl中的soap地址。只是使这种变化:

<soap:address location="https://localhost:8080/axis2/services/CalcWithPerson22"/> 

UPDATE:

axis2.xml检查HTTPS transportReceiver。它在1.5.3以上的axis2版本中默认启用。

<transportReceiver name="https" 
class="org.apache.axis2.transport.http.SimpleHTTPServer"> 
<parameter name="port">8443</parameter> 
</transportReceiver> 

service.xml的如果你想只在HTTPS运行的服务,它会看起来像这样

<service name="TestWebservice" > 
    <description> 
     Please Type your service description here 
    </description> 
    <messageReceivers> 
     <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" 
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /> 
     <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" 
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/> 
    </messageReceivers> 
    <transports> 
     <transport>https</transport> 
    </transports> 
    <parameter name="ServiceClass">xx.xxx.xxx.TestWebservice</parameter> 
</service> 
+0

谢谢..是的,我的应用程序服务器运行在https上。客户端要求将soap地址从http更改为https。 。我想知道如何从http更改为https以及我需要更改的位置。你能告诉我确切的位置,以及这个肥皂地址是如何生成的。 – 2012-04-05 05:33:56

+0

当您生成wsdl时,默认情况下将采用http:// ip:port/service。您需要手动编辑您的wsdl。在任何编辑器中打开你的wsdl,改变 shashankaholic 2012-04-05 05:39:40

+0

你的意思是2说没有办法,只要我们用url访问浏览器的wsdl,得到“https”,实际上这只是这个问题,客户要求只要他想要2通过浏览器查看wsdl肥皂地址应该为https – 2012-04-05 06:25:20

2

1.5.3 MAINT发布已经有用于HTTPS支持。所以我们也可以使用它们。

2010年11月12日 - Apache Axis2/Java版本1.5.3发布! 1.5.3是一个维护版本包含了以下改进:

  • 改进支持SSL使用servlet运输时:Axis2中现在可以配置成使得生成的WSDL包含HTTPS端点(AXIS2-4465)。
  • 与Rampart(AXIS2-3213和AXIS2-4870)和Sandesha2(潜在的HTTP连接池饥饿)改进了兼容性。
  • Axiom已升级到1.2.10。该版本包含与Rampart相关的性能改进。
  • 应用程序(业务)故障不再以等级ERROR(AXIS2-4280)记录。
  • 改进了SAAJ规范的一致性。 1.5.3版本包含一组针对主干上开发的SAAJ实现的修复和改进,而不包括在1.5分支的以前版本中。
  • Axis2现在完全依赖Maven中央存储库提供的依赖关系,并且不需要其他Maven存储库。这特别解决了1.5.2版本之后出现的构建问题。
  • Eclipse和IntelliJ IDEA插件可通过Axis2网站下载(以前的1.5.x版本只能从Maven存储库下载)。