<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calls to multiple web service provider fail in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/calls-to-multiple-web-service-provider-fail/m-p/96197#M66075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, it's totally true. I've run a couple of test in addition to isolate the problem, and it definitelly seems to come from JAXB context issues when CXF is consuming several services *sharing data types*.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've explained one part of the problem related to CXF in &lt;/SPAN&gt;&lt;A href="http://cxf.547215.n5.nabble.com/Calls-to-multiple-web-service-provider-within-Activiti-fail-with-a-Marshalling-Error-td5711059.html#a5711346" rel="nofollow noopener noreferrer"&gt;http://cxf.547215.n5.nabble.com/Calls-to-multiple-web-service-provider-within-Activiti-fail-with-a-Marshalling-Error-td5711059.html#a5711346&lt;/A&gt;&lt;SPAN&gt;, but I post here additional info on how I've resolved the problem within activiti, because even after having resolved the "package" conflict, activiti is still unable to call multiple services that share the same object definition (the data types, with same namespace, name, contract that are used in different services located in different administrative domains).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In such case, the problem comes from the WSDL definition generated by CXF. It puts the data type with the namespare relative to the service being consumed. It means that for a CounterService located in "org.nunix.webservice.counter" namespace (cf Picture attached), the data types described in the WSDL belongs to this namespace. But when consuming resources, the actual package of the data type objects is "org.nunix.webservice" (as it is shared by several services, i've put them a package upper). Therefore, activiti tries to retrieve classes like "org.nunix.webservice.counter.TripletObject" with no success, and miserably fails with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;juil. 20, 2012 10:51:39 AM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging&lt;BR /&gt;WARNING: Interceptor for {org.nunix.webservice.counter.CounterService}CounterService#{&lt;A href="http://counter.webservice.nunix.org/}inc" rel="nofollow noopener noreferrer"&gt;http://counter.webservice.nunix.org/}inc&lt;/A&gt; has thrown exception, unwinding now&lt;BR /&gt;org.apache.cxf.interceptor.Fault: org.nunix.webservice.TripletObject cannot be cast to org.nunix.webservice.counter.TripletObject&lt;BR /&gt; at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:121)&lt;BR /&gt; …..&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;I've tried several approaches with no success&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* modify the wsdl to have the data types with correct namespace, such as it resolves to "org.nunix.webservice"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* have data type objects in packages both counter and echo packages. But it also fail as, by generating classes, activiti was in front of several classes with the same jaxb name (one class in counter package, the other in echo package, but also the generated ones)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* probably other that I don't remember&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what I did, is follow instructions found in &lt;/SPAN&gt;&lt;A href="http://www.bpm-guide.de/2010/12/09/how-to-call-a-webservice-from-bpmn/" rel="nofollow noopener noreferrer"&gt;http://www.bpm-guide.de/2010/12/09/how-to-call-a-webservice-from-bpmn/&lt;/A&gt;&lt;SPAN&gt; where we prevent activiti to wrap itself the call to cxf, and perform our own web service invocation using a java service delegate. Within this delegate, I simply use the JAX-WS proxy client way to consume services, taking parameters from activiti variables, and exporting return values in other variables. It is not what I intended to do in the first place, as there is a additional overhead when creating new services, and I wanted to have everything described in the activiti bpmn, but it works so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As last word, let me know if it's possible to have an "elegant" option to consume services with my constraints within Activiti without relying on external service task delegate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jul 2012 09:19:46 GMT</pubDate>
    <dc:creator>eirmag</dc:creator>
    <dc:date>2012-07-20T09:19:46Z</dc:date>
    <item>
      <title>Calls to multiple web service provider fail</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/calls-to-multiple-web-service-provider-fail/m-p/96195#M66073</link>
      <description>Hi all,I would like to achieve a "simple" thing with activiti: call several service providers sequentially. But so far I'm unable to do so! I've created a testcase project to understand exactly what is wrong, with different tests. The test case creates two service provider, deployed in virtually dif</description>
      <pubDate>Fri, 13 Jul 2012 14:41:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/calls-to-multiple-web-service-provider-fail/m-p/96195#M66073</guid>
      <dc:creator>eirmag</dc:creator>
      <dc:date>2012-07-13T14:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calls to multiple web service provider fail</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/calls-to-multiple-web-service-provider-fail/m-p/96196#M66074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looks more like a CXF/JAXB-issue… My guess: When one web service is created, the JAXB-context is initialized&amp;nbsp; by cxf, only containing that service-objects mapping. When the second call is done, the existing JAXB-context is used, not containing the second service and it's referenced/used beans.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;org.apache.cxf.interceptor.Fault: Marshalling Error: org.activiti.engine.impl.webservice.Inc is not known to this context&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Double check you're configuring CXF correctly&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 07:04:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/calls-to-multiple-web-service-provider-fail/m-p/96196#M66074</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-16T07:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calls to multiple web service provider fail</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/calls-to-multiple-web-service-provider-fail/m-p/96197#M66075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, it's totally true. I've run a couple of test in addition to isolate the problem, and it definitelly seems to come from JAXB context issues when CXF is consuming several services *sharing data types*.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've explained one part of the problem related to CXF in &lt;/SPAN&gt;&lt;A href="http://cxf.547215.n5.nabble.com/Calls-to-multiple-web-service-provider-within-Activiti-fail-with-a-Marshalling-Error-td5711059.html#a5711346" rel="nofollow noopener noreferrer"&gt;http://cxf.547215.n5.nabble.com/Calls-to-multiple-web-service-provider-within-Activiti-fail-with-a-Marshalling-Error-td5711059.html#a5711346&lt;/A&gt;&lt;SPAN&gt;, but I post here additional info on how I've resolved the problem within activiti, because even after having resolved the "package" conflict, activiti is still unable to call multiple services that share the same object definition (the data types, with same namespace, name, contract that are used in different services located in different administrative domains).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In such case, the problem comes from the WSDL definition generated by CXF. It puts the data type with the namespare relative to the service being consumed. It means that for a CounterService located in "org.nunix.webservice.counter" namespace (cf Picture attached), the data types described in the WSDL belongs to this namespace. But when consuming resources, the actual package of the data type objects is "org.nunix.webservice" (as it is shared by several services, i've put them a package upper). Therefore, activiti tries to retrieve classes like "org.nunix.webservice.counter.TripletObject" with no success, and miserably fails with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;juil. 20, 2012 10:51:39 AM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging&lt;BR /&gt;WARNING: Interceptor for {org.nunix.webservice.counter.CounterService}CounterService#{&lt;A href="http://counter.webservice.nunix.org/}inc" rel="nofollow noopener noreferrer"&gt;http://counter.webservice.nunix.org/}inc&lt;/A&gt; has thrown exception, unwinding now&lt;BR /&gt;org.apache.cxf.interceptor.Fault: org.nunix.webservice.TripletObject cannot be cast to org.nunix.webservice.counter.TripletObject&lt;BR /&gt; at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:121)&lt;BR /&gt; …..&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;I've tried several approaches with no success&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* modify the wsdl to have the data types with correct namespace, such as it resolves to "org.nunix.webservice"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* have data type objects in packages both counter and echo packages. But it also fail as, by generating classes, activiti was in front of several classes with the same jaxb name (one class in counter package, the other in echo package, but also the generated ones)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* probably other that I don't remember&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what I did, is follow instructions found in &lt;/SPAN&gt;&lt;A href="http://www.bpm-guide.de/2010/12/09/how-to-call-a-webservice-from-bpmn/" rel="nofollow noopener noreferrer"&gt;http://www.bpm-guide.de/2010/12/09/how-to-call-a-webservice-from-bpmn/&lt;/A&gt;&lt;SPAN&gt; where we prevent activiti to wrap itself the call to cxf, and perform our own web service invocation using a java service delegate. Within this delegate, I simply use the JAX-WS proxy client way to consume services, taking parameters from activiti variables, and exporting return values in other variables. It is not what I intended to do in the first place, as there is a additional overhead when creating new services, and I wanted to have everything described in the activiti bpmn, but it works so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As last word, let me know if it's possible to have an "elegant" option to consume services with my constraints within Activiti without relying on external service task delegate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 09:19:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/calls-to-multiple-web-service-provider-fail/m-p/96197#M66075</guid>
      <dc:creator>eirmag</dc:creator>
      <dc:date>2012-07-20T09:19:46Z</dc:date>
    </item>
  </channel>
</rss>

