In this case you need to specify the two endpoint and publish them separately.

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.

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

Reply via email to