You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Lorenzo Bolzani <l....@gmail.com> on 2010/06/24 12:27:23 UTC

CxfBcConsumer fail for REPLACE_WITH_ACTUAL_URL from jaxws

Hi,
I'm generating a wsdl from a JAX-WS annotated java class.

The problem is that the generated WSDL contains this part

  <service name="LDocServiceService">
    <port name="LDocServicePort" binding="tns:LDocServicePortBinding">
      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
    </port>
  </service>


and the deploy fail with this error.

If I edit the WSDL by hand with some
http://localhost:8092/LDocService/everything works fine.

Checking some forums looks like REPLACE_WITH_ACTUAL_URL is a "magic word"
replaced at runtime by some servers. Is this working within servicemix?

Do you know if this address can be customized at the time of wdsl
generation?

Any other suggestion?


Thanks, bye

Lorenzo


ERROR - AutoDeploymentService          - Failed to update Service Assembly:
kdv-ldoc-sa
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>deploy</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-cxf-se</component-name>
    <component-task-result-details>
        <task-result-details>
            <task-id>deploy</task-id>
            <task-result>SUCCESS</task-result>
        </task-result-details>
    </component-task-result-details>
</component-task-result>
<component-task-result>
<component-name>servicemix-cxf-bc</component-name>
<component-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to parse result string</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<loc-token/>
<loc-message>java.net.MalformedURLException: no protocol:
REPLACE_WITH_ACTUAL_URL</loc-message>
<stack-trace><![CDATA[javax.jbi.management.DeploymentException:
java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL
    at
org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:421)
    at
org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeployer.java:58)
    at
org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55)
    at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:96)
    at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
    at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
    at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
    at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
    at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
    at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExternalArchive(AutoDeploymentService.java:204)
    at
org.apache.servicemix.jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java:480)
    at
org.apache.servicemix.jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java:490)
    at
org.apache.servicemix.jbi.framework.AdminCommandsService.deployServiceAssembly(AdminCommandsService.java:209)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
    at
org.apache.servicemix.jbi.management.BaseStandardMBean.invoke(BaseStandardMBean.java:323)
    at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
    at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
    at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
    at java.security.AccessController.doPrivileged(Native Method)
    at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
    at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.MalformedURLException: no protocol:
REPLACE_WITH_ACTUAL_URL
    at java.net.URL.<init>(URL.java:567)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyHTTPDestination.java:85)
    at
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDestination(JettyHTTPTransportFactory.java:116)
    at
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestination(JettyHTTPTransportFactory.java:103)
    at
org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
    at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:58)
    at
org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:416)
    ... 40 more
]]></stack-trace>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>

Re: CxfBcConsumer fail for REPLACE_WITH_ACTUAL_URL from jaxws

Posted by Lorenzo Bolzani <l....@gmail.com>.
2010/6/24 Freeman Fang <fr...@gmail.com>

> Hi,
>
> If I edit the WSDL by hand with some
>> http://localhost:8092/LDocService/everything works fine.
>>
>> Checking some forums looks like REPLACE_WITH_ACTUAL_URL is a "magic word"
>> replaced at runtime by some servers. Is this working within servicemix?
>>
>
> No, as servicemix doesn't have any default http address to handle http
> request, in any case you yourself need specfiy a http address for cxf bc
> consumer.
>
> If you want to specify address at runtime, you can specify
> locationURI="${any_address_you_want}" for cxf bc consumer endpoint, this
> will override the one in the wsdl, and use this spring bean property
> placeholder to change the address at runtime.
>
>
>
Hi, sorry for the long delay, I was able to try it only today.

The quoted option solved my problem


Thanks, bye


Lorenzo

Re: CxfBcConsumer fail for REPLACE_WITH_ACTUAL_URL from jaxws

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

My comment inline
On 2010-6-24, at 下午6:27, Lorenzo Bolzani wrote:

> Hi,
> I'm generating a wsdl from a JAX-WS annotated java class.
>
> The problem is that the generated WSDL contains this part
>
>  <service name="LDocServiceService">
>    <port name="LDocServicePort" binding="tns:LDocServicePortBinding">
>      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
>    </port>
>  </service>
>
>
> and the deploy fail with this error.
>
> If I edit the WSDL by hand with some
> http://localhost:8092/LDocService/everything works fine.
>
> Checking some forums looks like REPLACE_WITH_ACTUAL_URL is a "magic  
> word"
> replaced at runtime by some servers. Is this working within  
> servicemix?

No, as servicemix doesn't have any default http address to handle http  
request, in any case you yourself need specfiy a http address for cxf  
bc consumer.

If you want to specify address at runtime, you can specify  
locationURI="${any_address_you_want}" for cxf bc consumer endpoint,  
this will override the one in the wsdl, and use this spring bean  
property placeholder to change the address at runtime.
>
> Do you know if this address can be customized at the time of wdsl
> generation?

I assume you are using cxf java2ws tool to generate wsdl from java  
code, so use -address flag to specify the address used in  
soap:address, you can use ./java2ws -h to get more details about your  
options.

