TCP PDL for XML

Homepage Clovertech Forums Cloverleaf TCP PDL for XML

  • Creator
    Topic
  • #116025
    Wayne Hudson
    Participant

    I’m trying to pass XML messages through Cloverleaf 6.2, across TCP connections.  All of the protocol choices I see seem to require some sort of stop & end control character.  Neither vendor is encapsulating the messages with control characters, and I’m struggling to write a PDL for this connection when I have the thread set to PROTOCOL:tcpip-pdl.

    I tried using the threads as PROTOCOL:tcpip and set the Encapsulated type to USER with the XML <Event & </Event> tags.  Those seem to get consumed by the protocol and don’t continue with the message.

    Is there documentation for writing a PDL that uses strings like XML tags to delimit the message rather than single control characters?

     

    For example, this is how the messages start & end:
    <pre><?xml version=”1.0″ encoding=”utf-16″?>
    <Event xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; version=”1.0″ id=”1879852954″ seq=”1b474857-4844-4d8b-9ab3-5369300ba11d”>

    </Event></pre>
    … and this is how an Ack would come back:
    <pre><?xml version=”1.0″ encoding=”utf-8″?><EventResponse version=”1.0″ id=”1879852954″><Status>ACK</EventResponse></pre>
     

Viewing 2 reply threads
  • Author
    Replies
    • #116028
      Jim Kosloskey
      Participant

      As far as I know what is provided in the Cloverleaf Doc is what there is for PDL.

      Personally I would not attempt to use anything inside the message (any message) as a protocol delimiter.

      In this case I would request the sending system to either utilize length encoding (which could be the fastest to code and is the fastest to execute) or the HL/7 MLP encapsulation.

      Both could then be configured in the TCP/IP Protocol in Cloverleaf (depending on your release) without any PDL. But you could use PDL if the HL/7 MLP is deployed.

       

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #116034
      Charlie Bursell
      Participant

      Are you sure the <pre> and </pre> tags are unique to the message.  If so it may be possible to write an old style PDL that would work but those tend to leak a lot of memory.

      As Jim pointed out any message via TCP/IP must have unique delimiters otherwise how would you know where a message starts and ends since TCP/IP is a stream based protocol.  HL7, for example, uses 0B…1C.  Others use length encoding, etc. Even the serial messages had STX..ETX

    • #116051
      Wayne Hudson
      Participant

      Thanks for the responses.  I’ve been able to get both sides to use a start & stop sequence like HL7 MLP (i.e. start <0xb> & stop <0x1c><0xd>).  This will make my life in Cloverleaf much better.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,448
Topic Tags
288
Empty Topic Tags
10