axis-java-dev mailing list archives

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

I am importing a schema as follows:

<definitions ...>
   <types>
      <schema ...>
         <import namespace="some URI" schemaLocation="http://www.sas.com/testSchema.xsd/"
/>
...

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: http://www.sas.com  was secured.  You wouldn't want
to specify clear text credentials in the wsdl:
http://username:password@www.sas.com/testSchema.xsd.

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.

Thanks.

Tony Dean
SAS Institute Inc.
919.531.6704
tony.dean@sas.com

SAS... The Power to Know
http://www.sas.com



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


Mime
View raw message