How to specify schema location in an xsd file?

Posted by Manoj on Stack Overflow See other posts from Stack Overflow or by Manoj
Published on 2010-05-20T08:58:16Z Indexed on 2010/05/20 9:50 UTC
Read the original article Hit count: 240

Filed under:
|
|
|

I have an xsd file Foo.xsd. I tried following ways to refer it in a WSDL file but it doesnt work.

1) placed the xsd file in local file system and imported it as

<xsd:import namespace="http://ws.test.com/" schemaLocation="file:///D:/wsdl/Foo.xsd"></xsd:import>

2) Placed the xsd file in web root folder and imported as

<xsd:import namespace="http://ws.test.com/" schemaLocation="http://localhost:8080/Xfire/Foo.xsd"></xsd:import>

When I run the client I get null for the fields of response object. But this works when I embed the type definition inside the WSDL itself.

How do we specify the path to external xsds?

I am using xFire 1.2.6 for generating webservices. Client is generated using xFire WSGen ant task.

© Stack Overflow or respective owner

Related posts about java

Related posts about webservice