Announcement Announcement Module
Collapse
No announcement yet.
Soring OXM in Spring integration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Soring OXM in Spring integration

    Hi Guys,

    these days i am working on a project which requires spring Integration XML support.

    In here i am using springframework-core.version=3.1.2.RELEASE with following Spring integration components.

    spring-integration-core.version=2.1.3.RELEASE
    spring-integration-xml.version=2.1.3.RELEASE
    jaxb-api.version=2.1

    then i tried to use xpath router as follows

    Code:
    <int-xml:xpath-router id="msgRouter" input-channel="filesOutChannel" evaluate-as-string="true">
    	<int-xml:xpath-expression expression="/hl7msg/details/type"/>
    	<int-xml:mapping value="SCH" channel="schChannel"/>
    </int-xml:xpath-router>
    then i got following error

    Code:
    java.lang.NoClassDefFoundError: org/springframework/xml/xpath/XPathExpressionFactory

    then again i tried to use following component.

    Code:
    <int-xml:unmarshalling-transformer id="defaultUnmarshaller" input-channel="schChannel" output-channel="xmlToObject" unmarshaller="marshaller"/>
    	
    <beans:bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
    	<beans:property name="classesToBeBound" value="com.bst.xml.ADTHL7Message"/>
    </beans:bean>
    and got following error

    Code:
     java.lang.ClassNotFoundException: org.springframework.oxm.jaxb.Jaxb2Marshaller

    is there any additional jar files we need to add here. appreciate your help
    Thanks
    Kelumt

  • #2
    I you use Maven, gradle, etc for your dependency management, these will all be taken care of for you automatically.

    For XPath, you need the spring-xml-2.1.0.RELEASE.jar from the Spring WebServices project. For JaxB, you need spring-oxm-3.1.2.RELEASE

    Comment

    Working...
    X