Quantcast
Channel: Metro and JAXB Related Items on Java.net
Viewing all articles
Browse latest Browse all 171

Jax-ws, wsgen and jaxb annotations

$
0
0

I am creating a web service using NetBeans, Tomcat and jax-ws.

The problem I am having is am annotating a class Request containing a list with

<br />
    @XmlElementWrapper(name = "requestItems")<br />
    @XmlElement(name = "requestItem")<br />
    public List<RequestItem> getRequestItems()<br />
    {<br />
        return requestItems;<br />
    }<br />

But wsgen seems to ignore the annotations and I get a wsdl which instead of allowing

<br /><requestItems><br /><requestItem>...</requestItem><br /><requestItem>...</requestItem><br /><requestItem>...</requestItem><br /></requestItems><br />

only allows

<br /><requestItems>...</requestItems><br /><requestItems>...</requestItems><br /><requestItems>...</requestItems><br />

with the contents of the RequestItem class being inside the tag(s).

What am I doing wrong here?


Viewing all articles
Browse latest Browse all 171

Trending Articles