kahlua001 Posted October 4, 2005 Posted October 4, 2005 Hi, I have a webservice that has one method and takes in a string as a paramter, pretty simple. On my client app, I build the soap envelop and post it using HttpWebRequest but I'm getting a Internal Server 500 Error, any clue to what i'm doing wrong? WSDL is not an option for me here. Dim strSoap As String strSoap = "<?xml version=""1.0"" encoding=""utf-8""?>" & vbCrLf & _ "<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & vbCrLf & _ " <soap:Body>" & vbCrLf & _ " <submitCarriersStatus xmlns=""http://beta.webservices.netcour.com/fedex"">" & vbCrLf & _ " <strXML>" & str214 & "</strXML>" & vbCrLf & _ " </submitCarriersStatus>" & vbCrLf & _ " </soap:Body>" & vbCrLf & _ "</soap:Envelope>" Dim req As HttpWebRequest = WebRequest.Create("http://tempuri/fedex/FedExStatusTest.asmx") req.Headers.Add("SOAPAction", "http://tempuri/fedex/submitCarriersStatus") req.Method = "POST" req.Accept = "text/xml" req.ContentLength = strSoap.Length req.ContentType = "text/xml" Dim sw As New StreamWriter(req.GetRequestStream) sw.Write(strSoap) sw.Close() Dim resp As HttpWebResponse = req.GetResponse Dim strResp As String = "" Dim sr As New StreamReader(resp.GetResponseStream) strResp = sr.ReadToEnd sr.Close() Quote
Nate Bross Posted October 4, 2005 Posted October 4, 2005 It sounds like you may have friendly http errors enabled. Try going to (Internet Explorer) Tools -> Options -> Advanced -> Disable Friendly HTTP errors that should give more detailed information than just internal server error. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
kahlua001 Posted October 4, 2005 Author Posted October 4, 2005 You mean in IE? I am using vb.net to send a request, the error that gets returned is a 500 server error, not using IE Quote
Nate Bross Posted October 4, 2005 Posted October 4, 2005 Sorry. I misunderstood. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Administrators PlausiblyDamp Posted October 4, 2005 Administrators Posted October 4, 2005 Can you step through the web service code in a debugger? If so see where it fails as a 500 error is a bit vague as to the problem itself. Also, just out of curiosity more than anything, is there a reason why WSDL isn't an option? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
kahlua001 Posted October 4, 2005 Author Posted October 4, 2005 What I'm doing is trying to use a wsdl from a web service on a Tibco server. The company who owns that Tibco server sent me a wsdl which .Net does not like, all sorts of name space errors and datatype missing errors which I tried to adapt to .Net friendly stuff, but in the end, wasted too much time and not getting it just right. So we dumped the idea and I went straight to constructing the soap message and sending them the data via a HttpWebRequest. On a side note, does anybody know of any differences between Java world wsdl and Microsoft world wsdl? You would think this should be universal... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.