[jboss-user] [JBoss Web Services] - wsconsume generates JAXBelement<String> instead of just String for xs:string
Felix Friedrich
do-not-reply at jboss.com
Thu May 13 10:23:03 EDT 2010
Felix Friedrich [http://community.jboss.org/people/felix-friedrich] replied to the discussion
"wsconsume generates JAXBelement<String> instead of just String for xs:string"
To view the discussion, visit: http://community.jboss.org/message/542883#542883
--------------------------------------------------------------
Hej hej,
in some cases your solution solved my problem. But I still have some cases where the JAXBElement occures in the Java code.
This definition in the WSDL...
<element name="Name" type="tv:NameType"/>
<complexType name="NameType">
<sequence minOccurs="1" maxOccurs="unbounded">
<element name="begin" type="xsd:time" minOccurs="1" maxOccurs="1"/>
<element name="end" type="xsd:time" minOccurs="1" maxOccurs="1"/>
</sequence>
<attribute name="begin" type="tv:AnotherType" use="required"/>
<attribute name="end" type="tv:AnotherType" use="optional"/>
</complexType>
... will be this Java code:
@XmlElementRefs({
@XmlElementRef(name = "begin", namespace = "http://...", type = JAXBElement.class),
@XmlElementRef(name = "end", namespace = "http://...", type = JAXBElement.class)
})
protected List<JAXBElement<XMLGregorianCalendar>> beginAndEnd;
@XmlAttribute(required = true)
protected AnotherType begin;
@XmlAttribute
protected AnotherType end;
I do not know why there is still this occurence of the JAXBElement and it is not very nice to use in the code. Any suggestions/explanations?
Thanks,
F.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/542883#542883]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100513/af361806/attachment-0001.html
More information about the jboss-user
mailing list