BizTalk Server Applications Integration - Web services publishing without using bizTalk wizard

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Applications Integration > November 2004 > Web services publishing without using bizTalk wizard





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Web services publishing without using bizTalk wizard
Aniello

2004-11-10, 7:47 am


Hi all,
Is it possible to make the same operations of BizTalk "web service
publishing wizard" using BizTalk API and c# code? If yes where can I find
reference on this topic?

Thanks,
Aniello.


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


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com