-
1. Re: Smooks to transform incoming SOAP msg
bhargasr Mar 25, 2009 10:44 AM (in response to bhargasr)Trying to use SmooksAction with a smooks-resource file having the transformation logic.
Getting the following exception while building the project:
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.getActi
onClassInstance(ActionProcessorMethodInfo.java:355)
... 52 more
Caused by: org.jboss.soa.esb.ConfigurationException: Failed to create Smooks ins
tance for config '/smooks-res.xml'.
at org.jboss.soa.esb.smooks.SmooksAction.(SmooksAction.java:145)
... 57 more
Caused by: java.io.IOException: Failed to access data stream for resource [/smoo
ks-res.xml]. Tried filesystem, classpath and URL.
What cud be wrong? The file is present in the same folder as the jboss-esb.xml -
2. Re: Smooks to transform incoming SOAP msg
beve Mar 25, 2009 11:54 AM (in response to bhargasr)Try puttting it in the root of the .esb archive.
-
3. Re: Smooks to transform incoming SOAP msg
bhargasr Mar 25, 2009 12:06 PM (in response to bhargasr)Thanks a bunch. That resolved it.
A side question, how to validate an incoming soap message on the esb? -
4. Re: Smooks to transform incoming SOAP msg
beve Mar 25, 2009 12:20 PM (in response to bhargasr)You can specify a schema for request, response and faults like this:
<actions inXsd="/request.xsd" outXsd="/response.xsd" faultXsd="/fault.xsd" validate="true"> <action name="action" class="org.jboss.soa.esb.samples.quickstart.publishAsWebservice.ESBWSListenerAction" process="displayMessage"/> </actions>
Settting validate to true will validate the data. The example above is from the publish_as_webservice quickstart. Take a look at it and see if this would work for you use case.
Regards,
/Daniel -
5. Re: Smooks to transform incoming SOAP msg
bhargasr Mar 25, 2009 12:30 PM (in response to bhargasr)Thanks, Daniel.
Will try that out.
Do MessageFilter or Drools offer any benefit for validations? -
6. Re: Smooks to transform incoming SOAP msg
clsimone Aug 29, 2011 3:47 PM (in response to bhargasr)Hello Casper,
I know the post is old... but could you please post an example on how to transform a SOAP message? Or do you know where I could find an example. I'm looking for solutions to transform namespaces, operation names and parameter values.
Thank you.
Laura
-
7. Re: Smooks to transform incoming SOAP msg
mannuyi Aug 30, 2011 11:02 AM (in response to clsimone)Please refer to jbossesb-4.10\samples\quickstarts\transform_XML2POJO