BizTalk Server - Microsoft.XLANGs.Core.Service.RootService.ApplyTransform

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server > November 2006 > Microsoft.XLANGs.Core.Service.RootService.ApplyTransform





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Microsoft.XLANGs.Core.Service.RootService.ApplyTransform
OgTheTerror

2006-11-22, 7:23 am

Hi there guys

I know there was a old Post on this subject but it has since been
closed, I know this method can be called from a Orchestration as
Highlighted in the example below found in the other post aswell as the
Biztalk Help.

What I however would like to know is there anyway to call
Microsoft.XLANGs.Core.Service.RootService.ApplyTransform() from a
dot.net assembly?


Example:
----------

if (condition)
{
MapType = Type.GetType("NameSpace1.Map1, AssemblyName1,
Version=1.0.0.0,Culture=neutral, PublicKeyToken=111111111111");
}
else
{
MapType = Type.GetType("NameSpace2.Map2, AssemblyName2,
Version=1.0.0.0,Culture=neutral, PublicKeyToken=111111111111");
}

// use the map type in the transform
construct _responseMessage
{
transform (responseMessage.x1, _responseMessage.x2) =
MapType(requestMessage.s1, _requestMessage.s2);
}

// or you can use the fully-qualified map name in the transform
construct _responseMessage
{
transform (_responseMessage.x1, _responseMessage.x2) =
NameSpace.MapName (requestMessage.s1, _requestMessage.s2);
}

OgTheTerror

2006-11-22, 7:23 am

Hi there guys

I'd like to Elaborate further on what im trying to do, the best way i
can think of to get that accross is to show you the code!!!

public static XLANGMessage mapXLANGMsg(XLANGMessage inPutMsg)
{
XLANGMessage outPutMsg = null;
Part outPutPart = null;
try
{
if (inPutMsg != null && inPutMsg.Count > 0)
{
IEnumerator e = inPutMsg.GetEnumerator();
XLANGPart inXLANGpart = null;
object[] objinPutParts = new object[10];
Int32 i = 0;

while (e.MoveNext())
{
inXLANGpart = (XLANGPart)e.Current;
if (inXLANGpart != null)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc =
(XmlDocument)inXLANGpart.RetrieveAs(xmlDoc.GetType());

//This is not allowed null Reference
exception is caused
//Part inPart = null;
//inPart.LoadFrom(xmlDoc.OuterXml);

objinPutParts[i] = inXLANGpart;

i++;
}
}
//This seems to only accept Part's
ServiceContext.RootService.ApplyTransform(MapType,
new object[] { outPutPart }, objinPutParts);

//Then the question is how do I get back to a
XLANGMessage???
}
}
catch (Exception ex)
{
}
return outPutMsg;
}

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com