22 April 2010
Remittance Headaches
20 April 2010
XML: Nillable="True" vs MinOccurs="0"
What you see here is a bunch of elements in an which my coworker is trying to show as null by not including. That is, when, for instance, "address" is null, it simply will not exist in the XML document.
Here's how the same code looks as our vendor expects it.
Now, leaving aside the question of why the only way to pass data to the web method is allowed to be null, we can see that the vendor's wsdl expects the nodes to exist. Therefore, instead of simply leaving out "address" the XML document should contain a node like this: <> It makes sense when you think about it in terms of code as well. How many times in C# do we pass something like "foo = new foo(new bar(), null)?" Is there any question that this is different from "foo = new foo(new bar())"? Not really. (At least, not until C# 2zillion when Microsoft decides that any parameter which can accept a NULL is automatically an optional parameter.) I did manage to help steer the coworker in the right direction, and provided him (as I am you) a pretty good synopsis on this whole thing from IBM's website. Link here. (http://www.ibm.com/developerworks/xml/library/ws-tip-null.html) So, in summary, pay attention to your WSDL and Schemas. Nillable is not the same as MinOccurs="0".
07 April 2010
MS .Toolbox
06 April 2010
WCF WTF: Update
05 April 2010
WCF WTF
26 August 2009
AWOL
09 June 2009
Well, Gee...
- how to: evaluate the inbound filename of a file and make a decision based on that
- how to: establsih and use a Send Port Group
- if multiple send groups are necessary for different types of send ports (e.g. SQL Adapter vs. FILE)
- best practice for sending results to SQL for update, and archive file to seperate folder.
- how to: use SQL Send Adapater
- how to: set up SQL Stored Procedure to INSERT or UPDATE DB instead of only querying
- how to: Configure a .NET assembly/class for use with BizTalk and call it from an orchestration