There is a way of getting round this using the @XmlElement annotation.
In your ticket class you do this:
@XmlElement(minOccurs="1", nillable=false)
public String getUsername()
{
return userName;
}
Of course you can only use this if username is always present and not
nillable. It probably only works with JDK 1.5 as well.
- Stuart
-----Original Message-----
From: Dan Diephouse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 14 November 2006 2:00 PM
To: [email protected]
Subject: Re: [xfire-user] unexpected code generation with wsgen and jaxb
binding
Unfortunately, no, this is a relic of the JAXB specification at the
moment. Its frustrating to say the least...
- Dan
John Sanda wrote:
>I am an xfire newbie, and I some web service client code that has been
>generated with Axis 1. I need to migrate over to xfire (1.2), and the
code
>that the wsgen ant task produces is not what I expected. I am using the
JAXB
>for the binding. With Axis 1, one of my generated classes looks
something
>like:
>
>public class Ticket {
> public String getUsername() {...}
>}
>
>The generated Ticket class from the wsgen task with jaxb binding looks
like:
>
>public class Ticket {
> public JAXBElement<String> getUsername() {...}
>}
>
>Is there a way that I can alter the wsgen code generation so that
>getUsername() will return a String instead of a JAXBElement<String>?
Thanks.
>
>
--
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email