[ 
https://issues.apache.org/jira/browse/AXIS2-4209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756097#action_12756097
 ] 

Will Lauer commented on AXIS2-4209:
-----------------------------------

It's not clear to me that this completely fixes the issue. I'm seeing the same 
problem with Axis2 1.5, and looking at the source, I see the referenced changes 
above already included. It looks like the issue is in ServiceDescriptionImpl. 
The previous fix added "this.catalogManager = 
this.composite.getCatalogManager();", but that doesn't account for the case 
where this.composite.getCatalogManager() returns null, which is happening for 
me. Looks like that happens when ServiceDescriptionImpl is called from 
DescriptionFactoryImpl.createServiceDescriptionFromDBCMap. Looking back the 
call chain, it seems that 
DescriptionFactoryImpl.createServiceDescription(Class, ConfigurationContext) 
calls JavaClassToDBCConverter.produceDBC, which generates composites whose 
catalogManager is null.

I'm not sure what the appropriate solution for this is. Should produceDBC be 
changed, or is this as simple as adding 
        if (catalogManager == null) {
                catalogManager = new OASISCatalogManager();
        }
to ServiceDescriptionImpl (as is done in at least one of its other constructors)

> OASIS catalog resolution does not work for schema references
> ------------------------------------------------------------
>
>                 Key: AXIS2-4209
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4209
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: jaxws
>    Affects Versions: 1.5, nightly
>            Reporter: Jarek Gawor
>            Assignee: Jarek Gawor
>             Fix For: 1.5, nightly
>
>
> OASIS catalog resolution does not work for schema references. I ran into the 
> following exception when wsdl had schema import to http://foo/foo.xsd and 
> jax-ws-catalog.xml redirected the import to a local file. That happened 
> because the OASISCatalogManager associated with the WSDL is not used when 
> resolving XmlSchema references in WSDL11ToAxisServiceBuilder.
> java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: 
> foo
>         at 
> org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1904)
>         at 
> org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1927)
>         at 
> org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1616)
>         at 
> org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:224)
>         at 
> org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:433)
>         at 
> org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLToAxisServiceBuilder.java:144)
>         at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleElements(WSDL11ToAxisServiceBuilder.java:2319)
>         at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:413)
>         at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:402)
>         at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:346)
>         at 
> org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.buildAxisServiceFromWSDL(EndpointDescriptionImpl.java:903)
>         at 
> org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.setupAxisServiceFromDBL(EndpointDescriptionImpl.java:811)
>         at 
> org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:378)
>         at 
> org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:363)
>         at 
> org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:271)
>         at 
> org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:255)
>         at 
> org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescriptionFromDBCMap(DescriptionFactory.java:492)

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

Reply via email to