On Fri, Jun 27, 2008 at 5:16 AM, David Ojeda <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I have an out-only service (i.e. a service that doesn't receive a request
> element yet it returns a response element). I can generate my skeleton
> classes without problems with xmlbeans binding:
> wsdl2java.sh -o outputdir -d xmlbeans -ss -sd -g -uri
> wsdl/WSIterautoID.wsdl
>  Using AXIS2_HOME:   /home/david/webframeworks/axis2/axis2-1.4
>  Using JAVA_HOME:       /opt/java/jre
> Retrieving document at 'wsdl/WSIterautoID.wsdl'.
> [INFO] The
>
> outputdir/src/la/integra/digitel/ws/iterauto/wsiterautoid/IterautoIDFault.java
> file cannot be overwritten.
>
>
> Today, I realized that we need to tell wsdl2java to not generate any class,
> because we will generate it with XmlBeans in  a different process. So I
> added
> the "-Ewdc" option. This is when I get a NullPointerException
> wsdl2java.sh -o pruebajar/ -d xmlbeans -ss -sd -g -Ewdc  -uri
> wsdl/WSIterautoID.wsdl
>  Using AXIS2_HOME:   /home/david/webframeworks/axis2/axis2-1.4
>  Using JAVA_HOME:       /opt/java/jre
> Retrieving document at 'wsdl/WSIterautoID.wsdl'.
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.NullPointerException


fixed. please have a look at with a nightly build.

thanks,
Amila.

>
>        at
>
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
>        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: java.lang.NullPointerException
>        at
>
> org.apache.axis2.wsdl.codegen.schema.AxisServiceTopElementSchemaGenerator.getTopElements(AxisServiceTopElementSchemaGenerator.java:169)
>        at
>
> org.apache.axis2.wsdl.codegen.schema.AxisServiceTopElementSchemaGenerator.getDummySchemaList(AxisServiceTopElementSchemaGenerator.java:61)
>        at
>
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:107)
>        at
>
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>        ... 2 more
>
>
> I googled a bit and found this issue:
> http://issues.apache.org/jira/browse/AXIS2-323
>
> It says:
> "The resolution would now work for WSDL s with the notion of out only MEPs.
> But the code generation engine is not aware of how to generate code for out
> only MEPs. So this is a mere bug fix, *not* an enhancement towards the out
> only MEP"
>
> I do not understand if this issue is solved, partially solved or something
> else.
>
> Could anyone help me out?
> I am using axis2 1.4, sun java 1.6.0_05, (but it also happens with java
> 1.5.0_15 and 1.4.2_16 so I don't think it's a jvm version problem)
>
> Thanks
>
> PS:
> The WSDL is the following:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
>        name="WSIterautoID"
>        targetNamespace="
> http://integra.la/digitel/ws/iterauto/WSIterautoID/";
>        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>        xmlns:tns="http://integra.la/digitel/ws/iterauto/WSIterautoID/";
>        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";>
>        <wsdl:types>
>                <xsd:schema
>                        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>                        targetNamespace="
> http://integra.la/digitel/ws/iterauto/WSIterautoID/";>
>                        <xsd:element name="getIterautoIDResponse">
>                                <xsd:complexType>
>                                        <xsd:sequence>
>                                                <xsd:element
>                                                        name="iterautoID"
>                                                        type="xsd:string">
>                                                </xsd:element>
>                                        </xsd:sequence>
>                                </xsd:complexType>
>                        </xsd:element>
>                        <xsd:complexType name="WSIterautoIDException">
>                                <xsd:sequence>
>                                        <xsd:element
>                                                name="code"
>                                                type="xsd:string">
>                                        </xsd:element>
>                                        <xsd:element
>                                                name="msg"
>                                                type="xsd:string">
>                                        </xsd:element>
>                                        <xsd:element
>                                                name="trace"
>                                                type="xsd:string">
>                                        </xsd:element>
>                                        <xsd:element
>                                                name="from"
>                                                type="xsd:string">
>                                        </xsd:element>
>                                </xsd:sequence>
>                        </xsd:complexType>
>                        <xsd:element
>                                name="getIterautoIDFault"
>                                type="tns:WSIterautoIDException">
>                        </xsd:element>
>                </xsd:schema>
>        </wsdl:types>
>        <wsdl:message name="getIterautoIDRequest"></wsdl:message>
>        <wsdl:message name="getIterautoIDResponse">
>                <wsdl:part
>                        name="id" element="tns:getIterautoIDResponse">
>                </wsdl:part>
>        </wsdl:message>
>        <wsdl:message name="IterautoIDFault">
>                <wsdl:part
>                        name="fault" element="tns:getIterautoIDFault">
>                </wsdl:part>
>        </wsdl:message>
>        <wsdl:portType name="WSIterautoID">
>                <wsdl:operation name="getIterautoID">
>                        <wsdl:input
> message="tns:getIterautoIDRequest"></wsdl:input>
>                        <wsdl:output
> message="tns:getIterautoIDResponse"></wsdl:output>
>                        <wsdl:fault
>                                name="WSIterautoIDException"
>                                message="tns:IterautoIDFault">
>                        </wsdl:fault>
>                </wsdl:operation>
>        </wsdl:portType>
>        <wsdl:binding
>                name="WSIterautoIDSOAP"
>                type="tns:WSIterautoID">
>                <soap:binding
>                        style="document"
>                        transport="http://schemas.xmlsoap.org/soap/http"; />
>                <wsdl:operation name="getIterautoID">
>                        <soap:operation
>
> soapAction="
> http://integra.la/digitel/ws/iterauto/WSIterautoID/NewOperation"; />
>                        <wsdl:input>
>                                <soap:body use="literal" />
>                        </wsdl:input>
>                        <wsdl:output>
>                                <soap:body use="literal" />
>                        </wsdl:output>
>                        <wsdl:fault name="WSIterautoIDException">
>                                <soap:fault
>                                        name="WSIterautoIDException"
>                                        use="literal"/>
>                        </wsdl:fault>
>                </wsdl:operation>
>        </wsdl:binding>
>        <wsdl:service name="WSIterautoID">
>                <wsdl:port
>                        name="WSIterautoID"
>                        binding="tns:WSIterautoIDSOAP">
>                        <soap:address
>                                location="
> http://10.21.17.196:8080/WebServices/services/WSIterautoID"; />
>                </wsdl:port>
>        </wsdl:service>
> </wsdl:definitions>
>
> --
> Ing. David Ojeda
> Integra Consultores
> Caracas, Venezuela
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Reply via email to