Loading ...
Sorry, an error occurred while loading the content.

Accepting Goofy MSMQ Message

Expand Messages
  • warren_m_smith
    I m trying to accept SOAP requests from a MSMQ server, but MSMQ is sending some malformed messages, which I just have to accept and deal with [example below].
    Message 1 of 1 , Aug 13, 2007
    • 0 Attachment
      I'm trying to accept SOAP requests from a MSMQ server, but MSMQ is
      sending some malformed messages, which I just have to accept and deal
      with [example below].

      I've solved some of the problems [detailed below, as well] myself, but
      cannot figure out how to process a message with an empty body (other
      than injecting xml which seems like a bit of a kludge). Any ideas?

      -Warren


      * DIME Message boundary not on its own line

      MIME::Tools reads message line-by-line. Created new packager,
      overriding SOAP::Package::MIME::unpackage to inject a newline before
      message boundaries if they don't exist.

      * Non-standard header elements have mustUnderstand="1" attributes

      Worked around by disabling MUSTUNDERSTAND checks.

      * SOAPAction: "MSMQMessage"

      Values for SOAPAction must be in format uri#anchor. Worked around by
      creating an empty on_action() handler.

      * Empty Envelope Body



      Host: zippy
      Content-Length: 1186
      Content-Type: multipart/related; boundary="MSMQ - SOAP boundary,
      16118"; type=text/xml
      Proxy-Accept: NonInteractiveClient
      SOAPAction: "MSMQMessage"

      --MSMQ - SOAP boundary, 16118
      Content-Type: text/xml; charset=UTF-8
      Content-Length: 859

      <se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns="http://schemas.xmlsoap.org/srmp/"><se:Header><path
      xmlns="http://schemas.xmlsoap.org/rp/"
      se:mustUnderstand="1"><action>MSMQ:this is my
      label</action><to>HTTP://zippy:8890/msmq/private$/test_queue</to><rev><via>HTTP://zippy:8890/msmq/private$/test_queue</via></rev><id>uuid:8194@5a6842ad-2573-4db9-b21a-658bb3973cbf</id></path><properties
      se:mustUnderstand="1"><expiresAt>20380119T031407</expiresAt><sentAt>20070813T174236</sentAt></properties><Msmq
      xmlns="msmq.namespace.xml"><Class>0</Class><Priority>1</Priority><Correlation>AAAAAAAAAAAAAAAAAAAAAAAAAAA=</Correlation><App>42</App><BodyType>0</BodyType><HashAlgorithm>32772</HashAlgorithm><SourceQmGuid>5a6842ad-2573-4db9-b21a-658bb3973cbf</SourceQmGuid><TTrq>20071111T174236</TTrq></Msmq></se:Header><se:Body></se:Body></se:Envelope>--MSMQ
      - SOAP boundary, 16118
      Content-Type: application/octet-stream
      Content-Length: 53
      Content-Id: body@5a6842ad-2573-4db9-b21a-658bb3973cbf

      <?xml version="1.0"?>
      <string>just testing!</string>--MSMQ - SOAP boundary, 16118--
    Your message has been successfully submitted and would be delivered to recipients shortly.