axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nan Null <>
Subject Re: Is this one still live? I ask this several times. how could I put all schema to the same namespace
Date Wed, 06 Oct 2010 17:01:43 GMT
I have done that, and I didn't have problem with name space from the
service. Basically, here's what I did:

1) Created Java classes/interfaces all in a same package
2) Generates WSDL with namespace mapping options.  There are several
mappings there, not just one.
You can check the WSDL to make sure the correct namespaces are created.
3) From the generated WSDL, you can create the service out of that.
The name spaces should be preserved when you look at the service's
WSDL file (almost identical if not identical to the one you
4) You can generate Java client code using the WSDL, make sure to map
the namespaces back to the packages you want for your client.  Look at
the source, maybe you didn't pass in the expected format for the
namespace mappings.

Use Ant to do the job for you.

If it's an urgent, probably you can nicely ask again.  However, it
still can be offensive to some people because it's a free service
here.  You can always pay someone for faster answer.

On Wed, Oct 6, 2010 at 11:24 AM, haipeng du <> wrote:
> If you think that is rude, I gave my appology for this. Because I need to
> fix this problem as soon as possible. And I search internet for several days
> and can not get any answer for this.
> I read that article several times . It just works for service class. Inside
> service, I use some pojos which are in different package. It generated
> schema in different namespace. From java2wsdl command, there is one option
> called p2n which means give mapping for package to namespace. I can generate
> wsdl that we want. But when I get response from service, it still has
> different namespace for different packages. I think I have to modify service
> to apply the same settings for axis service. I check the source  code, and
> there is one property called get/setP2nMap, I bet that should be the same
> like p2n option in java2wsdl command. But I have no any idea to use that. I
> did not find any documentation to talk about it.
> Thanks a lot.
> On Tue, Oct 5, 2010 at 5:42 PM, Charles Galpin <> wrote:
>> Hi Haipeng
>> We are all busy and no-one has any obligation to respond, so posting
>> several times in a row isn't productive (and often considered rude).
>> I am changing the namespace reported by using a schema tag in my service
>> definition (services.xml), specifically using the schemaNamespace and
>> targetNamespace attributes of the schema tag.
>> See for more info
>> I believe you can do it with jsr 181 annotations in the code too, but
>> don't recall details off the top of my head. Something like
>> @WebService(name="MyService" targteNamespace="http://mynamespace" )
>> public class MyPojo {
>> …
>> }
>> hth
>> charles
>> On Oct 5, 2010, at 6:31 PM, haipeng du wrote:
>>> I create webserice with axis2 and generate wsdl from url
>>> http://myserver/services/myservice?wsdl. But for pojo objects in different
>>> package, it generates different schema namespace. I know from java2wsdl
>>> command, I can map all package to same namespace. How could I do from
>>> service.xml? I give element <schema namespace="mynamespace" /> in
>>> service.xml. But it just put my service  class to that namespace and not for
>>> my pojo models.
>>> Thanks a lot.
>> --
>> Haipeng Du
>> Salt Lake City
> --
> Haipeng Du
> Salt Lake City

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message