Forum Replies Created
-
AuthorPosts
-
Hi,
I’ve done it with “Direct Binding” using “Routing between ports via filters on MessageBox”. It works well.
As an additional benefit, I can easily reconfigure SAP Port in Admin Console depending on environment I want to use.
You shouid consider using the xpath function, along with the position() xpath function.
Initialize a variable to contain the number of items:
nbItems = System.Convert.ToInt32(orderMsg, “count(//*[local-name()=’item’ and namespace-uri()=’ns’)”);
Then, initialize a counter:
itemcounter = 1;
In a loop, while itemcounter <= nbItems
Use another xpath expression to extract the item information. For instance, suppose your item has only one information, the item description:
itemDesc = xpath(orderMsg, “//*[local-name()=’item’ and namespace-uri()=’ns’ and position() ='” +itemcounter + “‘]”);
Increment itemcounter before the next loop.
That way, you won’t have to use an atomic scope.
Another way would be to treat your order as an envelope and each item as a separate document, disassemble it in a pipeline and process it in a sequential convoy.
Hi,
Thank you Amol. I need further clarrification on this.
My Input file is like below.
1,2,3,4,5,f,g,h,i,j
a,b,c,d,e,6,7,8,9,10
But my output should be like this. (My first record should be split into two. And again those child records to be split into different child records.
1*2
3
4
5
f*g
h
i
j
a*b
c
d
e
6*7
8
9
10
So I added a Table looping functoid to spilt the records as
1,2,3,4,5
f,g,h,i,j
And then I sent these record elements to a child table looping functoid to split them. But the child Table looping functoid is giving me the output as
1*2
3
4
5
But I am unable to get the second record details.
Please provide me the suggestion where to add the table value functoid (Beleve it is “Value Mapping functoid”)
Thank you,
R.Subha
Here’s an FTPS Adapter
http://blog.biztalk-info.com/archive/2009/04/15/BizTalk_FTPFTPS_Adapter.aspx
April 15, 2009 at 10:00 AM in reply to: Debatching messages from Oracle Adapter 3.0 – WCF generated Schema #22144You can accomplish this with out creating a extra shema and also not setting the Root Reference.
Please read the blog about this :
Use table value functiods.
— Amol Pande
April 14, 2009 at 7:14 PM in reply to: Transport Security – NetTcp binding, Authorization help #22142Oh, Tank u man alot.. it works 🙂
I went for the first option you mentioned since i simplified my example here. This was a part of my map. I use other functoids in the map and this was the last thing to deal with.
again, Many thanks. i was sitting with this for 3 days now!
Oh, Tank u man alot.. it works 🙂
again, Many thanks. i was sitting with this for 3 days now!
Hi Nick Thanks for teh reply, how will the C# code look like do you have any code examples for the split function like how to write the code to split.
Thanks
Hi Thanks for your reply’s I have a question Cant I do like this
FileName = “robert_telecom_wired_02102009”;
FileExtract = FileName.Substring(8,14);
wont I get “telecom” from the file name. I havent test this procedure I am just asking you does it work.
Thanks
I believe that the problem you are having has to do with the context within the “test” expression at the line:
<xsl:if test=”//EDE1D01R/EDONR = current()/EDORN”>
The “current” node in the test expression is not the EDE1D01R node. You can address this simply by using a variable. This should work:
<xsl:for-each select=“//EDE1D01R”>
<ED01>
<xsl:variable name=“D01Value” select=“ED0NR”/>
<ED0NR>
<xsl:value-of select=“$D01Value”/>
</ED0NR>
<xsl:for-each select=“//EDE1D02R[ED0RN = ED0NR]”>
<ED02>
<Message>
<xsl:value-of select=“current()/EDT60”/>
</Message>
</ED02>
</xsl:for-each>
</ED01>
</xsl:for-each>Since it seems that your map is just XSLT you may want to have your map just use an XSLT file rather than hide the XSLT in a functoid. Then you can use templates which are cleaner and faster. Here is an example that should work:
<xsl:stylesheet version=“1.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>
<xsl:template match=“/”>
<xsl:element name=“root”>
<xsl:apply-templates select=“//EDE1D01R”/>
</xsl:element>
</xsl:template><xsl:template match=“EDE1D01R”>
<xsl:variable name=“D01Value” select=“ED0NR”/>
<xsl:element name=“ED01”>
<xsl:element name=“ED0NR”>
<xsl:value-of select=“$D01Value”/>
</xsl:element>
<xsl:apply-templates select=“//EDE1D02R[ED0RN = $D01Value]”/>
</xsl:element>
</xsl:template><xsl:template match=“EDE1D02R”>
<xsl:element name=“ED02”>
<xsl:element name=“Message”>
<xsl:value-of select=“EDT60”/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>I have jsut finished working out an issue with the Responce.xsd.
I needed the response GUID ID after creating an Activity. I created a Helper class to parse the string XML into XML. I then
used the Email_CreateResponce Schema to format to a message.
I modified the code to fit what i needed. by doing this wi can do Seardches and Fetch using the adapter.
Thanks to Chris Romp for is project I was able to do the following.In Expresion message construct
Create a verable string in the Orch and fill it.
strResponseXML = xpath(crmActivityResponce, “string(/*[local-name()=’Response’ and namespace-uri()=’http://schemas.microsoft.com/crm/BizTalkAdapter/Response’%5D/*%5Blocal-name()=’Body’ and namespace-uri()=”]/*[local-name()=’Message’and namespace-uri()=”]/text())”);
crmActivityEmailCreateResponce = CBN.BizTalk.HelperClasses.XMLString.GetMessageFromXmlString(strResponseXML);
Created a Class with the following.
public class XMLString
{
public static XmlDocument GetMessageFromXmlString(string XmlString)
{
XmlDocument doc = new XmlDocument();
XmlString = DecodeXmlString(XmlString);
//XmlString = InsertNamespaceString(XmlString, Namespace);
doc.LoadXml(XmlString);
return doc;
}private static string DecodeXmlString(string XmlString)
{
XmlString = XmlString.Replace(“<“, “”);
XmlString = XmlString.Replace(“"”, “\””);
XmlString = XmlString.Replace(“'”, “\'”);
XmlString = XmlString.Replace(“&”, “&”);return XmlString;
}private static string InsertNamespaceString(string XmlString, string Namespace)
{
return InsertNamespaceString(XmlString, Namespace, String.Empty);
}
}This was my second attempt at installing VS2008. Both times I used a clean WinSrv2008 O/S but had the same result. VS2008 hangs (did so overnight – 16 hours worth).
The application event log has several errors, like:
Application Error w/ Event ID: 1000; Keyword: 0x80000000000000
Faulting application msiexec.exe, version 4.5.6002.16670, time stamp 0x4983d418, faulting module ntdll.dll, version 6.0.6002.16670, time stamp
0x4983e781, exception code 0x80000003, fault offset 0x000348d8, process id 0xf5c, application start time 0x01c9bc8c731d0340.
I’m not sure what the problem is, but am leaning towards this being a problem with my WinSrv2008 install.
Hi Thanks for your reply’s I have a question Cant I do like this
FileName = “robert_telecom_wired_02102009”;
FileExtract = FileName.Substring(8,14);
wont I get “telecom” from the file name. I havent test this procedure I am just asking you does it work.
Thanks
-
AuthorPosts