4 Replies Latest reply: Apr 1, 2013 12:15 AM by Karan Mann RSS

    Problem with writing message from JMS queue to File adapter

    BK574
      Thanks for your replies Vladodias, 988445, DeepakDabiru.

      Now, I got one more issue with JMS. My BPEL is successfully writing message into JMS queue. I have developed second bpel process which consumes the first queue and writes the message into File adapter. The problem here is the second bpel process is successfully consuming the messages from the first queue but it is not writing any output into File adapter. Also, If i am selecting Opaque element in file adapter, then it is writing the message successfully into file adapter. Does my schema file got corrupted?

      1. The output that is getting stored in first queue is (1st JMS adapter i.e. produce message)
      Initial Schema
      <?xml version="1.0" encoding="windows-1252" ?>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns="http://www.xml.com/soa/FileSchema.xsd"
      targetNamespace="http://www.xml.com/soa/FileSchema.xsd"
      elementFormDefault="qualified">
      <xsd:complexType name="complexType1">
      <xsd:sequence>
      <xsd:element name="JobNumber" type="xsd:string"/>
      <xsd:element name="Filelocation" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:element name="element1" type="complexType1"/>
      </xsd:schema>

      Message inside queue is

      <?xml version="1.0" encoding="UTF-8" ?><element1 xmlns:ns2="http://www.xml.com/soa/FileSchema.xsd" xmlns="http://www.xml.com/soa/FileSchema.xsd">
      <ns2:JobNumber>8810</ns2:JobID>
      <ns2:Filelocation>C:/documents/con/apple.pdf</ns2:Filelocation>
      </element1>

      2. The schema that I am using for second queue & File adapter is (2nd JMS adapter i.e. consume message, this queue consumes the message which is inside the first queue)
      <?xml version="1.0" encoding="windows-1252" ?>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns="http://www.xml.com/soa/FileSchema.xsd"
      targetNamespace="http://www.xml.com/soa/FileSchema.xsd"
      elementFormDefault="qualified">
      <xsd:complexType name="complexType1">
      <xsd:sequence>
      <xsd:element name="JobNumber" type="xsd:string"/>
      <xsd:element name="Filelocation" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:element name="element1" type="complexType1"/>
      </xsd:schema>

      the output in payload of consume message queue is

      <element1>
      <ns2:JobNumber>8810</ns2:JobNumber>
      <ns2:Filelocation>C:/documents/con/apple.pdf</ns2:Filelocation>
      </element1>

      The output in File adapter is

      <Invoke1_Write_InputVariable>
      <part name="body">
      <element1/>
      </part>
      </Invoke1_Write_InputVariable>

      Is anything wrongwith XML schema?

      This is the common schema that I am using in file adapter, Producer queue and consumer queue.
      <?xml version="1.0" encoding="windows-1252" ?>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns="http://www.xml.com/soa/FileSchema.xsd"
      targetNamespace="http://www.xml.com/soa/FileSchema.xsd"
      elementFormDefault="qualified">
      <xsd:complexType name="complexType1">
      <xsd:sequence>
      <xsd:element name="JobNumber" type="xsd:string"/>
      <xsd:element name="Filelocation" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:element name="element1" type="complexType1"/>
      </xsd:schema>

      Appreciate your help guys.

      Edited by: kameshb on Mar 28, 2013 8:01 AM