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".

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

Reply via email to