Freeman
>
> Any other suggestion?
>
>
> Thanks, bye
>
> Lorenzo
>
>
> ERROR - AutoDeploymentService          - Failed to update Service  
> Assembly:
> kdv-ldoc-sa
> 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>deploy</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-cxf-se</component-name>
>    <component-task-result-details>
>        <task-result-details>
>            <task-id>deploy</task-id>
>            <task-result>SUCCESS</task-result>
>        </task-result-details>
>    </component-task-result-details>
> </component-task-result>
> <component-task-result>
> <component-name>servicemix-cxf-bc</component-name>
> <component-task-result-details>
> <task-result-details>
> <task-id>deploy</task-id>
> <task-result>FAILED</task-result>
> <message-type>ERROR</message-type>
> <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Unable to parse result string</loc-message>
> </msg-loc-info>
> </task-status-msg>
> <exception-info>
> <nesting-level>1</nesting-level>
> <loc-token/>
> <loc-message>java.net.MalformedURLException: no protocol:
> REPLACE_WITH_ACTUAL_URL</loc-message>
> <stack-trace><![CDATA[javax.jbi.management.DeploymentException:
> java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL
>    at
> org 
> .apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java: 
> 421)
>    at
> org 
> .apache 
> .servicemix.common.AbstractDeployer.validate(AbstractDeployer.java:58)
>    at
> org 
> .apache 
> .servicemix 
> .common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55)
>    at
> org 
> .apache 
> .servicemix 
> .common 
> .xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:96)
>    at
> org 
> .apache 
> .servicemix 
> .common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java: 
> 88)
>    at
> org 
> .apache 
> .servicemix 
> .common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>    at
> org 
> .apache 
> .servicemix 
> .jbi 
> .framework 
> .DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>    at
> org 
> .apache 
> .servicemix 
> .jbi 
> .framework 
> .AutoDeploymentService 
> .updateServiceAssembly(AutoDeploymentService.java:353)
>    at
> org 
> .apache 
> .servicemix 
> .jbi 
> .framework 
> .AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>    at
> org 
> .apache 
> .servicemix 
> .jbi 
> .framework 
> .AutoDeploymentService 
> .updateExternalArchive(AutoDeploymentService.java:204)
>    at
> org 
> .apache 
> .servicemix 
> .jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java: 
> 480)
>    at
> org 
> .apache 
> .servicemix 
> .jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java: 
> 490)
>    at
> org 
> .apache 
> .servicemix 
> .jbi 
> .framework 
> .AdminCommandsService 
> .deployServiceAssembly(AdminCommandsService.java:209)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at
> org 
> .apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java: 
> 216)
>    at
> org 
> .apache 
> .servicemix 
> .jbi.management.BaseStandardMBean.invoke(BaseStandardMBean.java:323)
>    at
> com 
> .sun 
> .jmx 
> .interceptor 
> .DefaultMBeanServerInterceptor 
> .invoke(DefaultMBeanServerInterceptor.java:836)
>    at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>    at
> javax 
> .management 
> .remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
>    at
> javax.management.remote.rmi.RMIConnectionImpl.access 
> $200(RMIConnectionImpl.java:72)
>    at
> javax.management.remote.rmi.RMIConnectionImpl 
> $PrivilegedOperation.run(RMIConnectionImpl.java:1265)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at
> javax 
> .management 
> .remote 
> .rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java: 
> 1367)
>    at
> javax 
> .management 
> .remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java: 
> 305)
>    at sun.rmi.transport.Transport$1.run(Transport.java:159)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>    at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java: 
> 535)
>    at
> sun.rmi.transport.tcp.TCPTransport 
> $ConnectionHandler.run0(TCPTransport.java:790)
>    at
> sun.rmi.transport.tcp.TCPTransport 
> $ConnectionHandler.run(TCPTransport.java:649)
>    at
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:886)
>    at
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:908)
>    at java.lang.Thread.run(Thread.java:619)
> Caused by: java.net.MalformedURLException: no protocol:
> REPLACE_WITH_ACTUAL_URL
>    at java.net.URL.<init>(URL.java:567)
>    at java.net.URL.<init>(URL.java:464)
>    at java.net.URL.<init>(URL.java:413)
>    at
> org 
> .apache 
> .cxf 
> .transport 
> .http_jetty.JettyHTTPDestination.<init>(JettyHTTPDestination.java:85)
>    at
> org 
> .apache 
> .cxf 
> .transport 
> .http_jetty 
> .JettyHTTPTransportFactory 
> .createDestination(JettyHTTPTransportFactory.java:116)
>    at
> org 
> .apache 
> .cxf 
> .transport 
> .http_jetty 
> .JettyHTTPTransportFactory 
> .getDestination(JettyHTTPTransportFactory.java:103)
>    at
> org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
>    at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:58)
>    at
> org 
> .apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java: 
> 416)
>    ... 40 more
> ]]></stack-trace>
> </exception-info>
> </task-result-details>
> </component-task-result-details>
> </component-task-result>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com