Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Custom Objects with Jax-ws question

843833Nov 9 2006 — edited Nov 9 2006
Why 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2006
Added on Nov 9 2006
0 comments
133 views