Return-Path: Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: (qmail 17303 invoked from network); 6 Oct 2010 17:02:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Oct 2010 17:02:13 -0000 Received: (qmail 5603 invoked by uid 500); 6 Oct 2010 17:02:12 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 5381 invoked by uid 500); 6 Oct 2010 17:02:11 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 5370 invoked by uid 99); 6 Oct 2010 17:02:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 17:02:11 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of null.nan@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-ww0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 17:02:04 +0000 Received: by wwb28 with SMTP id 28so8138972wwb.32 for ; Wed, 06 Oct 2010 10:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4v1n9GGlp3+aLTLRGamix7CLWT+zj4EPmQpI7jiGeUU=; b=PXIIekLqnki9tATctHRANq6hkZkngRstqeqnY+OO54vqZFC5vWDD1ojOi3Wnc5dgfE WDri3GuzcuXaQtbmrFp0+DxWetA6EJKAsuzPDopm3jGsebe6HYpNDB7Cb/XoH9rDT5ji 3xUWJObgQ01hCpfoVnoeYv/KZlj8IIB0YspLE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Nk43gl353sMiC/79mvkZ2RMCd/nnMl8qFOT2Bvl7CktaSgzVkK89VvvYGKeYHLwQF8 t6ZOm47LVbcsbkkduHZYAbK8GFtByeC4u0D6ob4aCJvyeF15UbszF3d5lGx83yE1vo4P I80UjlpKUTGYgET5iG/94aLF5cEp/IvOgLU/g= MIME-Version: 1.0 Received: by 10.227.153.15 with SMTP id i15mr10428260wbw.211.1286384503169; Wed, 06 Oct 2010 10:01:43 -0700 (PDT) Received: by 10.227.151.65 with HTTP; Wed, 6 Oct 2010 10:01:43 -0700 (PDT) In-Reply-To: References: <67B9E1A3-9E76-4FF6-876D-55B9904E24C3@lhsw.com> Date: Wed, 6 Oct 2010 13:01:43 -0400 Message-ID: Subject: Re: Is this one still live? I ask this several times. how could I put all schema to the same namespace From: Nan Null To: java-user@axis.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 generated). 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 d= ays > and can not get any answer for this. > I read that article several times . It just works for service class. Insi= de > service, I use some pojos which are in different package. It generated > schema in different namespace. From java2wsdl command, there is one optio= n > called p2n which means give mapping for package to namespace. I can gener= ate > 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 serv= ice > to apply the same settings for axis service. I check the source=A0 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 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=3D"MyService" targteNamespace=3D"http://mynamespace" ) >> public class MyPojo { >> =85 >> } >> 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 differ= ent >>> 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 in >>> service.xml. But it just put my service=A0 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: java-user-unsubscribe@axis.apache.org For additional commands, e-mail: java-user-help@axis.apache.org