BizTalk How to receive Filename in Orchestration using message assignment shape

Home Page Forums BizTalk 2004 – BizTalk 2010 BizTalk How to receive Filename in Orchestration using message assignment shape

Viewing 1 reply thread
  • Author
    Posts
    • #26191

      hi,

      I am trying to access the filename and creation date from the receive port in orchestration.In the message assignment shape i wrote this:

      xmldocInmsg = new System.Xml.XmlDocument();
      xmldocOutmsg= new System.Xml.XmlDocument();
      xmldocInmsg= Inmsg;
      xmldocOutmsg= outmsg;
      Inmsg=xmldocInmsg;
      outmsg=xmldocOutmsg;

      outmsg(FILE.ReceivedFileName) = Inmsg(FILE.ReceivedFileName);
      outmsg(FILE.FileCreationTime) = Inmsg(FILE.FileCreationTime);

      I am getting errors: use of unreconstructed messages Inmsg and outmsg. 

      if i just write

      Inmsg= null; outmsg = null;

      outmsg(FILE.ReceivedFileName) = Inmsg(FILE.ReceivedFileName);
      outmsg(FILE.FileCreationTime) = Inmsg(FILE.FileCreationTime);

      i am getting Null exception.

      Please help to receive the filename and created time in assignment shape.

      thanks

      Nan

    • #26194

      Why are you using XML Document?

      In the message assignment shape just use this.

      outmsg=Inmsg;

      outmsg(FILE.ReceivedFileName) = Inmsg(FILE.ReceivedFileName);

      outmsg(FILE.FileCreationTime) = Inmsg(FILE.FileCreationTime);

      • #26200

        yes. i have changed that. i am using this instead in the assignment. use a transform to construct SQLInsertmsg with some dummy values.

        sending the actual flat file records to a location. after all this, i am getting No subscribers found. there is a send port for sql insert.

        strFileNameWPath = FDGLTransactMsg(FILE.ReceivedFileName);

        strFileName = System.IO.Path.GetFileName(strFileNameWPath);

        FilecreatedDate = FDGLTransactMsg(FILE.FileCreationTime);

        xpath(SQLInsertMsg,"/*[local-name()='usp_InsertFileNameToUpload' and namespace-uri()='schemas.microsoft.com/…/dbo&]/*[local-name()='Filename' and namespace-uri()='schemas.microsoft.com/…/dbo&]")=strFileName;

        xpath(SQLInsertMsg,"/*[local-name()='usp_InsertFileNameToGLUpload' and namespace-uri()='schemas.microsoft.com/…/dbo&]/*[local-name()='DateCreated' and namespace-uri()='schemas.microsoft.com/…/dbo&]") = FilecreatedDate;

        xpath(SQLInsertMsg,"/*[local-name()='usp_InsertFileNameToGLUpload' and namespace-uri()='schemas.microsoft.com/…/dbo&]/*[local-name()='matchCount' and namespace-uri()='schemas.microsoft.com/…/dbo&]") = true;

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.