You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Peter Runge (JIRA)" <ji...@apache.org> on 2006/12/13 10:45:20 UTC

[jira] Created: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

NullPointerException generating WSDL with anonymous simple types
----------------------------------------------------------------

                 Key: AXIS2-1867
                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: codegen
    Affects Versions: nightly
         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
            Reporter: Peter Runge


WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.

This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).

The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.

Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
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:585)
	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.SchemaCompiler.compile(SchemaCompiler.java:257)
	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
	... 8 more
Caused by: java.lang.NullPointerException
	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
	... 9 more

It seems that removing one of the anonymous simple types allows the code to be generated without error.

The following WSDL was used (simplest form of original to reproduce bug):

<?xml version="1.0"?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
	<types>
		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
			<xsd:element name="goodMorning">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="goodMorningResultDto">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:complexType name="goodMorningRequestDto">
				<xsd:sequence>
					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:maxLength value="4"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:element>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:complexType name="goodMorningResultDtoType">
				<xsd:sequence>
					<xsd:element name="status" minOccurs="0" maxOccurs="1">
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:maxLength value="1"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:element>
				</xsd:sequence>
			</xsd:complexType>
		</xsd:schema>
	</types>

	<message name="goodMorningRequest">
		<part name="parameter" element="ns:goodMorning"/>
	</message>
	<message name="goodMorningResponse">
		<part name="parameter" element="ns:goodMorningResultDto"/>
	</message>

	<portType name="goodMorningPortType">
		<operation name="sayGoodMorning">
			<input message="ns:sayGoodMorningRequest"/>
			<output message="ns:sayGoodMorningResponse"/>
		</operation>
	</portType>
	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
		<operation name="sayGoodMorning">
			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
			<input>
				<soap:body use="literal"/>
			</input>
			<output>
				<soap:body use="literal"/>
			</output>
		</operation>
	</binding>
	<service name="goodMorning">
		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
			<soap:address location="http://localhost:8080/test"/>
		</port>
	</service>
</definitions>



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1867?page=comments#action_12459020 ] 
            
Davanum Srinivas commented on AXIS2-1867:
-----------------------------------------

Amila,

this patch looks old. i see a part of it already in 1.1 branch.

thanks,
dims

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Davanum Srinivas
>         Attachments: SchemaCompiler.java-patch.txt
>
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1867?page=all ]

Davanum Srinivas reassigned AXIS2-1867:
---------------------------------------

    Assignee: Amila Chinthaka Suriarachchi  (was: Davanum Srinivas)

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Amila Chinthaka Suriarachchi
>         Attachments: SchemaCompiler.java-patch.txt
>
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1867?page=all ]

Deepal Jayasinghe reassigned AXIS2-1867:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Amila Chinthaka Suriarachchi
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Peter Runge (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1867?page=comments#action_12460219 ] 
            
Peter Runge commented on AXIS2-1867:
------------------------------------

Well done guys - WSDL now works with latest snapshot.

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Davanum Srinivas
>         Attachments: adb_codegen.patch, SchemaCompiler.java-patch.txt
>
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1867?page=all ]

Amila Chinthaka Suriarachchi updated AXIS2-1867:
------------------------------------------------

    Attachment: adb_codegen.patch

Attached a patch with current svn

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Amila Chinthaka Suriarachchi
>         Attachments: adb_codegen.patch, SchemaCompiler.java-patch.txt
>
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1867?page=all ]

Amila Chinthaka Suriarachchi updated AXIS2-1867:
------------------------------------------------

    Attachment: SchemaCompiler.java-patch.txt

problem is the schema compiler always put the processed anonymous simple type details to the processedTypeMap. since Qname is null for anonymous types only one type element allowed to process. Now it put the processed simple Type elements only if they have a qname. 
I commit this to trunk ant have attached the patch to branch. 

Anyway in this wsdl message names given in the portType does not match with the message names.

<message name="goodMorningRequest">
        <part name="parameter" element="ns:goodMorning"/>
    </message>
    <message name="goodMorningResponse">
        <part name="parameter" element="ns:goodMorningResultDto"/>
    </message>

    <portType name="goodMorningPortType">
        <operation name="sayGoodMorning">
            <input message="ns:goodMorningRequest"/>
            <output message="ns:goodMorningResponse"/>
        </operation>
    </portType>  

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Amila Chinthaka Suriarachchi
>         Attachments: SchemaCompiler.java-patch.txt
>
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1867?page=all ]

