Hi,
My aim is to submit message from Asp.Net app to BTS using HTTP Receive
adapter. For that following is the code I have written
protected void Button1_Click(object sender, EventArgs e){
string xmlTemplate = "<ImportListRequest><ImportList><MapFile>Map.xml</MapFile><DataFile>mydata.csv</DataFile><ImportList></ImportListRequest>";
string requestlocation = "http://localhost/HTTPReceive/BTSHTTPReceive.dll";
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.PreserveWhitespace = true;
xmlDocument.LoadXml(xmlTemplate);
try
{
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(requestlocation);
request.Method = "POST";
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] requestData = encoding.GetBytes(xmlDocument.OuterXml);
request.ContentType="application/x-www-form-urlencoded";
request.ContentLength = xmlDocument.OuterXml.Length;
Stream requestStream = request.GetRequestStream();
requestStream.Write(requestData,0,requestData.Length);
requestStream.Flush();
requestStream.Close();
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
StreamReader responseData = new StreamReader( response.GetResponseStream());
Response.Write(System.Web.HttpUtility.HtmlEncode(responseData.ReadToEnd());
}
catch (WebException wex)
{
//unable to complete web request;
}
}
1. I have created a vir directory for the same called as HttpReceive.
2. I copied BTSHTTPReceive.dll to Httpreceive in c:/tutorial/Lessons/ImportListSolution/HttpReceive
3. I created new app in BTS Admin Console and configured Receive
location with Http Adapter
virtual directory plus isapi extension : /HttpReceive/BTSHTTPReceive.dll
Public address : http://localhost/HttpReceive/Default.aspx
I get the following error from { EVENT VIEWER}
There was a failure executing the receive pipeline:
"Microsoft.BizTalk.DefaultPipelines.XMLReceive,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive
Port: "ReceivePort7" URI: "/HttpReceive/BTSHTTPReceive.dll" Reason:
Finding the document specification by message type "ImportListRequest" failed. Verify the schema deployed properly.
Please let me know what should I do
First correct answer will be rewarded with $100 XMas Gift card!!!
THX
RAJ