axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Dean <>
Subject wsdl/schema import
Date Fri, 04 Jan 2008 15:26:58 GMT

I am importing a schema as follows:

<definitions ...>
      <schema ...>
         <import namespace="some URI" schemaLocation=""

This fails with error message: Unable to locate with a locator the schema referenced at '...'
relative to document base 'meta-inf/mywsdl.wsdl.

It appears that the Axis2 wsdl processor can only reference schemas relative to the location
of the wsdl itself.  If I change the import to:

         <import namespace="some URI" schemaLocation="testSchema.xsd" />

and add testSchema.xsd to meta-inf/ directory in the AAR, it works.

I checked WS-I Basic Profile 1.1 and didn't see any limitation on schemaLocation.  The XML
Schema spec does say that this attribute is only a hint.  Is it possible to reference a schema
that is not relative to the wsdl?  Is this an Axis2 shortfall or is this the way it works
for all webservice stacks?

If you did support such an absolute reference, how would you specify credentials to access
the testSchema.xsd if the example site:  was secured.  You wouldn't want
to specify clear text credentials in the wsdl:

FYI: You can't use a file URI either: file:///c:/testSchema.xsd.

I'm thinking that a referenced schema must be relative to the wsdl by design, but I couldn't
find any verbage to back up my suspicion.

Anyone else have any thoughts.


Tony Dean
SAS Institute Inc.

SAS... The Power to Know

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message