Amila Chinthaka Suriarachchi reassigned AXIS2-1867:
---------------------------------------------------

    Assignee: Davanum Srinivas  (was: Amila Chinthaka Suriarachchi)

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Davanum Srinivas
>         Attachments: SchemaCompiler.java-patch.txt
>
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1867?page=all ]

Davanum Srinivas resolved AXIS2-1867.
-------------------------------------

    Resolution: Fixed

applied.

thanks,
dims

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Davanum Srinivas
>         Attachments: adb_codegen.patch, SchemaCompiler.java-patch.txt
>
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-1867) NullPointerException generating WSDL with anonymous simple types

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1867?page=all ]

Amila Chinthaka Suriarachchi reassigned AXIS2-1867:
---------------------------------------------------

    Assignee: Davanum Srinivas  (was: Amila Chinthaka Suriarachchi)

> NullPointerException generating WSDL with anonymous simple types
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1867
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1867
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: Axis2 1.1.1-SNAPSHOT (nightly build), JDK 1.5.0_08 x64, Windows XP x64
>            Reporter: Peter Runge
>         Assigned To: Davanum Srinivas
>         Attachments: adb_codegen.patch, SchemaCompiler.java-patch.txt
>
>
> WSDL2Java is failing on a WSDL that has multiple anonymous simple types with a NullPointerException.
> This may be related to issue AXIS2-1780, however this WSDL was tried with the latest nightly build (built 2006-12-13).
> The following is output of the error with the nightly build.  The same error occurs with Axis2 1.1.
> Using AXIS2_HOME:   c:\java\axis2-1.1.1-SNAPSHOT
> Using JAVA_HOME:    c:\java\jdk\jdk1.5.0_08-x64
> 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:585)
> 	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.SchemaCompiler.compile(SchemaCompiler.java:257)
> 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> 	... 8 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:592)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> 	... 9 more
> It seems that removing one of the anonymous simple types allows the code to be generated without error.
> The following WSDL was used (simplest form of original to reproduce bug):
> <?xml version="1.0"?>
> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://my.service.namespace" targetNamespace="http://my.service.namespace" xmlns="http://schemas.xmlsoap.org/wsdl/">
> 	<types>
> 		<xsd:schema elementFormDefault="qualified" targetNamespace="http://my.service.namespace">
> 			<xsd:element name="goodMorning">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningDto" type="ns:goodMorningRequestDto" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:element name="goodMorningResultDto">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="goodMorningResultDto" type="ns:goodMorningResultDtoType" minOccurs="1" maxOccurs="1" />
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 			<xsd:complexType name="goodMorningRequestDto">
> 				<xsd:sequence>
> 					<xsd:element name="postcode" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="4"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="goodMorningResultDtoType">
> 				<xsd:sequence>
> 					<xsd:element name="status" minOccurs="0" maxOccurs="1">
> 						<xsd:simpleType>
> 							<xsd:restriction base="xsd:string">
> 								<xsd:maxLength value="1"/>
> 							</xsd:restriction>
> 						</xsd:simpleType>
> 					</xsd:element>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 		</xsd:schema>
> 	</types>
> 	<message name="goodMorningRequest">
> 		<part name="parameter" element="ns:goodMorning"/>
> 	</message>
> 	<message name="goodMorningResponse">
> 		<part name="parameter" element="ns:goodMorningResultDto"/>
> 	</message>
> 	<portType name="goodMorningPortType">
> 		<operation name="sayGoodMorning">
> 			<input message="ns:sayGoodMorningRequest"/>
> 			<output message="ns:sayGoodMorningResponse"/>
> 		</operation>
> 	</portType>
> 	<binding name="goodMorningSoapBinding" type="ns:goodMorningPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
> 		<operation name="sayGoodMorning">
> 			<soap:operation soapAction="http://www.test.com/goodMorning" style="document" />
> 			<input>
> 				<soap:body use="literal"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	<service name="goodMorning">
> 		<port name="goodMorningPort" binding="ns:goodMorningSoapBinding">
> 			<soap:address location="http://localhost:8080/test"/>
> 		</port>
> 	</service>
> </definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org