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 <[email protected]> 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 http://wso2.org/library/2060 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
