Has anyone ever managed to set up SOAP communication with WSI from a Visual Studio c++ / dotnet application? I've been banging on this on and off for a couple of weeks now with and endless succession of "error 500" returns from SOAP requests via the WebRequest class. It's like playing 20 questions with a mime. Requests for help from the vendor have all resulted in variations of "ask on the forum, because we don't care." WSI may be great for internal ASPDNSF use, but making it useful from ASP or C++ .net apps appears to be incompletely documented.

Code fragment:

String ^check_string=gcnew String(SES_POST_TO_ASPDNSF_WSI_URL);
try
{
//Submit the information
WebRequest ^request = WebRequest::Create(check_string);
request->Method="POST";
request->ContentType="\"text/xml; charset=utf-8\""; request->Headers->Add("SOAPAction","http://www.aspdotnetstorefront.com/DoItUsernamePwd");
//fill the xml string - grabs a text file including XML that works from ASPDNSF WSI test client app
xml_lines=read_external_file_into_string("wsitest. txt",xml_string);
String ^postData=gcnew String(xml_string);//
array<Byte>^byteArray = Encoding::UTF8->GetBytes(postData);
request->ContentLength=byteArray->Length;
Stream ^dataStream=request->GetRequestStream();
dataStream->Write(byteArray,0,byteArray->Length);
dataStream->Close();
//barfs with generic error on line below
WebResponse ^response=request->GetResponse();
dataStream = response->GetResponseStream();
StreamReader ^reader=gcnew StreamReader(dataStream);
String ^responseFromServer=reader->ReadToEnd();
//
//commented logic
//
reader->Close();
dataStream->Close();
response->Close();
}
//exception handler follows
catch ( WebException^ e )
{
//exception handling code
}