Hi,
I am using the ServiceMix-3.2.1 version, defined the cxf binding and
se components using the lightweight mode. as below in the
servicemix.xml.
I am using the Tomcat5.5 server. Servicemix-3.2.1 is deployed on tomcat
as a webapp.
<sm:activationSpec>
<sm:component>
<cxfbc:component>
<cxfbc:endpoints>
<cxfbc:consumer
wsdl="/WEB-INF/wsdl/AR_CR.wsdl"
service="AR:Search"
interfaceName="AR:SearchCR"
targetEndpoint="SearchCR"
targetService="AR:Search"
targetInterface="AR:SearchCR" />
</cxfbc:endpoints>
</cxfbc:component>
</sm:component>
</sm:activationSpec>
<sm:activationSpec>
<sm:component>
<cxfse:component>
<cxfse:endpoints>
<cxfse:endpoint>
<cxfse:pojo>
<bean
class="com.search.SearchCRImpl"/>
</cxfse:pojo>
</cxfse:endpoint>
</cxfse:endpoints>
</cxfse:component>
</sm:component>
</sm:activationSpec>
When I started the server I am getting the below exception. Tomcat is
running on 8020. It looks jetty is trying to use the same port. Because
in the WSDL , at the port definition, same port was specified.
INFO - ComponentMBeanImpl - Initializing component:
servicemix-cxf-bc
Aug 3, 2008 7:17:41 PM sun.reflect.NativeMethodAccessorImpl invoke0
INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via
org.mortbay.log.Slf4jLog
Aug 3, 2008 7:17:41 PM sun.reflect.NativeMethodAccessorImpl invoke0
INFO: jetty-6.1.5
Aug 3, 2008 7:17:41 PM sun.reflect.NativeMethodAccessorImpl invoke0
WARNING: failed [EMAIL PROTECTED]:8020
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119
)
at
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector
.java:211)
at
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnec
tor.java:309)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.Server.doStart(Server.java:228)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(Jet
tyHTTPServerEngine.java:244)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyH
TTPDestination.java:143)
at
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractO
bservable.java:47)
at
org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:119)
Note: But when I used the CXF2.1 framework without servicemix, I do not
have this problem. I got the following features from CXF2.1
1) CXF does not depend on the URL specified in the WSDL at port
element as Soap address.
Normally it is a dummy address
2) CXF runs the web service on the same port that tomcat is running
. I just need to specify jaxws:endpoint with address.
How do I acheive the above two in the lightweight mode in servicemix.
Any help in this issue is appreciated.
Thanks
MNBabu