users@jax-ws.java.net

Re: Exporting whole package in WSDL

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Fri, 10 Mar 2006 11:28:00 -0800

Unfortunately, there is not a clean way to do this in JAX-WS. As a
work-around, you can simply create a new method
on your sei that uses all of the classes that you want in the schema.


Dinko Tenev wrote:

>Just to make it clear, I have something like the following:
>
>
>package types;
>
>public abstract class A {}
>public class B extends A {}
>public class C extends A {}
>
>public class D { A[] values; }
>
>
>package svc;
>
>@WebService
>class Svc {
> public void foo( D data ) {}
>}
>
>
>The point is having a mixture of B and C objects in D.values.
>Unfortunately, the schema generated for Svc.foo() only mentions D and
>A. What I want to do is force definitions for B and C into the schema
>as well, so that those could be available at the client side too.
>
>I would be perfectly happy to do this by explicitly annotating B and
>C, or by intercepting schema generation to produce the schema myself,
>or just anything short of littering the Svc interface with dummy
>methods, for that matter.
>
>Any ideas will be greatly appreciated.
>
>
>On 3/6/06, Dinko Tenev <dinko.tenev_at_gmail.com> wrote:
>
>
>>Is there a way to have the WSDL definition for a service describe each
>>and every class present in a package?
>>
>>I expected that annotating the package with @XmlSchema(...) would be
>>enough, but the generated WSDL only mentions classes that are directly
>>referenced from the exported interface. This is not what I want, as I
>>need to export a whole hierarchy of which the interface mentions only
>>a few base classes.
>>
>>What's the proper way to do this?
>>
>>
>>Cheers,
>>
>>Dinko
>>
>>
>>
>
>
>--
>
>Cheers,
> Dinko
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
>For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>
>
>

-- 
 - Doug