AXIS1:如何个性化“绑定名称”

发布于 2024-11-10 11:09:12 字数 1467 浏览 3 评论 0原文

我们使用 axis1 工具生成了以下 Web 服务:

  <wsdl:binding name="WSExamplePortSoapBinding" type="impl:WSExamplePortType">
  <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
  <wsdl:operation name="TestMethod">
  <wsdlsoap:operation soapAction="http://localhost/Example/wsdl/Example?wsdl#TestMethod" />
  <wsdl:input name="TestMethodRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost/Example/wsdl/Example?wsdl" use="encoded" />
  </wsdl:input>
  <wsdl:output name="TestMethodResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost/Example/wsdl/Example" use="encoded" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="WSExample">
  <wsdl:port binding="impl:WSExamplePortSoapBinding" name="WSExamplePort">
  <wsdlsoap:address location="http://localhost:8082/Example/wsdl/Example" />
  </wsdl:port>
  </wsdl:service>

客户希望我们更改该行:

<wsdl:binding name="WSExamplePortSoapBinding" type="impl:WSExamplePortType">

for:

<binding name="WSExampleBinding" type="impl:WSExamplePortType">

问:我们如何更改该单词? (WSExamplePortSoapBinding 到 WSExampleBinding)。

我们搜索了axis的源代码,但我们找不到生成该名称的地方。

感谢您的帮助,

We had the following generated webservices with axis1 tools:

  <wsdl:binding name="WSExamplePortSoapBinding" type="impl:WSExamplePortType">
  <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
  <wsdl:operation name="TestMethod">
  <wsdlsoap:operation soapAction="http://localhost/Example/wsdl/Example?wsdl#TestMethod" />
  <wsdl:input name="TestMethodRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost/Example/wsdl/Example?wsdl" use="encoded" />
  </wsdl:input>
  <wsdl:output name="TestMethodResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost/Example/wsdl/Example" use="encoded" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="WSExample">
  <wsdl:port binding="impl:WSExamplePortSoapBinding" name="WSExamplePort">
  <wsdlsoap:address location="http://localhost:8082/Example/wsdl/Example" />
  </wsdl:port>
  </wsdl:service>

and the client want to us change the line:

<wsdl:binding name="WSExamplePortSoapBinding" type="impl:WSExamplePortType">

for:

<binding name="WSExampleBinding" type="impl:WSExamplePortType">

Q: How we can change that word? (WSExamplePortSoapBinding to WSExampleBinding).

We had searched on the axis source code, but we can't find were is generated that name.

Thanks for the help,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谈场末日恋爱 2024-11-17 11:09:12

我这样解决了这个问题:

  1. 在 server-config.wsdd 文件中:

    <参数名称=“wsdlServicePort”值=“ExamplePort”/>
    

    我必须替换为:

    <参数名称=“wsdlServicePort”值=“示例”/>/>
    
  2. 然后我必须像这样修改 axis-1.4 源代码:

    setBindingName(getServicePortName() + "SoapBinding");
    

    我必须替换为:

    setBindingName(getServicePortName() + "绑定");
    

然后我必须用 ant 制作 JAR 并将新 JAR 复制到库的源代码中。

I solved this issue like this:

  1. In the server-config.wsdd file:

    <parameter name="wsdlServicePort" value="ExamplePort"/>
    

    I have to replace to:

    <parameter name="wsdlServicePort" value="Example"/>
    
  2. Then I have to modify the axis-1.4 source code like this:

    setBindingName(getServicePortName() + "SoapBinding");
    

    I have to replace to:

    setBindingName(getServicePortName() + "Binding");
    

Then I have to make the JAR with ant and copy the new JAR to the source of the library.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文