Hi,
I have been looking online for an answer to this and cant get it solved. Is it possible to consume a third party java soap web service in a .net web page in the below format (this URL is all the 3rd party company has given me). I know how to consume a web service if I have the wsdl...but is it possible using the below URL.
When i go to the URL i get the error - SOAP RPC Router - Sorry, I don't speak via HTTP GET- you have to use HTTP POST to talk to me.
http://companyname/soap/servlet/rpcrouter
I hacked some online code but got 500 error...but Im now wondering if I am way of and if its even possible with just the above URL -
Dim manualWebClient As New System.Net.WebClient()
manualWebClient.Headers.Add("Content-Type", "application/soap+xml; charset=utf-8")
' Note: don't put the <?xml... tag in--otherwise it will blow up with a 500 internal error message!
Dim bytArguments As Byte() = System.Text.Encoding.ASCII.GetBytes( _"<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">" & System.Environment.NewLine & _" <soap12:Body>" & System.Environment.NewLine & _" <Multiply xmlns=""http://cptr446.class/"">" & System.Environment.NewLine & _" <x>5</x>" & System.Environment.NewLine & _" <y>4</y>" & System.Environment.NewLine & _" </Multiply>" & System.Environment.NewLine & _" </soap12:Body>" & System.Environment.NewLine & _"</soap12:Envelope>")
Dim bytRetData As Byte() = manualWebClient.UploadData("http://companyname/soap/servlet/rpcrouter", "POST", bytArguments)
Response.Write(System.Text.Encoding.ASCII.GetString(bytRetData))Thanks for all help...