axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: wsdl2java.sh issue
Date Thu, 09 Aug 2007 05:16:04 GMT
this is a problem with the wsdl

you have to add the fault message pat to the first binding operation as
well.

<wsdl:operation name="ReceiveDocumentBatch">
            <soap:operation soapAction="
http://www.regents.ohio.gov/ReceiveDocumentBatch"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </wsdl:fault>
        </wsdl:operation>

On 8/8/07, Keith Veleba <keith@intellitekservices.com> wrote:
>
> Hello all,
> I'm using Axis2 1.3 RC2 and trying to generate a client stub for a web
> service, but I'm receiving an error.  I'm generating stubs for three other
> web service endpoints before this one is attempted in my build script.
> Those are successful and work great.  The last returns this error:
>
> [echo] Generating ReceiveDocumentBatch Stub...
>      [java] Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: Element QName is null for
> ReceiveDocumentBatch_faultMsg!
>      [java]     at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
> CodeGenerationEngine.java:265)
>      [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>      [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>      [java] Caused by:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: Element QName is null for
> ReceiveDocumentBatch_faultMsg!
>      [java]     at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub
> (AxisServiceBasedMultiLanguageEmitter.java:527)
>      [java]     at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
> CodeGenerationEngine.java:254)
>      [java]     ... 2 more
>      [java] Caused by: java.lang.RuntimeException: Element QName is null
> for ReceiveDocumentBatch_faultMsg!
>      [java]     at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements
> (AxisServiceBasedMultiLanguageEmitter.java:2751)
>      [java]     at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement
> (AxisServiceBasedMultiLanguageEmitter.java:2673)
>      [java]     at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement
> (AxisServiceBasedMultiLanguageEmitter.java:2199)
>      [java]     at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations
> (AxisServiceBasedMultiLanguageEmitter.java:2117)
>      [java]     at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForCallbackHandler
> (AxisServiceBasedMultiLanguageEmitter.java:1144)
>      [java]     at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeCallBackHandlers
> (AxisServiceBasedMultiLanguageEmitter.java:1110)
>      [java]     at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub
> (AxisServiceBasedMultiLanguageEmitter.java:490)
>      [java]     ... 3 more
>
> Here's the WSDL:
>
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions xmlns:tns="
> http://www.regents.ohio.gov/ReceiveDocumentBatch/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:soap="
> http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/" name="ReceiveDocumentBatch"
> targetNamespace="http://www.regents.ohio.gov/ReceiveDocumentBatch/">
>   <wsdl:types>
>     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.regents.ohio.gov/ReceiveDocumentBatch/">
> <xsd:element name="ReceiveDocumentBatch">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="in" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="ReceiveDocumentBatchResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="BatchID" type="xsd:int"/>
> <xsd:element maxOccurs="1" minOccurs="1" name="DocumentsRemaining"
> type="xsd:int">
> </xsd:element>
> <xsd:element maxOccurs="1" minOccurs="1" name="DocumentCount"
> type="xsd:int">
> </xsd:element>
> <xsd:element maxOccurs="1" minOccurs="1" name="checkSum"
> type="xsd:string">
> </xsd:element>
> <xsd:element maxOccurs="1" minOccurs="1" name="Data" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="ReceiveDocumentBatchList">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="in" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="ReceiveDocumentBatchListResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" minOccurs="0" name="BatchID"
> type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="ReceiveDocumentBatchListFault">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="Reason" type="xsd:string">
>             </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="ReceiveDocumentBatchFault">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="Reason" type="xsd:string">
>             </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="ReceiveDocumentBatchRequest">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="Username"
> type="xsd:string">
>                 </xsd:element>
> <xsd:element maxOccurs="1" minOccurs="1" name="Password"
> type="xsd:string">
>                 </xsd:element>
> <xsd:choice>
> <xsd:element maxOccurs="1" minOccurs="0" name="BatchID" type="xsd:int">
>                 </xsd:element>
> <xsd:element maxOccurs="1" minOccurs="0" name="DocumentType">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="PescPostsecondaryTranscript">
>                 </xsd:enumeration>
> <xsd:enumeration value="PescTranscriptAcknowledgment">
>                 </xsd:enumeration>
> <xsd:enumeration value="All">
>                 </xsd:enumeration>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> </xsd:choice>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:group name="ModelGroupDefinition">
> <xsd:sequence/>
> </xsd:group>
> <xsd:element name="ReceiveDocumentBatchListRequest">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="Username"
> type="xsd:string">
>             </xsd:element>
> <xsd:element maxOccurs="1" minOccurs="1" name="Password"
> type="xsd:string">
>             </xsd:element>
> <xsd:element maxOccurs="1" minOccurs="0" name="SearchStartDate"
> type="xsd:date">
>             </xsd:element>
> <xsd:element maxOccurs="1" minOccurs="0" name="SearchEndDate"
> type="xsd:date">
>             </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="ReceiveDocumentBatchList_faultMsg">
>     <wsdl:part name="ReceiveDocumentBatchList_fault"
> element="tns:ReceiveDocumentBatchListFault"/>
>   </wsdl:message>
>   <wsdl:message name="ReceiveDocumentBatchResponse">
>     <wsdl:part name="ReceiveDocumentBatchResponse"
> element="tns:ReceiveDocumentBatchResponse"/>
>   </wsdl:message>
>   <wsdl:message name="ReceiveDocumentBatchListRequest">
>     <wsdl:part name="ReceiveDocumentBatchListRequest"
> element="tns:ReceiveDocumentBatchListRequest"/>
>   </wsdl:message>
>   <wsdl:message name="ReceiveDocumentBatch_faultMsg">
>     <wsdl:part name="ReceiveDocumentBatch_fault"
> element="tns:ReceiveDocumentBatchFault"/>
>   </wsdl:message>
>   <wsdl:message name="ReceiveDocumentBatchListResponse">
>     <wsdl:part name="ReceiveDocumentBatchListResponse"
> element="tns:ReceiveDocumentBatchListResponse"/>
>   </wsdl:message>
>   <wsdl:message name="ReceiveDocumentBatchRequest">
>     <wsdl:part name="ReceiveDocumentBatchRequest"
> element="tns:ReceiveDocumentBatchRequest"/>
>   </wsdl:message>
>   <wsdl:portType name="ReceiveDocumentBatch">
>     <wsdl:operation name="ReceiveDocumentBatch">
>       <wsdl:input message="tns:ReceiveDocumentBatchRequest"/>
>       <wsdl:output message="tns:ReceiveDocumentBatchResponse"/>
>       <wsdl:fault name="fault"
> message="tns:ReceiveDocumentBatch_faultMsg"/>
>     </wsdl:operation>
>     <wsdl:operation name="ReceiveDocumentBatchList">
>       <wsdl:input message="tns:ReceiveDocumentBatchListRequest"/>
>       <wsdl:output message="tns:ReceiveDocumentBatchListResponse"/>
>       <wsdl:fault name="fault"
> message="tns:ReceiveDocumentBatchList_faultMsg"/>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="ReceiveDocumentBatchSOAP"
> type="tns:ReceiveDocumentBatch">
>     <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="ReceiveDocumentBatch">
>       <soap:operation soapAction="
> http://www.regents.ohio.gov/ReceiveDocumentBatch"/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>     <wsdl:operation name="ReceiveDocumentBatchList">
>       <soap:operation soapAction="
> http://www.regents.ohio.gov/ReceiveDocumentBatchList"/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use="literal"/>
>       </wsdl:output>
>       <wsdl:fault name="fault">
>         <soap:fault name="fault" use="literal"/>
>       </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="ReceiveDocumentBatch">
>     <wsdl:port name="ReceiveDocumentBatchSOAP"
> binding="tns:ReceiveDocumentBatchSOAP">
>       <soap:address location="
> http://uat-cc7.regents.ohio.gov:8080/ccx/ReceiveDocumentBatch"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
>
> --
>
> Keith E. Veleba
> President
> Intellitek Services Ltd.
> 419-202-2676 cell
> keith@intellitekservices.com
> http://www.intellitekservices.com
>
>
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Mime
View raw message