I known, thanks a lot; If I really need one service with multiply port enabled, I think I could wrote a custom proxy service which just manipulate the WSDL and mapping the ports's address to different endpoint published by CXF;
Thanks a lot; ----- Original Message ----- From: "Glen Mazza" <gma...@talend.com> To: <users@cxf.apache.org> Sent: Wednesday, December 28, 2011 10:43 PM Subject: Re: Does CXF support multiple endpoint for single wsdl now? > Yes, Endpoint.publish() takes only one port's endpoint, and so if you > want to have multiple endpoints running simultaneously, you need to have > multiple Endpoint.publish() commands. Alternatively, for Tomcat or > similar deployment, you would declare multiple <jaxws:endpoint> > elements[1]. As Endpoint.publish() is part of the JAX-WS > specification[2], GlassFish Metro, CXF's main competitor, presumably > does the same thing. > > As each port can specify its own transport method (JMS or HTTP), SOAP > message format, additional SOAP header elements, and security policy, it > could become a major source of bugs were CXF to allow multiple ports to > be active for a single Endpoint.publish() (assuming we could do so and > still be JAX-WS compliant.) Be careful what you wish for. :) > > Glen > > [1] http://www.jroller.com/gmazza/entry/web_service_tutorial#WFstep6 > [2] http://docs.oracle.com/javase/6/docs/api/javax/xml/ws/Endpoint.html > > On 12/28/2011 09:03 AM, xuhb wrote: >> ----- Original Message ----- >> From: "Glen Mazza"<gma...@talend.com> >> To:<users@cxf.apache.org> >> Sent: Wednesday, December 28, 2011 9:25 PM >> Subject: Re: Does CXF support multiple endpoint for single wsdl now? >> >> >>> Within the same configuration file, can't you specify two separate >>> services, one with each port you wish to activate? That may be CXF's >>> way of supporting "multiport at runtime". >> I want to got a wsdl which contains a service with two active port >> simultaneously. >> But it seems cannot,I have tried the CXF's system test >> "org/apache/cxf/systest/ws/security/server.xml " which configure two >> seperate services. But the cxf actually do is just publish two service, and >> each service only activate one port; I cannot got a wsdl which activate >> two port simultaneously? >> >>> Glen >>> >>> On 12/28/2011 04:07 AM, xuhb wrote: >>>> ----- Original Message ----- >>>> From: "Willem Jiang"<willem.ji...@gmail.com> >>>> To:<users@cxf.apache.org> >>>> Sent: Wednesday, December 28, 2011 4:29 PM >>>> Subject: Re: Does CXF support multiple endpoint for single wsdl now? >>>> >>>> >>>>> In this case you need to specify the two endpoint and publish them >>>>> separately. >>>>> >>>> Yes, this is the only way I can do; and this is why I say the old version >>>> CXF doesn't support multi-port at runtime; >>>> >>>>> The port of the wsdl is band to the CXF endpoint, you may need to do >>>>> some addition work to check the WSDL if you want to publish the service >>>>> from the WSDL automatically. >>>>> >>>> I still have no idea about how to do; >>>> >>>> After hacking some code of CXF 2.3.3(not the latest version), I found it's >>>> very hard to support the feature I want, for example: the >>>> org.apache.cxf.service.invoke.Invoker is binding to >>>> org.apache.cxf.service.Service; so I am very hard to extending CXF to >>>> enable service to support mult-port, because if so, the invoker may not >>>> binding to service, it should be binding to port or endpoint; >>>> >>>>> On 12/28/11 3:53 PM, xuhb wrote: >>>>>> Thanks willem and Glen: >>>>>> >>>>>> I have tried, it seems I can only make CXF to publish a service with >>>>>> single port , I still cannot make CXF to publish a service with >>>>>> multi-port taking effect at same time; >>>>>> >>>>>> Also I have tried the example of CXF systest which support >>>>>> multiport(systests\ws-security\src\test\java\org\apache\cxf\systest\ws\security\Server.java) >>>>>> >>>>>> Following is the CXF systest 's wsdl, which contains 2 port. But the >>>>>> published service only has single port take effect; >>>>>> <wsdl:service name="GreeterService"> >>>>>> <wsdl:port >>>>>> name="TimestampSignEncryptPort" >>>>>> binding="tns:Greeter_SOAPBinding"> >>>>>> <soap:address >>>>>> >>>>>> location="http://localhost:9000/GreeterService/TimestampSignEncryptPort" >>>>>> /> >>>>>> </wsdl:port> >>>>>> <wsdl:port >>>>>> name="UsernameTokenPort" >>>>>> binding="tns:Greeter_SOAPBinding"> >>>>>> <soap:address >>>>>> >>>>>> location="http://localhost:9000/GreeterService/UsernameTokenPort" >>>>>> /> >>>>>> </wsdl:port> >>>>>> </wsdl:service> >>>>>> >>>>>> When I run the example, I found when I trying to retrieve wsdl from >>>>>> http://mycomputername:9000/GreeterService/TimestampSignEncryptPort?wsdl >>>>>> only the TimestampSignEncryptPort will take effect (the address will be >>>>>> replaced as a correct url by cxf), >>>>>> and also retrieve wsdl from >>>>>> http://mycomptername:9000/GreeterService/UsernameTokenPort?wsdl , only >>>>>> the UsernameTokenPort will take effect; >>>>>> >>>>>> >>>>>> It seems the CXF doesn't publish a service for 2 port at same time, but >>>>>> just published two different service, and each service make one port >>>>>> taking effect and leave another aside >>>>>> >>>>> -- >>>>> Willem >>>>> ---------------------------------- >>>>> FuseSource >>>>> Web: http://www.fusesource.com >>>>> Blog: http://willemjiang.blogspot.com (English) >>>>> http://jnn.javaeye.com (Chinese) >>>>> Twitter: willemjiang >>>>> Weibo: willemjiang >>>>> >>>>> >>> >>> -- >>> Glen Mazza >>> Talend Community Coders >>> http://coders.talend.com >>> blog: http://www.jroller.com/gmazza >>> >> > > > > -- > Glen Mazza > Talend Community Coders > http://coders.talend.com > blog: http://www.jroller.com/gmazza > >