Custom Objects with Jax-ws question
843833Nov 9 2006 — edited Nov 9 2006Why do my custom objects that my web service returns get repackaged after running wsimport?
I have web service defined as:
package com.package.ws.Foo;
import com.package.beans.FooBean;
@WebService
public class Foo {
@WebMethod
public FooBean getFooBean(String fooID)
{
return new FooBean(fooID);
}
}
FooBean is a simple class that has getters/setters...nothing complicated.
Compiling and deploying the web service cause no problems.
Now on my client, I call my web service and it returns a FooBean. However, the FooBean is in:
com.package.ws package
and not in:
com.package.beans package
The wsimport causes this to happen.
Why is this? How do I ensure that my object remains in the original package?
I'm guessing this has to do with JAXB and XML namespaces?
Thanks in advance.