Are you sure?
You might want to delete everything and start again clean.
Anne
On 8/25/06, CHAPELLIERE Olivier ORANGE-FT
<[EMAIL PROTECTED]> wrote:
oups sorry for the typo !
once fixed I still have my warning:
Aug 25, 2006 2:55:16 PM org.apache.axis2.schema.SchemaCompiler findClassName
WARNING: Type {http://www.mynamespace.net}myStatus_type0 missing!
Aug 25, 2006 2:55:16 PM org.apache.axis2.schema.SchemaCompiler findClassName
WARNING: Type {http://www.mynamespace.net}myStatus_type0 missing!
I can't understand why
any idea?
Olivier
"Anne Thomas Manes"
<[EMAIL PROTECTED]>
25/08/2006 14:55 To: [email protected]
Please respond to axis-user cc:
bcc:
Subject: Re: [axis2]
NullPointerException with WSDL2Java
Olivier,
You have an extra ">" in your schema declaration that occurs before
you declare the targetNamespace in your schema:
<xsd:schema elementFormDefault="qualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <-- error
xmlns="http://www.mynamespace.net"
targetNamespace="http://www.mynamespace.net">
Anne
On 8/24/06, CHAPELLIERE Olivier ORANGE-FT
<[EMAIL PROTECTED]> wrote:
>
>
> Thanks for your help Anne. As recommended I opened a bug request yesterday.
> It is already fixed, so I tried latest nigthly build (08/24/2006).
> But now I get warnings (see below) at client code generation.
>
> Aug 24, 2006 1:09:10 PM org.apache.axis2.schema.SchemaCompiler findClassName
> WARNING: Type {urn:myNamespace}myStatus_type0 missing!
> Aug 24, 2006 1:09:10 PM org.apache.axis2.schema.SchemaCompiler findClassName
> WARNING: Type {urn:myNamespace}myStatus_type0 missing!
>
> and here is my new wsdl file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.mynamespace.net"
> xmlns="http://www.mynamespace.net">
>
> <wsdl:types>
> <xsd:schema elementFormDefault="qualified"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> xmlns="http://www.mynamespace.net"
> targetNamespace="http://www.mynamespace.net">
>
> <xsd:element name="myStatus"><xsd:complexType><xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="errorcode"
type="xsd:int"/>
> </xsd:sequence></xsd:complexType></xsd:element>
>
> <xsd:element name="myMethod1"><xsd:complexType><xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" name="myArg"
type="xsd:string"/>
> </xsd:sequence></xsd:complexType></xsd:element>
>
> <xsd:element
name="myMethod1Response"><xsd:complexType><xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1" ref="myStatus"/>
> </xsd:sequence></xsd:complexType></xsd:element>
>
> </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="myMethod1Request">
> <wsdl:part name="input" element="myMethod1"/>
> </wsdl:message>
> <wsdl:message name="myMethod1Result">
> <wsdl:part name="output" element="myMethod1Response"/>
> </wsdl:message>
>
> <wsdl:portType name="myWebServices">
> <wsdl:operation name="myMethod1" parameterOrder="input">
> <wsdl:input name="myMethod1Request" message="myMethod1Request"/>
> <wsdl:output name="myMethod1Result" message="myMethod1Result"/>
> </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="myWebServicesSoapBinding" type="myWebServices">
> <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="myMethod1">
> <wsdlsoap:operation soapAction="myMethod1"/>
> <wsdl:input><wsdlsoap:body use="literal"/></wsdl:input>
> <wsdl:output><wsdlsoap:body use="literal"/></wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
>
> <wsdl:service name="myWebServices">
> <wsdl:port name="myWebServices" binding="myWebServicesSoapBinding">
> <wsdlsoap:address
location="http://localhost:8080/axis2/services/myWebServices"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
> my XMl schema seems valid so I can't understand why
>
> Olivier
>
>
>
> "Anne Thomas Manes"
> <[EMAIL PROTECTED]>
> 23/08/2006 21:02 To: [email protected]
> Please respond to axis-user cc:
> bcc:
> Subject: Re: [axis2]
NullPointerException with WSDL2Java
>
>
>
>
>
>
> My guess is that the error is caused by the fact that you use the same
> input message for both operations. Axis (and WS-I Basic Profile)
> requires that each operation have a unique message signature (which is
> the QName of the child element of the <soap:Body>). Both or your
> operations use the same signature: "myNamespace"}myMethod.
>
> The error might also be caused by the fact that "myNamespace" is not a
> valid URI. A namespace must be a valid URI.
>
> To fix your problem:
> 1. Change the target namespace to a valid URI (e.g., "urn: ")
> 2. Define unique input elements for your two operations
>
> Meanwhile, WSDL2Java should not generate an NPE, so please also file a JIRA.
>
> Anne
>
> On 8/23/06, CHAPELLIERE Olivier ORANGE-FT
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi everybody,
> >
> > I have a NullPointerException while generating client code for a WSDL.
> > I tried axis2 version 1.0 and nightly build of august 22th 2006 and I
always have the exception.
> >
> > My command line is:
> > WSDL2Java.sh -uri bug.wsdl -o gen
> >
> > My wsdl file is the following:
> > 1 <?xml version="1.0" encoding="UTF-8"?>
> > 2 <wsdl:definitions xmlns="mynamespace"
> > 3 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > 4
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> > 5 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > 6 targetNamespace="mynamespace">
> > 7
> > 8 <wsdl:types>
> > 9 <xsd:schema elementFormDefault="qualified"
> > 10 targetNamespace="mynamespace"
> > 11 xmlns:mynamespace="mynamespace"
> > 12 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> > 13
> > 14 <xsd:element
name="myStatus"><xsd:complexType><xsd:sequence>
> > 15 <xsd:element maxOccurs="1" minOccurs="1" name="errorcode"
type="xsd:int"/>
> > 16 </xsd:sequence></xsd:complexType></xsd:element>
> > 17
> > 18 <xsd:element
name="myMethod"><xsd:complexType><xsd:sequence>
> > 19 <xsd:element maxOccurs="1" minOccurs="1" name="myArg"
type="xsd:string"/>
> > 20 </xsd:sequence></xsd:complexType></xsd:element>
> > 21
> > 22 <xsd:element
name="myMethod1Response"><xsd:complexType><xsd:sequence>
> > 23 <xsd:element maxOccurs="1" minOccurs="1"
ref="mynamespace:myStatus"/>
> > 24 </xsd:sequence></xsd:complexType></xsd:element>
> > 25
> > 26 <xsd:element
name="myMethod2Response"><xsd:complexType><xsd:sequence>
> > 27 <xsd:element maxOccurs="1" minOccurs="1"
ref="mynamespace:myStatus"/>
> > 28 </xsd:sequence></xsd:complexType></xsd:element>
> > 29
> > 30 </xsd:schema>
> > 31 </wsdl:types>
> > 32
> > 33 <wsdl:message name="myMethodRequest">
> > 34 <wsdl:part name="input" element="myMethod"/>
> > 35 </wsdl:message>
> > 36 <wsdl:message name="myMethod1Result">
> > 37 <wsdl:part name="output" element="myMethod1Response"/>
> > 38 </wsdl:message>
> > 39 <wsdl:message name="myMethod2Result">
> > 40 <wsdl:part name="output" element="myMethod2Response"/>
> > 41 </wsdl:message>
> > 42
> > 43 <wsdl:portType name="myWebServices">
> > 44 <wsdl:operation name="myMethod1" parameterOrder="input">
> > 45 <wsdl:input name="myMethodRequest"
message="myMethodRequest"/>
> > 46 <wsdl:output name="myMethod1Result"
message="myMethod1Result"/>
> > 47 </wsdl:operation>
> > 48 <wsdl:operation name="myMethod2" parameterOrder="input">
> > 49 <wsdl:input name="myMethodRequest"
message="myMethodRequest"/>
> > 50 <wsdl:output name="myMethod2Result"
message="myMethod2Result"/>
> > 51 </wsdl:operation>
> > 52 </wsdl:portType>
> > 53
> > 54 <wsdl:binding name="myWebServicesSoapBinding"
type="myWebServices">
> > 55 <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
> > 56 <wsdl:operation name="myMethod1">
> > 57 <wsdlsoap:operation soapAction="myMethod1"/>
> > 58 <wsdl:input><wsdlsoap:body use="literal"/></wsdl:input>
> > 59 <wsdl:output><wsdlsoap:body
use="literal"/></wsdl:output>
> > 60 </wsdl:operation>
> > 61 <wsdl:operation name="myMethod2">
> > 62 <wsdlsoap:operation soapAction="myMethod2"/>
> > 63 <wsdl:input><wsdlsoap:body use="literal"/></wsdl:input>
> > 64 <wsdl:output><wsdlsoap:body
use="literal"/></wsdl:output>
> > 65 </wsdl:operation>
> > 66 </wsdl:binding>
> > 67
> > 68 <wsdl:service name="myWebServices">
> > 69 <wsdl:port name="myWebServices"
binding="myWebServicesSoapBinding">
> > 70 <wsdlsoap:address
location="http://localhost:8080/axis2/services/myWebServices"/>
> > 71 </wsdl:port>
> > 72 </wsdl:service>
> > 73 </wsdl:definitions>
> >
> > And I get the following exception stack trace:
> >
> > Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
> > at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> > at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> > Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
> > at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:52)
> > at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
> > ... 2 more
> > Caused by: java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:49)
> > ... 3 more
> > Caused by: org.apache.axis2.schema.SchemaCompilationException:
java.lang.NullPointerException
> > at
org.apache.axis2.schema.writer.JavaBeanWriter.write(JavaBeanWriter.java:218)
> > at
org.apache.axis2.schema.SchemaCompiler.writeComplexType(SchemaCompiler.java:838)
> > at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:563)
> > at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:436)
> > at
org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1373)
> > at
org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1336)
> > at
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:859)
> > at
org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:792)
> > at
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:775)
> > at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:475)
> > at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:446)
> > at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:308)
> > at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:230)
> > at
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:77)
> > ... 8 more
> > Caused by: java.lang.NullPointerException
> > at
org.apache.axis2.schema.writer.JavaBeanWriter.process(JavaBeanWriter.java:353)
> > at
org.apache.axis2.schema.writer.JavaBeanWriter.write(JavaBeanWriter.java:213)
> > ... 21 more
> >
> > I noticed that if I comment either line 23 or line 27 it works
> > I look into the archive and don't find anything
> >
> > Is this a know problem? Do I miss something?
> >
> > Thanks for your help
> >
> > Olivier
> >
> >
> >
> > *********************************
> > This message and any attachments (the "message") are confidential and
intended solely for the addressees. Any unauthorised
> > use or dissemination is prohibited.
> > Messages are susceptible to alteration. France Telecom Group shall not be
liable for the message if altered, changed or
> > falsified.
> > If you are not the intended addressee of this message, please cancel it
immediately and inform the sender.
> > ********************************
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
> *********************************
> This message and any attachments (the "message") are confidential and
intended solely for the addressees. Any unauthorised
> use or dissemination is prohibited.
> Messages are susceptible to alteration. France Telecom Group shall not be
liable for the message if altered, changed or
> falsified.
> If you are not the intended addressee of this message, please cancel it
immediately and inform the sender.
> ********************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
*********************************
This message and any attachments (the "message") are confidential and intended
solely for the addressees. Any unauthorised
use or dissemination is prohibited.
Messages are susceptible to alteration. France Telecom Group shall not be
liable for the message if altered, changed or
falsified.
If you are not the intended addressee of this message, please cancel it
immediately and inform the sender.
********************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]