none
Streaming Issue with MQSC Adapter RRS feed

  • Question

  • Hi All

    Scenario: Sending 837 Claim for HIPPA Validation through MQSC adapter to EDIFECS and   receiving validated message in X12 format for further processing

    I am facing issue with MQSC adapter where Streaming in pipeline component of Receive pipeline is not working correctly, however same component is working fine when we are configuring MQ Series  Adapter.

    I am completely stuck here , not sure if I am missing any configuration in MQSC adapter , or need to change anything in code , I will highly appreciate if somebody will help me  as soon as possible.

    I am getting  an error Out of memory exception and while debugging I notice inReader.MoveToContent() is giving error that root element at line number 1 and 

    Error:

    at System.Xml.XmlTextReaderImpl.Throw(Exception e)\r\n   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()\r\n   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()\r\n   at System.Xml.XmlReader.MoveToContent()\r\n   at

    Sample code

    public IBaseMessage Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext pContext, IBaseMessage pInMsg)

            {

                IBaseMessage outMessage = null;

              

                outMessage = pContext.GetMessageFactory().CreateMessage();

                outMessage.Context = pInMsg.Context;

                IBaseMessagePart newBodyPart = pContext.GetMessageFactory().CreateMessagePart();

     newBodyPart.PartProperties = pInMsg.BodyPart.PartProperties;

    newBodyPart.Data = CleanNamespaceFromNode(pInMsg.BodyPart.GetOriginalDataStream());

    CopyMessageParts(pInMsg, outMessage, newBodyPart);

    return outMessage;

          }

    ****************************************************************************

    public Stream CleanNamespaceFromNode(Stream inStream)

                {

    XmlTextReader inReader = new System.Xml.XmlTextReader(inStream);

    VirtualStream outStream = new VirtualStream(VirtualStream.MemoryFlag.AutoOverFlowToDisk);

    XmlTextWriter writer = new XmlTextWriter(outStream, GetEncoding());

                // barf it all.  could have used TextReader/TextWriter, but may

                // still need node manipulation some day.

                inReader.MoveToContent();

                writer.WriteRaw(inReader.ReadOuterXml());

                writer.Flush();

                outStream.Position = 0;

                      outStream = ProcessBOMSequence(outStream);

                return outStream;       }

    Thx

    KK.

    Sunday, August 18, 2013 7:45 PM

Answers

  • Hi All

    Thank you
    for putting your effort on it .<o:p></o:p>

    finally , I am able to resolve this issue and below is solution for it<o:p></o:p>

    I did analysis of the various property of corresponding queue at queue server and i noticed READ
    AHEAD Property was set as NO by default , I made it Yes and I observed BizTalk
    started to read the messages from queue<o:p></o:p>


    Thanks

    KK

    • Marked as answer by I AM KK Monday, September 2, 2013 4:34 PM
    Monday, September 2, 2013 4:34 PM

All replies

  • So this must be after the EDI Disassembler?  What is the context before disassembly?
    Monday, August 19, 2013 2:04 PM
  • Hi,

    Is there nothing more in the Event Log (Application) ?

    http://stevemelan.wordpress.com/category/ibm-mq/

    Best Regards,


    Steve Melan - BCEE My Blog : http://stevemelan.wordpress.com

    Monday, August 19, 2013 4:32 PM
  • Hi Steve,

    Thank you very much for showing your interest in this issue and I hope we will get some solution for it

    I am getting only below two errors

    But if I am using same code with Server based adapter (MQSeries) then it is working fine

    Initially we were using MQSeries adapter and later decided why can’t we deploy all queues on one server (MQ Server), install MQ Client on BizTalk machine and communicate both with MQSC (TCP) adapter but unfortunately, I am struggling with below issues

    Error 1.

    There was a failure executing the receive pipeline: "Bcbsla.X12_837.BizTalk.Pipelines.PromoteReferenceId, Bcbsla.X12_837.BizTalk.Pipelines, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d723d49cc84ceaab" Source: "ESB Clean Namespace" Receive Port: "Bcbsla.Common.Claim.FromEDIFECS" URI: "mqsc://BATCHUAT1/tcp/MQ-TST-APP01(1418)/BTSEDFUAT1B/INBOUND.FROM.XENGINE.GOOD.BATCH.5010.XDATA" Reason: Data at the root level is invalid. Line 1, position 1.

    Error 2.

    here is no explicit mapping for the categories 'PipelineTrace'. The log entry was:

    Timestamp: 8/19/2013 4:46:44 PM

    Message: Communications - StripNewLineCR-Endtime:2013-08-19 11:46:44:712

    Category: PipelineTrace

    Priority: -1

    EventId: 1

    Thanks kk.

    Tuesday, August 20, 2013 3:40 PM
  • Thanks a lot looking into this.

    We are receiving x12(Not EDI) which is HIPAA Validated message by the EDIFECS so we have XML Dissembler

    Prior to that we have component clean ESB Namespace as mentioned in code there it is getting failed

    Thx. KK

    Tuesday, August 20, 2013 4:15 PM
  • Hi,

    It seems that your pipeline is not receiving a well formatted XML Document, perhaps due to an incorrect Encoding.

    Please take a look at the Character Set defined in the MQSC Transport Properties. You can choose either None, UCS-2 and UTF-16 or UTF-8. In my case UTF-8 works best for me.

    Please take also a look at the following article : http://www.nsilverbullet.net/2008/11/03/biztalk-2006-mqsc-adapter-encoding-solution/

    Best Regards,


    Steve Melan - BCEE My Blog : http://stevemelan.wordpress.com

    Wednesday, August 21, 2013 5:37 AM
  • Hi Steve

    Thanks for responding,

    I have tried(charcaterset= UTF-8 )option in MQSC Adapter  and also promoted encoding= UTF-8 in pipeline component but unfortunately  no any luck.

    Thanks

    kk

    Thursday, August 22, 2013 3:49 AM
  • Hi All

    Thank you
    for putting your effort on it .<o:p></o:p>

    finally , I am able to resolve this issue and below is solution for it<o:p></o:p>

    I did analysis of the various property of corresponding queue at queue server and i noticed READ
    AHEAD Property was set as NO by default , I made it Yes and I observed BizTalk
    started to read the messages from queue<o:p></o:p>


    Thanks

    KK

    • Marked as answer by I AM KK Monday, September 2, 2013 4:34 PM
    Monday, September 2, 2013 4:34 PM