![](/img/trans.png)
[英]Is it possible to change axis2 soap address without compiling the project all over again?
[英]Axis Change soap:address
我有一个Apache2 HTTP Server,这个服务器可用于外部网络。 对于我的网络服务,我在内部网络中有一个Jboss 4。 我使用DMZ在Apache上配置了VirtualHosts,因此我可以通过http://externalserver/services/SomeService?wsdl
从外部主机访问服务,当使用/ services / *请求时,我将请求重定向到http://internalserver/services/SomeService?wsdl
由ProxyPass http://internalserver/services/SomeService?wsdl
。
这在Intranet上工作,但是当我尝试从外部主机使用我的web服务时,我的wsdl引用内部主机。 我有这样的事情:
<service name="SomeServiceService">
<port binding="tns:SomeServiceBinding" name="SomeServicePort">
<soap:address location="http://internalserver/services/SomeService"/>
</port>
</service>
我需要在生成的wsdl中更改location属性,我该怎么办?
提前致谢。
编辑:
我可以更改主机和端口我编辑了jboss-beans.xml,现在我有这样的事情:
<property name="webServiceHost">${jboss.bind.address}</property>
<property name="modifySOAPAddress">true</property>
<property name="webServiceSecurePort">8443</property>
<property name="webServicePort">8080</property>
但这不会改变协议,我可以调用http://myapp/Service?wsdl
或https://myapp/Service?wsdl
但是在两个地址中都是http,我需要将其更改为https。
根据这篇文章,您可以将soap:address
设置为"https://REPLACE-ME
作为解决方法,或强制执行CONFIDENTIAL
运输保证(可能会破坏您的Intranet服务,除非您也将其部署在启用https的服务器或手动替换soap:address
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.