ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tharindu Mathew (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2-3820) AARFileBasedURIResolver NPE when importing schemas from nested directory
Date Tue, 04 May 2010 04:52:58 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-3820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tharindu Mathew updated AXIS2-3820:
-----------------------------------

    Attachment: import-wsdl.zip

Hi Krystian,

I tried to import your wsdl to make a .aar using wsdl2java but the wsdl you attached had some
issues. I fixed a few issues and now I'm having a problem of not being able to use imported
schemas.

I wonder if this is related to your original problem of nested imports. Please do have a look.

Command used: sh wsdl2java.sh -uri axis2-3820/some.wsdl -o new/ -ss -sd

Stack trace:

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name Phone
with namespace urn:listing2
	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.databinding.UnmatchedTypeException:
No type was mapped to the name Phone with namespace urn:listing2
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1450)
	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:253)
	... 2 more
Caused by: org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to
the name Phone with namespace urn:listing2
	at org.apache.axis2.wsdl.databinding.TypeMappingAdapter.getTypeMappingName(TypeMappingAdapter.java:82)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getOutputParamElement(AxisServiceBasedMultiLanguageEmitter.java:3229)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getOutputElement(AxisServiceBasedMultiLanguageEmitter.java:2871)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2361)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2241)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForSkeleton(AxisServiceBasedMultiLanguageEmitter.java:2155)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeSkeleton(AxisServiceBasedMultiLanguageEmitter.java:2081)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1407)
	... 3 more


> AARFileBasedURIResolver NPE when importing schemas from nested directory
> ------------------------------------------------------------------------
>
>                 Key: AXIS2-3820
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3820
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.4, 1.3
>         Environment: Java 1.5, Windows/HP-UX
>            Reporter: Krystian Szczesny
>            Priority: Critical
>         Attachments: axis2-3820.zip, import-wsdl.zip
>
>
> When trying to import a file with relative path Axis2 is treating META-INF directory
as ./ and not the directory of the file the import node is in.
> EXAMPLE:
> META-INF/
>   -some.wsdl
>   xsd/
>     -first.xsd
>     xsd2/
>       -second.xsd
> If we are going to import first.xsd in some.wsdl using relative path xsd/first.xsd it
is ok. But when first.xsd is trying to import second.xsd using relative path xsd2/second.xsd
there is going to be a NPE thrown:
> [INFO] AARFileBasedURIResolver: Unable to resolveMETA-INF/xsd2/second.xsd
> [ERROR] java.lang.NullPointerException
> java.lang.RuntimeException: java.lang.NullPointerException
>         at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> lder.java:1886)
>         at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> lder.java:1902)
>         at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder
> .java:1627)
>         at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(Sch
> emaBuilder.java:175)
>         at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec
> tion.java:347)
>         at org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WS
> DLToAxisServiceBuilder.java:140)
>         at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibl
> eElements(WSDL11ToAxisServiceBuilder.java:2186)
>         at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(
> WSDL11ToAxisServiceBuilder.java:306)
>         at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(
> WSDL11ToAxisServiceBuilder.java:297)
>         at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
> ce(WSDL11ToAxisServiceBuilder.java:265)
>         at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
> llServices(WSDL11ToAllAxisServicesBuilder.java:109)
>         at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDL
> File(ArchiveReader.java:230)
>         at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDL
> s(ArchiveReader.java:332)
>         at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.ja
> va:64)
>         at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy
> (DeploymentFileData.java:137)
>         at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngin
> e.java:571)
>         at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoL
> ist.java:141)
>         at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListe
> ner.java:318)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
> ryListener.java:220)
>         at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentE
> ngine.java:118)
>         at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(War
> BasedAxisConfigurator.java:272)
>         at org.apache.axis2.context.ConfigurationContextFactory.createConfigurat
> ionContext(ConfigurationContextFactory.java:78)
>         at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisSer
> vlet.java:500)
>         at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420
> )
>         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
> java:1161)
>         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:98
> 1)
>         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:4045)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 351)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:791)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
> 1)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
>         at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714
> )
>         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490
> )
>         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
>         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :311)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:117)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
> )
>         at org.apache.catalina.core.StandardService.start(StandardService.java:5
> 16)
>         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
> )
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: java.lang.NullPointerException
>         at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> lder.java:1875)
>         at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> lder.java:1902)
>         at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder
> .java:1627)
>         at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(Sch
> emaBuilder.java:175)
>         at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:8
> 2)
>         at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec
> tion.java:359)
>         at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollec
> tion.java:304)
>         at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBui
> lder.java:1884)
>         ... 49 more
> There were similar issues before:
> AXIS2-550
> AXIS2-1993
> AXIS2-1889
> I am not sure if they are related though.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message