users@glassfish.java.net

Re: How to add elementFormDefault to a WebService

From: Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>
Date: Wed, 09 Aug 2006 14:07:57 -0700

Here is what is recommended by the JAXWS team :

--------
Create package-info.java in the corresponding package with following
contents.
@XmlSchema (
      namespace = "http://example.com/foo/bar",
      elementFormDefault=XmlNsForm.QUALIFIED )
package com.example.foo.types;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;.

Currently there is bug when the namespace is not specified, and is
under investigation. You can specify the namespace to get around it for
now.
--------------

Hope this helps

Vijay

Edson Carlos Ericksson Richter wrote:
> Sorry for reposting, but I really need advice on how to this. I
> already included IZ 903 bcs Glassfish ignores package-info and
> annotations put in there.
>
> I'll appreciate any help!
>
> TIA,
>
> Richter
>
>
> Edson Carlos Ericksson Richter escreveu:
>> Hi!
>>
>> I'm trying add annotation to specify elementFormDefault=QUALIFIED to
>> a web service, without success.
>> In NetBeans 5.5, I got an advise to add
>> @XmlSchema(elementFormDefault=QUALIFIED) into package-info.java file.
>> I've done it, but WSDL still have no elementFormDefault=QUALIFIED on it.
>>
>> Someone could tell me how to do it (I'm using NB 5.5 latest daily
>> build with Glassfish b48).
>>
>>
>> TIA,
>>
>> Richter
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>