We have a simple orchestration. It Receives and inbound XML file ("C:\Input\inbound.xml"), calls an ASMX web service (through a typical "Web reference"), and Sends the response message to disk ("C:\Output\{messageid}.xml"). Very typical.
Problem is, when we look at any given message being returned, either in the location of the Send port or through HAT message tracking, the XML is only partially there... that is, the web service's response type is a "custom .NET class" that includes 5 or 6 layers of "parent object-child collection-child object" hierarchy, and only the first couple layers of parents/children are being returned.
If I call the same service from a simple WinForm test harness, all the data is there, as is evidenced through the Watch window, i.e., it's able to recreate the entire response message as a .NET object instance (of the proxy classes), and it includes all levels of parent/children. So I don't think it's what the service is returning - I think it's what BizTalk is seeing (or not seeing.)
One thing I thought it might have something to do with is the fact that the "custom .NET class", the return type of the service method, does inherit from another class... problem with this theory is that the inherited properties are coming through just fine... it's the properties of the inheriting class that don't come through, of which there is exactly one, and it is a custom Type that inherits from "List<>".
So:
[
DataContract(Namespace = "http://Xyz.DataContracts/2007/07", Name = "EnrollmentFeedDataContract")] public partial class EnrollmentFeedDataContract : MemberDataContract{
private Bop.DataContracts.FsaEnrollmentListDataContract FsaEnrollmentListField;
[
DataMember(IsRequired = true, Name = "FsaEnrollmentList")] public Bop.DataContracts.FsaEnrollmentListDataContract FsaEnrollmentList{
get { return FsaEnrollmentListField; } set { FsaEnrollmentListField = value; }
}
}
(FsaEnrollmentListDataContract is the type that inherits from "List<>", and in the resulting XML response, is the piece that is missing... the properties of MemberDataContract, not shown here, do come through in the XML. I don't actually think it has to do with the fact that it's a collection/list, as there is a simple DateTime property that also doesn't make it to BizTalk.)
(You'll notice the WCF attributes, though I've been talking about it as an ASMX web service. It started off as WCF, but we're using BizTalk without R2 and so I put an ASMX facade over the underlying functionality. Which works pretty well in every other way I've used it - just not in a BizTalk orchestration.)
Another wrinkle... After the "Send" to "C:\Output", which should output the raw XML received, I have another step in the orchestration to do a transform from the response schema to a different schema, and a simple "Send to disk" again. If I look in the Orchestration Debugger, the construct/transform and following steps are never performed. BizTalk never shows any errors for any of it.
It's all very strange to me. I've tried playing with schemas, updating the web reference, using System.Xml.* attributes on the properties (such as XmlElement (nullable=false) and so on, but haven't been able to get missing child elements to ever show up.
If anyone has any idea what I'm talking about and better yet has any idea what's going on here, your help is very much appreciated.
Thanks.
- Jesse