[ https://issues.apache.org/jira/browse/AXIS2-4353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796681#action_12796681 ]
Ben Reif commented on AXIS2-4353: --------------------------------- That's correct, they are stored in a jar and do not change. Our code currently looks up the WSDL file in the jar as a resource from the classpath. It then creates the ServiceClient using the constructor that takes in the Definition object. I think the real issue is with a bug in the org.apache.ws.commons.schema.resolver.DefaultURIResolver class, but setting a custom resolver would be a work around. You're correct, I could add in logic that checks if it's WSDL 1.1 or WSDL 2.0 and then either create the WSDL11ToAxisServiceBuilder or the WSDL20ToAxisServiceBuilder. Then set the custom resolver and create the AxisService. Then use the ServiceClient constructor that uses the AxisService. You then have to modify your code for every new WSDL version that comes out (though I agree it wouldn't be that often). I was just mentioning that it would be nice to just expose an extra argument (in the ServiceClient constructors that take in the Definition or wsdl URL) to be able to set a custom resolver. Again, none of this would be an issue if the DefaultURIResolver was fixed in the first place. Also, the priority of this can probably be reduced since there is a work around. > ServiceClient can not resolve WSDL with imported schemas > -------------------------------------------------------- > > Key: AXIS2-4353 > URL: https://issues.apache.org/jira/browse/AXIS2-4353 > Project: Axis2 > Issue Type: Bug > Components: client-api > Affects Versions: 1.4.1, 1.4 > Environment: all > Reporter: Ben Reif > Assignee: Andreas Veithen > Priority: Blocker > Fix For: 1.6 > > Attachments: ResolveXSDTestCase.zip > > > I am using the ServiceClient to invoke a Web Service, but the WSDL file and > imported schema files are located within a jar file that is in the Classpth. > I can get the Definition object, and I set the DocumentBaseURI to the proper > URL pointing inside the jar file, but when I pass it to the ServiceClient I > get an error saying that it can't resolve the imported schema files. This > happens when it calls AxisService.createClientSideAxisService(). > It looks like a fix was put in the WSDLToAxisServiceBuilder class (the > addition of the setCustomResolver() method) so that you can set a custom > URIResolver to resolve imported schema files. This gets inherited by the > WSDL11ToAxisServiceBuilder, however the problem is that this setter is not > exposed to the ServiceClient, so I can never use it. The ServiceClient > constructors and the AxisService.createClientSideAxisService() methods should > take in an additional argument so that calling code can pass in the right > URIResolver instance which would get set on the WSDL11ToAxisServiceBuilder > instance. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.