dev@jax-ws.java.net

Re: Question: Default wrapper bean package

From: James Mao <james.mao_at_iona.com>
Date: Tue, 06 Mar 2007 20:49:32 +0800

Hi,

Thanks, again, your answers helped a lot.

I think my question been complicated, let me simplify the question a
little bit.

1. if there is no wrapper annotation in sei, the JAXWS tools will
generate the wrapper class under jaxws subpackage
2. the JAXWS runtime server/client will use the same mechanism to load
the wrapper class, which are under the jaxws subpackage,
3. if the client decided to use the generated wsdl, it have to use the
tool to generate the wrapper bean, which now are under the SEI package,
but that's fine, the whole system still works, we have duplicated
classes, but it won't affect the whole system.

i'm figuring out the detail of how whole things work, correct me if i'm
wrong.

Thanks for your patient,
James.

> James,
> See my responses inline.
>
> James Mao wrote:
>> Hi,
>>
>> Thanks, for reply.
>>
>> So, according to the SPEC, if there is no such annotations, the
>> wrapper bean classes should be generated under 'jaxws' subpackage of
>> the SEI package.
>> And as you said in the wrapper beans, they use the SEI namespace.
>>
>> I'm wondering if i use the SEI to generate the wsdl, what's the
>> namespace of the wrapper element should i use,
>> the SEI namespace or the namespace which mapped the wrapper beans
>> package name.
> Which ever you want.
>>
>> for example,
>> the SEI method has no wrapper annotation
>> the SEI package name is net.java the namespace
>> is http://java.net
>> the Wrapper classes package name is net.java.jaxws the namespace
>> is http://java.net
>>
>> In the generated wsdl should i use http://java.net or
>> http://java.net/jaxws for the wrapper element in the schema?
> In this case, the wsdl would have http://java.net. for the wrapper
> elements.
>>
>> It seems to me that i should use the SEI namespace in the wsdl,
>> if that's the case, then if i use the wsdl to generate the java code
>> (reverse engineering)
>> then the wrapper bean class will be generated under the sei package,
>> there are duplicate wrapper classes
>> one in jaxws subpackage which was generated during java2wsdl, one in
>> sei package which was generated during wsdl2java
> You should not mix Java code from the server with Java code generated
> from a WSDL. This way you will only
> have one set of wrappers and on the client, they may very well be in
> the java.net package and not the java.net.jaxws package,
> but they will still behave the same.
>>
>> So i guess there is a conflict in the definition, i not sure though.
> Only if you try to mix the original Java classes with those generated
> by importing the WSDL. But even if you did mix them,
> everything would work fine as the generated Java SEI would have
> Request/ResponseWrappers that point at the wrapper classes generated
> when inporting the WSDL and not the wrapper classes generated on the
> server.
>
> I hope that answers your questions.
>>
>> Thanks again.
>> James.
>>> James,
>>> The customizations being spoken of are the Request/ResponseWrapper
>>> annotations.
>>> If you look at the generated wrapper beans, they declare the same
>>> namespace as the SEI.
>>>
>>> Thank you for using JAX-WS.
>>>
>>> James Mao wrote:
>>>> Hi,
>>>>
>>>> In jsr-224 3.6.2.1 said "In the absence of customizations, the
>>>> wrapper beans package MUST be a generated jaxws subpackage of the
>>>> SEI package"
>>>>
>>>> I don't know how to understand "In the absence of customizations",
>>>> is that mean the method has no RequestWrapper annotation?
>>>> or it can also mean there is a RequestWrapper annotation, but it
>>>> does not have a className attribute?
>>>>
>>>> anyway, if the wrapper bean class is generated into jaxws
>>>> subpackage, how does this map to wsdl?
>>>> the targetNamespace of the element will reflect the jaxws
>>>> subpackage, or not?
>>>> if it does, then it conflict with the annotation definition in
>>>> section 7.3, it said the targetNamespace by default is the
>>>> targetNamespace of SEI.
>>>> The SEI targetNamespace definitely will not include jaxws
>>>>
>>>> So, I guess there will have a conflict in java class and the
>>>> generated wsdl, when the wrapper annotation is in absence.
>>>>
>>>> Thanks in advance for any help
>>>>
>>>> James
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_jax-ws.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_jax-ws.dev.java.net
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_jax-ws.dev.java.net
>>> For additional commands, e-mail: dev-help_at_jax-ws.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_jax-ws.dev.java.net
>> For additional commands, e-mail: dev-help_at_jax-ws.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: dev-help_at_jax-ws.dev.java.net
>
>