0

我想在 Eclipse 中创建一个 Web 服务。我已经编写了一个类并使用 Java2WSDL 从中生成了一个 WSDL 文件。我开始了一个新的“动态 Web 项目”,并向其中添加了 axis2 方面。之后,我想创建一个新的“Web 服务”项目。当我现在选择我的 WSDL 文件并单击“完成”时,我收到以下错误:

IWAB0399E 从 WSDL 生成 Java 时出错:java.io.IOException:错误:在绑定执行中,操作“异常”中的故障“异常”中缺少元素

我的 WSDL

4

1 回答 1

0

一个问题是您的 CompileAndExecuteServiceHttpBinding 绑定没有在操作中定义异常错误。它应该是这样的:

<wsdl:binding name="CompileAndExecuteServiceHttpBinding" 
              type="ns:CompileAndExecuteServicePortType">
<http:binding verb="POST"/>
<wsdl:operation name="execute">
    <http:operation location="CompileAndExecuteService/execute"/>
    <wsdl:input>
        <mime:content type="text/xml" part="execute"/>
    </wsdl:input>
    <wsdl:output>
        <mime:content type="text/xml" part="execute"/>
    </wsdl:output>
    <wsdl:fault name="Exception">
        <soap12:fault use="literal" name="Exception"/>
    </wsdl:fault>
</wsdl:operation>
于 2009-12-07T17:03:21.583 回答