You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alexandr Kormushin <ko...@gmail.com> on 2009/05/15 06:53:53 UTC

jax-ws service problem

Hi!

A have following JAX-WS service:

@WebService(endpointInterface = "demo.hw.server.HelloWorld",
serviceName = "HelloWorld")
public class HelloWorldImpl implements HelloWorld {
    public List<MyBean> getBean(String smth) {
        return Arrays.asList(new MyBean[] { new MyBean() });
    }
}

@XmlType(namespace = "http://server.hw.demo/")
public class MyBean {
    private String smth;

    public String getSmth() {
        return smth;
    }

    public void setSmth(String smth) {
        this.smth = smth;
    }
}

When I'm trying to call this service I get exception:
javax.xml.bind.JAXBException: java.util.List is not known to this context

On JAXWS-RI this works fine and correct result received.

What's wrong? How to fix this?

Thanks in advance!

Re: jax-ws service problem

Posted by Alexandr Kormushin <ko...@gmail.com>.
It's a common ws usage! Doesn't anybody have this issue?

On Fri, May 15, 2009 at 8:53 AM, Alexandr Kormushin <ko...@gmail.com> wrote:
> Hi!
>
> A have following JAX-WS service:
>
> @WebService(endpointInterface = "demo.hw.server.HelloWorld",
> serviceName = "HelloWorld")
> public class HelloWorldImpl implements HelloWorld {
>     public List<MyBean> getBean(String smth) {
>         return Arrays.asList(new MyBean[] { new MyBean() });
>     }
> }
>
> @XmlType(namespace = "http://server.hw.demo/")
> public class MyBean {
>     private String smth;
>
>     public String getSmth() {
>         return smth;
>     }
>
>     public void setSmth(String smth) {
>         this.smth = smth;
>     }
> }
>
> When I'm trying to call this service I get exception:
> javax.xml.bind.JAXBException: java.util.List is not known to this context
>
> On JAXWS-RI this works fine and correct result received.
>
> What's wrong? How to fix this?
>
> Thanks in advance!
>