0 Replies Latest reply on Apr 16, 2009 9:52 AM by Nicolas FRANCOIS

    trigger a service with xsd validation

    Nicolas FRANCOIS Newbie

      Dear all,

      I am facing a problem with a service xsd validation.
      With a JMS client, I send this XML message:

      <?xml version="1.0" encoding="UTF-8"?>
      <p:message
       xmlns:p="Aprefix"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="Aprefix esbcontent/request.xsd ">
      my text</p:message>
      

      to a service allowing input messages matching with this xsd:
      <?xml version="1.0" encoding="UTF-8"?>
      <xs:schema
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       targetNamespace="Aprefix">
       <xs:element name="message" type="xs:string"></xs:element>
      </xs:schema>
      


      However I get this error:
      15:43:18,768 ERROR [JmsComposer] Object in JMS message is not a Serializeable
      java.io.IOException: Util.deserialize caught XMLStreamException
       at org.jboss.soa.esb.util.Util.deserialize(Util.java:224)
       at org.jboss.internal.soa.esb.couriers.helpers.JmsComposer.compose(JmsComposer.java:72)
       at org.jboss.internal.soa.esb.couriers.JmsCourier.pickup(JmsCourier.java:401)
       at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:228)
       at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:204)
       at org.jboss.soa.esb.listeners.message.MessageAwareListener.waitForEventAndProcess(MessageAwareListener.java:302)
       at org.jboss.soa.esb.listeners.message.MessageAwareListener.doRun(MessageAwareListener.java:258)
       at org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle.run(AbstractThreadedManagedLifecycle.java:115)
       at java.lang.Thread.run(Unknown Source)
      Caused by: javax.xml.stream.XMLStreamException: Unexpected start element: {Aprefix}message
       at org.jboss.internal.soa.esb.util.stax.StreamHelper.checkTag(StreamHelper.java:364)
       at org.jboss.internal.soa.esb.util.stax.StreamHelper.checkNextStartTag(StreamHelper.java:336)
       at org.jboss.soa.esb.util.Util.deserialize(Util.java:217)
       ... 8 more
      

      It seams the validation fails but I don't know why.

      For information here is the definition of my service:
      <service category="myESB" name="publish" description="publish a string">
       <listeners>
       <jms-listener name="JMS-ETL_Listener" busidref="ETL_channel" />
       </listeners>
      
       <actions mep="OneWay" inXsd="/request.xsd" validate="true">
       <action class="com.aubay.soa.esb.action.PublishAction" name="StoreAction">
       <property name="notification-details">
       <NotificationList type="OK">
       <target class="NotifyQueues">
       <queue jndiName="queue/JOB_esb" />
       </target>
       </NotificationList>
       </property>
       </action>
       </actions>
       </service>
      


      Thanks for your help,

      Nicolas FRANCOIS