0

我创建了一个带有 CXF 和 Spring 支持的 Web 服务。直接访问成功。然后我运行了一个 WSO2 ESB 并为该 Web 服务创建了一个代理服务。调用代理服务失败。我打印了代理的 WSDL,发现该文件中的端点都是“localhost”。我想这个问题很典型,但我找不到任何帮助信息。任何建议将被认真考虑。

4

2 回答 2

2

您也可以在 carbon.xml 中指定参数:

<HostName>yourhost</HostName>

yourhost = ip 或服务器名称

您可以在 carbon.xml 文件中看到此信息:

<!--
   Host name or IP address of the machine hosting this server
   e.g. www.wso2.org, 192.168.1.10
   This is will become part of the End Point Reference of the
   services deployed on this server instance.
-->
于 2012-10-08T04:51:00.100 回答
1

您需要axis2.xml在找到 http 和 https 传输的参数“WSDLPrefix”的位置进行编辑。

<parameter name="WSDLEPRPrefix" locked="false">http://myhost:8280</parameter>

这将正确创建您的代理端点。

完整信息位于:http ://wso2.org/project/esb/java/4.0.0/docs/admin_guide.html#HostPort

PS 我认为 Wso2ESB 4.5.0 更“聪明”,不需要修改这些参数。希望这可以帮助

于 2012-09-28T13:51:31.537 回答