You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by laura baño <la...@dif.um.es> on 2004/12/28 20:10:52 UTC
WSDL2Java & import
Hello everybody,
I'm using WSDL2Java and I'd like to know how to import a schema that is not present in my .wsdl file. I have already imported the schema with "import" in my .wsdl file but It doesn't work at all. Is there another way to make it? Could anyone help me?
Thanks in advance.
Laura
Re: WSDL2Java & import
Posted by Anne Thomas Manes <at...@gmail.com>.
You must use <xsd:import> to import a schema, not <wsdl:import>.
something like this:
<wsdl:definitions name="foo" targetNamespace="urn:foo"
xmlns:wsdl="..."
xmlns:soap="..."
xmlns:foo="urn:foo"
xmlns:bar="urn:bar" >
<wsdl:types>
<xsd:schema targetNamespace="urn:foo"
xmlns:xsd="..." >
<xsd:import namespace="urn:bar" schemaLocation="some-uri"/>
...
</xsd:schema>
</wsdl:types>
...
</wsdl:definitions>
Then you must reference elements from the schema using their fully
qualified element names (bar:...)
Anne
On Tue, 28 Dec 2004 20:10:52 +0100, laura baño <la...@dif.um.es> wrote:
> Hello everybody,
>
> I'm using WSDL2Java and I'd like to know how to import a schema that is not
> present in my .wsdl file. I have already imported the schema with "import"
> in my .wsdl file but It doesn't work at all. Is there another way to make
> it? Could anyone help me?
>
> Thanks in advance.
>
> Laura