CommonTransformations in Sonic

Posted by sedge on 23-Dec-2010 21:04

Hi

I have a common Transformation (XSLT) that has two parameters and is used in many places in our Sonic implementation. Entering the parameter values into the standard standard Sonic XML Transformation service is tedious and error prone. Is there a way to "wrap" the XML Transformation Service to enable easier formatting of the input parameters.  

If the only way is to write a new Service Type to implement an XML Transform I'd be very happy to get some sample code because we are not only beginners with Sonic but with Java as well.

Thanks

Steve

All Replies

Posted by sk185050 on 24-Dec-2010 01:47

Sonic ESB already have inbuilt transformation service where in you can provide dynamic parameter which is a XSL.

Are you looking custom code that will transform the message (XML) that you are receiving on the Topic/queue? (Sonic MQ)

Posted by sedge on 03-Jan-2011 18:12

I am already using the inbuilt transformation service to do the job. The transform has two input parameters that are set at design time so, technically, there is no problem. My concerns are that:

- This transform will be used in a lot of places in the application

- The standard transform service is VERY unforgiving with the way parameters are entered. For example, if there is a space between the comma and the start of the second parameter name, the second paramter is ignored.

- The risk misspelling parameter names is high.

Although these things can be mitigated by good test plans the time taken to troubeshoot simple errors like this can be significant. I'm looking for a good way to reduce the risk of error.

I had hoped that I would be able to create a Java Service Type that had fixed run-time parameters and could call the standard transformatin service but I see from the recommendations that a Service should only be invoked from a ESB Process, and not from another Service.

The alternative that I see is to create a Java Service Type that accepts the parameters and does the transform. Since we're not yet fluent in either Sonic or Java I was hoping that someone might give me a head start on how to do it. If there is another approach I'd be pleased to hear about that too.

Thanks

Steve

Posted by sk185050 on 04-Jan-2011 01:32

I think you can have java service type is an option. We are using the inbuilt transformation at many places and it works fine for us. The problems you mentioned you can mitigate with the test cases, or unit test cases if there are like you said.

Using the java service type, it also need to sure how much complex is your custom code, as I think that would also going to effect as well, I think there is best practice/recommendation document from sonic is available that you can look for.

This thread is closed