| Hugo Rodger-Brown 2004-11-10, 7:47 am |
| I don't know about any reference, but if you use the wizard to create a web
service, you can then look at the web project that is generated to see how
the BizTalk API is used by the web service. The code below is an example of
a web method generated by BizTalk that submits a message that conforms to a
schema called "ComponentData":
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://demo/sche
mas/SubmitToBizTalk/SubmitComponent", OneWay=true,
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Default)]
public void
SubmitComponent([System.Xml.Serialization.XmlElementAttribute(Namespace="htt
p://demo.Samples.Component", ElementName="ComponentData")]
BizTalkWebService.XsdTypes1.ComponentData part)
{
System.Collections.ArrayList inHeaders = null;
System.Collections.ArrayList inoutHeaders = null;
System.Collections.ArrayList inoutHeaderResponses = null;
System.Collections.ArrayList outHeaderResponses = null;
System.Web.Services.Protocols.SoapUnknownHeader[] unknownHeaderResponses
= null;
// Parameter information
object[] invokeParams = new object[] {
part};
Microsoft.BizTalk.WebServices.ServerProxy.ParamInfo[] inParamInfos = new
Microsoft.BizTalk.WebServices.ServerProxy.ParamInfo[] {
new
Microsoft.BizTalk.WebServices.ServerProxy.ParamInfo(typeof(BizTalkWebService
..XsdTypes1.ComponentData), "part")};
Microsoft.BizTalk.WebServices.ServerProxy.ParamInfo[] outParamInfos =
null;
string bodyTypeAssemblyQualifiedName = "demo.ComponentData, demo,
Version" +
"=0.1.0.0, Culture=neutral, PublicKeyToken=57bd8d5b444f535f";
// BizTalk invocation
this.Invoke("SubmitComponent", invokeParams, inParamInfos,
outParamInfos, 0, bodyTypeAssemblyQualifiedName, inHeaders, inoutHeaders,
out inoutHeaderResponses, out outHeaderResponses, null, null, null, out
unknownHeaderResponses, true, false);
}
Hope this helps,
Hugo
http://hugo.rodger-brown.com
|