You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Manuel EVENO (JIRA)" <ji...@apache.org> on 2008/07/16 17:32:00 UTC

[jira] Commented: (SM-1465) Can't create a pass-through web service mediation in ServiceMix

    [ https://issues.apache.org/activemq/browse/SM-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44335#action_44335 ] 

Manuel EVENO commented on SM-1465:
----------------------------------

The only solution I found is to create a fake endpoint for the consumer service (the one who exposes the service ...

<cxfbc:consumer wsdl="classpath:HelloService.wsdl"
        service="hello:HelloService"
        endpoint="exposedHelloService" // Here is the fake endpoint
        targetUri="${esb.client.services.rootUrl}/helloService"
        targetService="hello:HelloService"
        targetEndpoint="HelloService"
        />


> Can't create a pass-through web service mediation in ServiceMix
> ---------------------------------------------------------------
>
>                 Key: SM-1465
>                 URL: https://issues.apache.org/activemq/browse/SM-1465
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-common
>    Affects Versions: 3.2.1
>            Reporter: Manuel EVENO
>
> We can't create a pass-through mediation for a web service.
> We can't configure cxf-bc:provider and cxf-bc:consumer to expose and consume the same WSDL.
> The point here is that the service and the endpoint name are the same so ServiceMix doesn't accept to deploy both the consumer and the provider.
> ServiceMix does not make a difference between the consumer role and the provider role for a service.
> We want to do that to be able to add audit and security steps in the esb.
> here is the services configuration :
>     <context:property-placeholder location="classpath:esb-client-services.properties"/>
>     <cxfbc:consumer wsdl="classpath:HelloService.wsdl"
>         service="hello:HelloService"
>         endpoint="HelloService"
>         targetUri="${esb.client.services.rootUrl}/helloService"
>         targetService="hello:HelloService"
>         targetEndpoint="HelloService"
>         />
>     <cxfbc:provider
>         wsdl="classpath:HelloService.wsdl"
>         service="hello:HelloService"
>         endpoint="HelloService"
>         locationURI="${ekip.client.services.rootUrl}/HelloService"
>         />
> Here is the full exception
> <component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>     <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 deploy service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>             <exception-info>
>                 <nesting-level>1</nesting-level>
>                 <msg-loc-info>
>                     <loc-token/>
>                     <loc-message>An endpoint is already registered for key: {http://hello.samples.sofinco.com}HelloService:HelloService</loc-message>
>                     <stack-trace><![CDATA[java.lang.IllegalStateException: An endpoint is already registered for key: {http://hello.samples.sofinco.com}HelloService:HelloService
>     at org.apache.servicemix.common.Registry.registerEndpoint(Registry.java:55)
>     at org.apache.servicemix.common.Registry.registerServiceUnit(Registry.java:68)
>     at org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:73)
>     at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>     at org.apache.servicemix.jbi.framework.DeploymentService.deploy(DeploymentService.java:206)
>     at org.apache.servicemix.jbi.framework.AdminCommandsService.deployServiceAssembly(AdminCommandsService.java:212)
>     at org.apache.servicemix.jbi.container.DeployServiceAssembly.doDeploy(DeployServiceAssembly.java:57)
>     at org.apache.servicemix.jbi.container.DeploySupport.deploy(DeploySupport.java:58)
>     at org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(SpringJBIContainer.java:111)
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
>     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
>     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
>     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
>     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76)
>     at com.sofinco.capi.esb.test.ServiceMixConfigurationTest.setUp(ServiceMixConfigurationTest.java:43)
>     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:585)
>     at org.junit.internal.runners.MethodRoadie.runBefores(MethodRoadie.java:122)
>     at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:86)
>     at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>     at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>     at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
>     at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>     at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
>     at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>     at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>     at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
>     at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> ]]></stack-trace>
>                 </msg-loc-info>
>             </exception-info>
>         </task-result-details>
>     </component-task-result-details>
> </component-task-result>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.