Forum Replies Created
-
AuthorPosts
-
[quote:9f69ecc8b3=\”nwalters\”]The C# code has NOTHING to do with a map.
It is called from a Biztalk message assignment shape in an orchestration.The C# must have a strong name, and must be installed in the GAC on the machine where Biztalk server is running.
In your Biztalk project, you make a reference to the assembly (project, right click reference, click \”Browse\” button, find BIN directory where you compiled .DLL to, and select the .DLL.
Since the C# routine is static, you do not need a variable/object to call it.
You will code something like this:
YourNamespace.YourClass.AddChildDocument(
msgParent, msgChild,
\”ParentElement\”, \”http://*.com/schema\”);Since normal messages are xmlDocuments, I’m pretty sure you can pass them directly where the C# program expects an xmlDocument object.
Eventually, you will probably develop several \”helper\” classes in C#,
so you will probably have something like an XmlHelpersClass, and it may have 5 to 20 methods in it that you can call.[/quote:9f69ecc8b3]First of all, [u:9f69ecc8b3]thanks a lot[/u:9f69ecc8b3] for your answer. I now understand how works your [i:9f69ecc8b3]C# Class[/i:9f69ecc8b3].
Actually, I need to insert a row (not blank) in my output flat file only if one of the values of the [color=orange:9f69ecc8b3][b:9f69ecc8b3]source schema[/b:9f69ecc8b3][/color:9f69ecc8b3] is [i:9f69ecc8b3]true[/i:9f69ecc8b3] else I don’t need to add it.
Doesn’t matter, I think I can use a part of your code and add it in a [color=green:9f69ecc8b3][b:9f69ecc8b3]Message assignement[/b:9f69ecc8b3] shape[/color:9f69ecc8b3] inside my [color=green:9f69ecc8b3][b:9f69ecc8b3]Construct Message[/b:9f69ecc8b3] shape[/color:9f69ecc8b3], juste after the [color=green:9f69ecc8b3][b:9f69ecc8b3]transform[/b:9f69ecc8b3] shape[/color:9f69ecc8b3] (where the mapping is done). [size=9:9f69ecc8b3][i:9f69ecc8b3]hope that is enough clear …[/i:9f69ecc8b3][/size:9f69ecc8b3]
But this involve I had to [color=darkred:9f69ecc8b3][b:9f69ecc8b3]promote[/b:9f69ecc8b3][/color:9f69ecc8b3] the value of my [color=orange:9f69ecc8b3][b:9f69ecc8b3]source schema[/b:9f69ecc8b3][/color:9f69ecc8b3] which is [i:9f69ecc8b3]true [/i:9f69ecc8b3]or [i:9f69ecc8b3]false [/i:9f69ecc8b3] to test if the row must be inserted or not, isn’t it ?
In any case, I’m gonna try this !
Hi Greg,
I see…
Thanks for helping me out….
Thank you for your quick reply.
Thanks,
FredYour current problem is definitely a resource issue.
The minimum spec for a Biztalk Server 2006 is 1GB RAM, if you are also running SQL Server 2005 then you will need another 512MB to 1GB RAM.I would increase the memory to the minimum spec and retest, you may find that it will handle 10 simultaneous message OK but fail at 20. You can then size the server to handle this, throw lots of hardware at it and/or tune Biztalk Server.
e.g. Limit the batch size on the File adapter, look at the high and low water marks, etcYou should also check out the stored procedure – use SQL Server Profiler.
Any inefficiencies here will have an impact on the performance.
Do you know why the stored proc functoid is failing, is it a timeout, locking …If thats the case then the schema is a bit ambiguous.
[quote:e7343b6206][b:e7343b6206]From W3.org – XML Schema Part 0: Primer Second Edition[/b:e7343b6206]
When an element or type is declared to be \”abstract\”, it cannot be used in an instance document. When an element is declared to be abstract, a member of that element’s substitution group must appear in the instance document. When an element’s corresponding type definition is declared as abstract, all instances of that element must use xsi:type to indicate a derived type that is not abstract.
[/quote:e7343b6206]If both the element and its type are marked as abstract the you have a small problem. You can’t use <GeneralDetail> or <SpecificDetail> because they are types not elements and you can’t use <Detail> because it is marked as abstract.
Can you refer this back to the schema author.
I just did a quick check, it looks like Biztalk ignores the abstract attribute on the element if there is no substitutionGroup.
It creates a Detail node with the xsi:type set and this passes instance validation even though the Detail element is marked as abstract.Hi Greg,
Thanks for the quick response…
Ah i see…
Nope…No substitution Group was declared. They are just declared as complex type.
Thanks,
FredDo you also have
[code:1:297183077f]<element name=\"GeneralDetail\" type=\"string\" substitutionGroup=\"Detail\"/>
<element name=\"SpecificDetail\" type=\"string\" substitutionGroup=\"Detail\"/>[/code:1:297183077f]or are GeneralDetail and SpecificDetail only declared as complexTypes?
Not sure what happens if the element and the type are marked as abstract. The Xml schema spec doesn’t seem to mention this case
Hi Greg,
Yes, that is correct
except that instead of
[code:1:b3c2866306]
<element name=\"Detail\" type=\"Detail\">
[/code:1:b3c2866306]an abstract=\”True\” is added to make it
[code:1:b3c2866306]
<element name=\"Detail\" type=\"Detail\" abstract=\"true\">
[/code:1:b3c2866306]so will the result be the same?
Thanks,
FredHave you tried using forward slashes
//server/ftpsite/ftplocation/directoryIt sounds like the schema is using abstract types rather than abstract elements.
something like this:[code:1:6375a16c7c]<element name=\"Detail\" type=\"Detail\">
<complexType name = \"Detail\" abstract=\"true\">
<attribute name=\"Type\" type=\"string\" />
</complexType><complexType name=\"GeneralDetail\">
<complexContent mixed=\"false\">
<extension base=\"DetailType\"/>
</complexContent>
</complexType><complexType name=\"SpecificDetail\">
<complexContent mixed=\"false\">
<extension base=\"DetailType\"/>
</complexContent>
</complexType>[/code:1:6375a16c7c]If this is the case then the output <Detail xsi:type=\”GeneralDetail\” Type=\”A\”/> is the correct output.
There is no element called GeneralDetail, so this <GeneralDetail Type=\”A\”/> is not valid.
If you wish to to use different element names then the schema needs to have the an abstract element and use a substitutionGroup
Hi Greg,
Well… The schema was created by someone else so I can’t change it nor can I show it.
The Detail in my example is the abstract type and General Detail and Specific Detail are subclass of the abstract type Detail. I think this is the simpliest way I could explain it but I’ll try to ask permission.
Let me just explain the appearance of the Diagram that I’ve created earlier so it will be much clearer…
Basically in the Biztalk Map,
The \”Detail\” node Appears as a record eventhought it was an abstract.
then if you expand the \”Detail\” node. 2 nodes with <General> and <Specific> will appear. Note that you can’t directly map into them but if you mapped into their child or attributes, This \” <Detail xsi:type=\”GeneralDetail\” type=\”A\”> \” will appear.*Note: As for insanekid, that’s okay.
Thanks,
FredOops,
Sorry Fred, I thought I’ve created a new topic. I’m really sorry, I was reading your topic when I have encountered that error so when I tried to post it. I accidentally post it in your question.
I’m really sorry…
Anyways, I’ve re-create a new topic from my question. Sorry about that…
Thanks
Hi,
I encountered this error
\”A request-response for the \”Submit\” adapter at receive location \”Submit://OT\” has timed out before a response could be delivered\”
Does anyone knows why this happens?
Thanks…
Pipeline components don’t need to be in the GAC. They just need to be in the BizTalk 2004 \\ Pipeline Component folder. Code you call from the pipeline component might need to be though.
Can you see the pipeline in the Tool Box?
No, I have not heard of that problem.
I am also using Team Foundation Server Source Control and I have not had any problems.
I have seen invalid expression shaped for other reasons, like getting Orch Instance ID’s, but not just because it was checked in TFS.
Do you have any policies in place or automated builds?
I thought I heard a while ago that BizTalk would have no support for FTS. Not sure if that’s true or not. Also not sure that no support means.
Please keep me updated on this.
June 7, 2006 at 11:52 PM in reply to: Web Service Error – System.TypeLoadException: Could not load #14810After restarting IIS service and Biztalk server, i got a better error when testing the WS:
Failed to serialize the message part \”part\” into the type \”WebMethod1_GLPart\” using namespace \”\”. Please ensure that the message part stream is created properly.
For the schema used in Web Service, i keep the target namespace blank.
-
AuthorPosts