Consuming web service with complex types
- From: "Jeremy Chapman" <please@Idontlikespam>
- Date: Wed, 21 Jun 2006 13:59:30 -0700
I've built a web service method which takes a few strings and a complex type
(I've included the relavent code below). I've added the web reference to my
biztalk project, and created the request and response messages in the
orchestration. I've dropped a construct message shape and put a message
assignment shape inside it. My problem is when I'm building the expression
I can set the string properties of the message, but not the promperties of
the complex type Patient.
My expression looks like this:
msgRequest.User = "testuser";
msgRequest.DocumentSource = "testsource";
msgRequest.PatientIdentity.Value = "testvalue"
The design time error occures on the last line of the expression at the word
Value. The error is "identifier 'Value' does not exist in
'msgRequest.PatientIdentity' are you missing an assembly reference?"
Why can I not access properties of that complex type?
Web method code is below:
[WebMethod]
public InteriorHealth.Schema.ResultValue UploadDocument(string User, string
DocumentSource, PatientIdentifier Patient)
{ ..}
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.test.ca/Schema")]
[System.Xml.Serialization.XmlRootAttribute("PatientIdentity",
Namespace="http://www.test.ca/Schema", IsNullable=false)]
public class PatientIdentifier
{
[System.Xml.Serialization.XmlAttributeAttribute()]
public PatientIdentifierType Type;
[System.Xml.Serialization.XmlAttributeAttribute()]
public string Value;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.test.ca/Schema")]
public enum PatientIdentifierType
{
PHN,
MRN,
}
.
- Follow-Ups:
- Re: Consuming web service with complex types
- From: Greg Forsythe
- Re: Consuming web service with complex types
- From: BizTalkVirtuoso
- Re: Consuming web service with complex types
- Prev by Date: RE: Biztalk 2006 Tutorial 3
- Next by Date: RE: Biztalk 2006 Tutorial 3
- Previous by thread: Biztalk 2004: How to pass database facts from C# code?
- Next by thread: Re: Consuming web service with complex types
- Index(es):
Relevant Pages
|