Hi,
The locationURI for your http consumer endpoint should be your local
machine address, shouldn't be http://ws.cdyne.com:80/ip2geo/ip2geo.asmx.
Freeman
kknb1043 wrote:
I am running Servicemix 3.11 and trying to use http binding to proxy an
external webservice (http://ws.cdyne.com/ip2geo/ip2geo.asmx?WSDL). But it
keep giving me a "Cannot assign requested address: bind" error.
I am using the following code in my xbean.xml:
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:ns1="http://ws.cdyne.com/IP2Geo">
<classpath>
<location>.</location>
</classpath>
<http:endpoint service="ns1:IP2Geo"
endpoint="IP2GeoSoap"
role="provider"
locationURI="http://ws.cdyne.com:80/ip2geo/ip2geo.asmx"
soap="true"
soapAction=""
wsdlResource="http://ws.cdyne.com:80/ip2geo/ip2geo.asmx?wsdl" />
<http:endpoint service="ns1:AnotherCumsumerService"
endpoint="IP2GeoSoap"
role="consumer"
targetService="ns1:IP2Geo"
locationURI="http://ws.cdyne.com:80/ip2geo/ip2geo.asmx"
wsdlResource="http://ws.cdyne.com:80/ip2geo/ip2geo.asmx?wsdl"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
</beans>
Here's the error servicemix produce:
java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message">
<component-name>servicemix-http</component-name>
<component-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to start service unit</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token/>
<loc-message>Cannot assign requested address:
bind</loc-message>
<stack-trace><![CDATA[java.net.BindException: Cannot assign requested
address: bind
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:152)
at
org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:313)
at
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:124)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38)
at org.mortbay.jetty.Server.doStart(Server.java:217)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38)
at
org.apache.servicemix.http.jetty.JettyContextManager.createServer(JettyContextManager.java:342)
at
org.apache.servicemix.http.jetty.JettyContextManager.createContext(JettyContextManager.java:143)
at
org.apache.servicemix.http.processors.ConsumerProcessor.start(ConsumerProcessor.java:111)
at
org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:348)
at org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:55)
at
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)
at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:130)
at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:337)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:646)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(AutoDeploymentService.java:62)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:609)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
]]></stack-trace>
</msg-loc-info>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>
at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:121)
at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:107)
at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:144)
at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:337)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:646)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(AutoDeploymentService.java:62)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:609)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
ERROR - AutoDeploymentService - Failed to update Service Assembly:
HttpBindAssembly
java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message">
<component-name>servicemix-http</component-name>
<component-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to start service unit</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token/>
<loc-message>Cannot assign requested address:
bind</loc-message>
<stack-trace><![CDATA[java.net.BindException: Cannot assign requested
address: bind
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:152)
at
org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:313)
at
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:124)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38)
at org.mortbay.jetty.Server.doStart(Server.java:217)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38)
at
org.apache.servicemix.http.jetty.JettyContextManager.createServer(JettyContextManager.java:342)
at
org.apache.servicemix.http.jetty.JettyContextManager.createContext(JettyContextManager.java:143)
at
org.apache.servicemix.http.processors.ConsumerProcessor.start(ConsumerProcessor.java:111)
at
org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:348)
at org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:55)
at
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)
at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:130)
at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:337)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:646)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(AutoDeploymentService.java:62)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:609)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
]]></stack-trace>
</msg-loc-info>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>
at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:121)
at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:107)
at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:144)
at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:337)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:646)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(AutoDeploymentService.java:62)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:609)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
WARN - AutoDeploymentService - Directory: deploy: Automatic
install of C:\Documents and
Settings\ochan\Desktop\4404_code\Chapter_10\ch10\ServiceMixHttpBinding\deploy\httpbind-sa.zip
failed
javax.jbi.management.DeploymentException: Failed to update Service Assembly:
HttpBindAssembly
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:349)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:646)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(AutoDeploymentService.java:62)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:609)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message">
<component-name>servicemix-http</component-name>
<component-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to start service unit</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token/>
<loc-message>Cannot assign requested address:
bind</loc-message>
<stack-trace><![CDATA[java.net.BindException: Cannot assign requested
address: bind
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:152)
at
org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:313)
at
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:124)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38)
at org.mortbay.jetty.Server.doStart(Server.java:217)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38)
at
org.apache.servicemix.http.jetty.JettyContextManager.createServer(JettyContextManager.java:342)
at
org.apache.servicemix.http.jetty.JettyContextManager.createContext(JettyContextManager.java:143)
at
org.apache.servicemix.http.processors.ConsumerProcessor.start(ConsumerProcessor.java:111)
at
org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:348)
at org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:55)
at
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)
at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:130)
at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:337)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:646)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(AutoDeploymentService.java:62)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:609)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
]]></stack-trace>
</msg-loc-info>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>
at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:121)
at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:107)
at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:144)
at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:337)
... 5 more