Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 83081 invoked from network); 20 Nov 2006 20:17:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2006 20:17:27 -0000 Received: (qmail 19671 invoked by uid 500); 20 Nov 2006 20:17:36 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 19638 invoked by uid 500); 20 Nov 2006 20:17:36 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 19629 invoked by uid 99); 20 Nov 2006 20:17:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Nov 2006 12:17:36 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of Seumas.Soltysik@iona.com designates 65.223.216.181 as permitted sender) Received: from [65.223.216.181] (HELO amereast-smg1.iona.com) (65.223.216.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Nov 2006 12:17:24 -0800 Received: from amer-ems1.IONAGLOBAL.COM ([10.65.6.25]) by amereast-smg1.iona.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id kAKKG5ZS006271 for ; Mon, 20 Nov 2006 15:16:06 -0500 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Deploying multiple endpoints/ports for a service Date: Mon, 20 Nov 2006 15:17:02 -0500 Message-ID: <05F5FDC16A447442B12B21A432878AC505176C@amer-ems1.IONAGLOBAL.COM> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Deploying multiple endpoints/ports for a service Thread-Index: AccM4KgCXJK09jE9T3OrxQUEd2MIVgAAFwDg From: "Soltysik, Seumas" To: X-Virus-Checked: Checked by ClamAV on apache.org Right. Thanks, I'll give this a try. -----Original Message----- From: Dan Diephouse [mailto:dan@envoisolutions.com] Sent: Monday, November 20, 2006 3:15 PM To: cxf-dev@incubator.apache.org Subject: Re: Deploying multiple endpoints/ports for a service Why would you have to change how you set the WSDL URL? Just do: serverFactory.getServiceFactory().setWsdlUrl(...); The ServiceFactory is accessible just like before. - Dan Soltysik, Seumas wrote: >So in essence because I am not bound to using using the EndpointImpl = class, I probably should use the JaxWsServiceFactory to setup my = endpoints/listeners, right? It looks like I am going to have to change = how I set the wsdl location. It looks like I am going to have to create = a WSDLDestinationFactory from my wsdl location and then inject it into = the ServerFactoryBean. > >-----Original Message----- >From: Dan Diephouse [mailto:dan@envoisolutions.com] >Sent: Monday, November 20, 2006 2:36 PM >To: cxf-dev@incubator.apache.org >Subject: Re: Deploying multiple endpoints/ports for a service > > >Good question. Quick summary: > >ServiceFactorys construct the Service >ServerFactorys construct the Server >EndpointImpl is there to implement the JAX-WS SPI and pretty much=20 >delegates to the JaxWsServerFactory right now. With one caveat, it has=20 >logic to recognize WebServiceProviders, where as JaxWsServiceFactory = can=20 >only handle the normal JAX-WS @WebService style classes. In the=20 >WebServiceProvider case it has the ServerFactory use the=20 >ProviderServiceFactory. Otherwise the normal JaxWsServiceFactory is = used. > >I'd like to unify JaxWsServiceFactory & ProviderServiceFactory at some=20 >point so EndpointImpl is purely a wrapper around it, just a bit short = on=20 >time at this point though. I will be doing more work to unify the=20 >dispatch/provider/web service cases as I clean up the databinding code=20 >in the near future. > >Does that help explain it? > >- Dan > >Soltysik, Seumas wrote: > > =20 > >>Hi Dan, >>I am a little confused between the use of JaxWsServerFactoryBean and = JaxWsSericeFactoryBean. Currently I am deploying an endpoint using this = code: >> >> >> JaxWsServiceFactoryBean serviceFactory =3D new = JaxWsServiceFactoryBean(); >> serviceFactory.setBus(bus); >> serviceFactory.setInvoker(new BeanInvoker(impl)); >> serviceFactory.setServiceClass(impl.getClass()); >> serviceFactory.setWsdlURL(wsdlLoc); >> =20 >> endpoint =3D new EndpointImpl(bus, impl, serviceFactory); >> endpoint.publish(address); >> >>The code you show demonstrates a different way of deploying an = Endpoint using JaxWsServerFactory. Is one way preferable to another? = What are the differences between the two? >> >>Thanks, >>Seumas >> >>-----Original Message----- >>From: Dan Diephouse [mailto:dan@envoisolutions.com] >>Sent: Monday, November 20, 2006 1:35 PM >>To: cxf-dev@incubator.apache.org >>Subject: Re: Deploying multiple endpoints/ports for a service >> >> >>I think you can do something like this: >> >>sf =3D new JaxWsServerFactoryBean(); >>sf.setEndpointName(new QName("myport"); >>sf.setServiceClass(MyServiceInterface.class); // could use impl here = too=20 >>I think >>sf.getServiceFactory().setInvoker(new = JAXWSMethodInvoker(myServiceImpl); >>Server server =3D sf.create(); >> >>rinse and repeat for all the endpoints you want. >> >>Normally what happens is the ServerFactoryBean gets the endpoint name=20 >>(we use wsdl 2 terminology here) from the ServiceFactory, which in = turn=20 >>reads the annotations. But setEndpointName() overrides this. >> >>- Dan >> >>Soltysik, Seumas wrote: >> >>=20 >> >> =20 >> >>>Hi, >>>Is it possible to deploy multiple endpoints using the same = implementation class? In other words if you have a service which defines = two ports, how would you activate/deploy both ports/endpoints using the = same generated Java impl. I don't see any test cases that test this = scenario. Furthermore it appears that the code relies upon the portname = being included as part of an annotation. If so, this means that a single = java impl probably could not be used for two separate endpoints. >>>Regards, >>>Seumas=20 >>> >>> >>> >>> =20 >>> >>> =20 >>> >>=20 >> >> =20 >> > > > =20 > --=20 Dan Diephouse (616) 971-2053 Envoi Solutions LLC http://netzooid.com