Home Page › Forums › BizTalk 2004 – BizTalk 2010 › BizTalk How to receive Filename in Orchestration using message assignment shape
- This topic has 2 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
November 2, 2013 at 10:45 AM #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
-
November 5, 2013 at 3:42 AM #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);
-
November 5, 2013 at 1:48 PM #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;
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.