Question

I would like to create a Web Service in Eclipse. I already wrote a class and generated a WSDL file from it with Java2WSDL. I started a new "Dynamic Web Project" and added the axis2 facet to it. After that I wanted to create a new "Web Service" project. When I now select my WSDL file and click on "Finish" I get the following error:

IWAB0399E Error in generating Java from WSDL: java.io.IOException: ERROR: Missing element inFault "Exception" in operation "Exception", in binding execute

My WSDL

Was it helpful?

Solution

One problem is that your CompileAndExecuteServiceHttpBinding binding doesn't have an Exception fault defined in the operation. It should be something like:

<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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top