« Return to Thread: [mule 2.X] CXF Transformers does not take affect

Re: CXF Transformers does not take affect

by Daniel Feist :: Rate this Message:

Reply to Author | View in Thread

Sorry missing a 9..

issue is http://mule.mulesource.org/jira/browse/MULE-2969\

Dan

On 9 Apr 2008, at 21:28, Daniel Feist wrote:

> Hi Mike/Dan,
>
> I came across this issue a while back when implementing/updating  
> transformer test cases.
>
> The response transformers attribute you are using is used and the  
> response transformer configured is applied in (nearly) all  
> scenarios.  This response transformer is not applied for web service  
> transports for some reason, it seems to be because of the way in  
> which response are returns with web services vs. other transports.
>
> I came across this issue in 2.0 RC version with xfire, but from what  
> i remember it was general web-service transport issue and not  
> anything xfire specific.  I did not test with 1.4, but presumed that  
> it was likely that the same problem occurs there also.
>
> There was a test case which was failing in the xfire transport, but  
> I guess thats no longer in the main codebase..
>
> The JIRA issue is  http://mule.mulesource.org/jira/browse/MULE-296
>
> Dan
>
> On 9 Apr 2008, at 20:31, MikeJC wrote:
>
>>
>> No problem. Digging into the code I see that the transformers never  
>> seem to
>> get set, I am wondering if they should be set in the
>> setPropertiesFromProperties? I see the transfomer property is  
>> contained
>> within the list.
>>
>> A few lines later the code calls:
>> List transformers = getOutboundTransformers(connector, endpointURI);
>>
>> but the transformers variable is never set and the default outbound
>> transformer would always be returned.
>>
>> package org.mule.endpoint.AbstractEndpointBuilder
>>
>> protected void setPropertiesFromProperties(Map properties)
>>   {
>>       synchronous = getBooleanProperty(properties,
>> MuleProperties.SYNCHRONOUS_PROPERTY, synchronous);
>>       remoteSync = getBooleanProperty(properties,  
>> PROPERTY_REMOTE_SYNC,
>> remoteSync);
>>       remoteSyncTimeout = getIntegerProperty(properties,
>> PROPERTY_REMOTE_SYNC_TIMEOUT, remoteSyncTimeout);
>>   }
>>
>> In the 1.4.X code line I see the following code in the
>> AbstractEndpointBuilder
>>       transformers = (String)
>> properties.get(UMOEndpointURI.PROPERTY_TRANSFORMERS);
>>       if (transformers != null)
>>       {
>>           transformers = transformers.replaceAll(" ", ",");
>>       }
>>       responseTransformers = (String)
>> properties.get(UMOEndpointURI.PROPERTY_RESPONSE_TRANSFORMERS);
>>       if (responseTransformers != null)
>>       {
>>           responseTransformers = responseTransformers.replaceAll(" ",
>> ",");
>>       }
>>
>>
>> Dan Diephouse-2 wrote:
>>>
>>> Thanks Mike, I'm a bit short on time today, but I'll take a look  
>>> either
>>> later today and tomorrow and get back to you.
>>> Cheers,
>>> Dan
>>>
>>> MikeJC wrote:
>>>> I was able to get a test case that shows the same issue. Run  
>>>> AppTest, I
>>>> hacked your BookStore example. As you will see it tries to send a  
>>>> string
>>>> to
>>>> the CXF service as apposed to going through the transformer setup  
>>>> at the
>>>> endpoint.
>>>> http://www.nabble.com/file/p16576998/service-consumer-bcs-gateway.tar.gz
>>>> service-consumer-bcs-gateway.tar.gz
>>>>
>>>>
>>>>
>>>> MikeJC wrote:
>>>>
>>>>>> Just to be clear - in the example you gave, you're saying the
>>>>>> AccountInfoResponseToMdx transformer is not being run?
>>>>>>
>>>>> Yes
>>>>>
>>>>>
>>>>>> Looking at the code, I'm not sure why this is happening. We *are*
>>>>>> grabbing the transformed message, so I don't see why the  
>>>>>> transformers
>>>>>> wouldn't be run.
>>>>>>
>>>>>> Any chance you can submit a small test case?
>>>>>>
>>>>> I am working on something
>>>>>
>>>>>
>>>>> Dan Diephouse-2 wrote:
>>>>>
>>>>>> MikeJC wrote:
>>>>>>
>>>>>>> String -> JAXB Object -> CXF Web Service Request   (request)
>>>>>>> CXF Web Service Response -> JAXB Object -> String
>>>>>>>
>>>>>>> I am working with the following scenario, a string gets placed  
>>>>>>> in a
>>>>>>> file
>>>>>>> or
>>>>>>> jms queue, mule will pick it up and marshall it to a JAXB  
>>>>>>> Object, from
>>>>>>> this
>>>>>>> we will create the CXF Web Request and send it to the Web  
>>>>>>> Service.
>>>>>>>
>>>>>>> From the response, the original JAXB Object will be filled in  
>>>>>>> with
>>>>>>> values
>>>>>>> from this response from the CXF Web Request and sent off to the
>>>>>>> originating
>>>>>>> system.
>>>>>>> http://www.nabble.com/file/p16541302/mule-config.xml mule-
>>>>>>> config.xml
>>>>>>> I want to be able to manipulate this at the component level  
>>>>>>> so, the
>>>>>>> inbound
>>>>>>> endpoint has a StringToCustomObject transformer on it. I tried  
>>>>>>> to put
>>>>>>> a
>>>>>>> transformer on the cxf outbound endpoint but it is not picking  
>>>>>>> it up.
>>>>>>> Any
>>>>>>> advice?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Just to be clear - in the example you gave, you're saying the
>>>>>> AccountInfoResponseToMdx transformer is not being run?
>>>>>>
>>>>>> Looking at the code, I'm not sure why this is happening. We *are*
>>>>>> grabbing the transformed message, so I don't see why the  
>>>>>> transformers
>>>>>> wouldn't be run.
>>>>>>
>>>>>> Any chance you can submit a small test case?
>>>>>>
>>>>>> Dan
>>>>>>
>>>>>> --
>>>>>> Dan Diephouse
>>>>>> MuleSource
>>>>>> http://mulesource.com | http://netzooid.com
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe from this list, please visit:
>>>>>>
>>>>>>   http://xircles.codehaus.org/manage_email
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Dan Diephouse
>>> MuleSource
>>> http://mulesource.com | http://netzooid.com
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/-mule-2.X--CXF-Transformers-does-not-take-affect-tp16541302p16598984.html
>> Sent from the Mule - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: [mule 2.X] CXF Transformers does not take affect