Hide Forgot
Description of problem: I need to have a bean to decode string value.Before decoding it needs to replace the apostrophie contents.The variable firstname is a string How to preform this action. <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:json="http://www.milyn.org/xsd/smooks/json-1.1.xsd" xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd" xmlns:g="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd"> <jb:bean beanId="insuredPersonName" class="com.cognizant.insurance.general.domain.party.partyname.PersonName" createOnElement="Insured BasicDetails"> <jb:value property="title" data="Insured BasicDetails salutation" /> <jb:value property="givenName" data="Insured BasicDetails firstName" decoder="String"> <jb:decodeParam name="valuePreprocess"> value=value.replace("'","'") </jb:decodeParam> </jb:value> <jb:value property="surname" data="Insured BasicDetails lastName" /> <jb:wiring property="transTrackingId" beanIdRef="transTrackingID" /> </jb:bean> </smooks-resource-list> The above Code Throws below error:- Caused by: org.milyn.SmooksException: Failed to filter source. at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:97) at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:64) at org.milyn.Smooks._filter(Smooks.java:526) at org.milyn.Smooks.filterSource(Smooks.java:482) at com.cognizant.insurance.general.core.smooks.LifeEngageSmooksHolder.parseJson(LifeEngageSmooksHolder.java:138) ... 91 more Caused by: org.milyn.SmooksException: Error in 'org.milyn.smooks.scripting.groovy.SmooksVisitor_27015246_7' while processing the visitAfter event. at org.milyn.delivery.sax.SAXHandler.processVisitorException(SAXHandler.java:573) at org.milyn.delivery.sax.SAXHandler.processVisitorException(SAXHandler.java:559) at org.milyn.delivery.sax.SAXHandler.visitAfter(SAXHandler.java:396) at org.milyn.delivery.sax.SAXHandler.endElement(SAXHandler.java:204) at org.milyn.delivery.SmooksContentHandler.endElement(SmooksContentHandler.java:96) at org.milyn.json.JSONReader.endElement(JSONReader.java:389) at org.milyn.json.JSONReader.endElement(JSONReader.java:385) at org.milyn.json.JSONReader.parse(JSONReader.java:299) at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:76) at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:86) ... 95 more Caused by: java.lang.IllegalArgumentException: null 'bean' arg in method call. at org.milyn.assertion.AssertArgument.isNotNull(AssertArgument.java:42)
Is there any update for this. I need your help in this (In reply to Muthu from comment #0) > Description of problem: > > I need to have a bean to decode string value.Before decoding it needs to > replace the apostrophie contents.The variable firstname is a string > > How to preform this action. > <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" > xmlns:json="http://www.milyn.org/xsd/smooks/json-1.1.xsd" > xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd" > xmlns:g="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd"> > > <jb:bean beanId="insuredPersonName" > > class="com.cognizant.insurance.general.domain.party.partyname.PersonName" > createOnElement="Insured BasicDetails"> > <jb:value property="title" data="Insured BasicDetails > salutation" /> > <jb:value property="givenName" data="Insured BasicDetails > firstName" decoder="String"> > <jb:decodeParam name="valuePreprocess"> > value=value.replace("'","'") > </jb:decodeParam> > </jb:value> > <jb:value property="surname" data="Insured BasicDetails > lastName" /> > <jb:wiring property="transTrackingId" > beanIdRef="transTrackingID" /> > </jb:bean> > </smooks-resource-list> > The above Code Throws below error:- > > Caused by: org.milyn.SmooksException: Failed to filter source. > at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:97) > at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:64) > at org.milyn.Smooks._filter(Smooks.java:526) > at org.milyn.Smooks.filterSource(Smooks.java:482) > at > com.cognizant.insurance.general.core.smooks.LifeEngageSmooksHolder. > parseJson(LifeEngageSmooksHolder.java:138) > ... 91 more > Caused by: org.milyn.SmooksException: Error in > 'org.milyn.smooks.scripting.groovy.SmooksVisitor_27015246_7' while > processing the visitAfter event. > at > org.milyn.delivery.sax.SAXHandler.processVisitorException(SAXHandler.java: > 573) > at > org.milyn.delivery.sax.SAXHandler.processVisitorException(SAXHandler.java: > 559) > at org.milyn.delivery.sax.SAXHandler.visitAfter(SAXHandler.java:396) > at org.milyn.delivery.sax.SAXHandler.endElement(SAXHandler.java:204) > at > org.milyn.delivery.SmooksContentHandler.endElement(SmooksContentHandler.java: > 96) > at org.milyn.json.JSONReader.endElement(JSONReader.java:389) > at org.milyn.json.JSONReader.endElement(JSONReader.java:385) > at org.milyn.json.JSONReader.parse(JSONReader.java:299) > at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:76) > at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:86) > ... 95 more > Caused by: java.lang.IllegalArgumentException: null 'bean' arg in method > call. > at org.milyn.assertion.AssertArgument.isNotNull(AssertArgument.java:42)
Hello, My name is Rick, I am a support engineer working with the Fuse family of products. I'll be happy to help with this. Red Hat supplies commercial support (with SLAs) for our products. If you are a holder of such an entitlement, you are welcome to open a support ticket at the Red Hat Customer portal. From there, your ticket will be picked up by a support engineer who will begin a dialogue to resolve the issue. If you do not have a support entitlement, the usual way to seek assistance is to ask on the open source community support forums. In this case, you might go to the Smooks community or perhaps the Camel or JBossESB community. Please consider these, choose the most appropriate channel for moving forward. I will now close this Bugzilla tracker, it is not an appropriate place to seek help for such an issue. Please do open a dialogue on one of the above channels. Regards, Rick