users@jax-ws.java.net

RE: Re: Multiple WSDL imports with the same namespace?

From: Mike Feldmeier <mfeldmeier_at_metadata.com>
Date: Tue, 29 Nov 2005 11:52:14 -0800

Thanks again Vivek! This has been filed as issue #3.


-----Original Message-----
From: Vivek.Pandey_at_Sun.COM [mailto:Vivek.Pandey_at_Sun.COM]
Sent: Monday, November 28, 2005 4:29 PM
To: users_at_jax-ws.dev.java.net
Subject: Re: Multiple WSDL imports with the same namespace?

Hi Mike,

This looks like a bug. I just verified that it happens in the condition
when a wsdl document imports more than 1 document with the same
namespace, like your case below.

Having said that I must also say that wsimport can import documents with
the same namespace as long as in one wsdl document you have wsdl:imports
with unique namespace :-)

As a workaround can you try importing the wsdls such as:
messages_and_porttypes.wsdl imports portbinding_one.wsdl and
portbinding_one.wsdl imports portbinding_two.wsdl, not pretty but can
help you move along.

Please file a bug on java.net and we will try to fix it.

thanks,

-vivek.







Mike Feldmeier wrote:

> Hi,
>
>
>
> As near as I can tell from the specs and other posts, multiple WSDL
> imports are allowed (not disallowed), but the wsimport tool seems to
> be enforcing a single import per namespace rule:
>
>
>
> ...
>
> <!ENTITY MYSERVICE_NS ‘http://www.examples.com/myservice’>
>
> ...
>
>
>
> <definitions ...>
>
>
>
> <wsdl:import namespace=”&MYSERVICE_NS;”
> location=”&MYSERVICE_WSDLS;/messages_and_porttypes.wsdl”/>
>
> <wsdl:import namespace=”&MYSERVICE_NS;”
> location=”&MYSERVICE_WSDLS;/portbinding_one.wsdl”/>
>
> <wsdl:import namespace=”&MYSERVICE_NS;”
> location=”&MYSERVICE_WSDLS;/portbinding_two.wsdl”/>
>
>
>
> <service name=”MyService”>
>
> <port name=”PortOne” binding=”tns:PortOneBinding”>
>
> ...
>
> </port>
>
> <port name=”PortTwo” binding=”tns:PortTwoBinding>
>
> ...
>
> </port>
>
> </service>
>
>
>
> </definitions>
>
>
>
> yields:
>
>
>
> error: duplicate "import" entity: "http://www.example.com/myservice"
>
>
>
>
>
> Am I misinterpreting things, or is there a way around this, or is this
> an inherently bad thing that wsimport is protecting me from doing?
>
>
>
> Thanks,
>
> Mike
>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.362 / Virus Database: 267.13.3/174 - Release Date: 11/17/2005
>

-- 
Vivek Pandey
Web Services Standards and Technologies
Sun Microsystems Inc. 
-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/188 - Release Date: 11/29/2005
 
-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/188 - Release Date: 11/29/2005