Facing Error while calling java Web service from Asp.net
I have given a work with calling a web service (i.e written in Java) from asp.net application. the web service URL http://clyde.tmpws01.net:8080/transflow_dstv_rtpp/services/TransflowRTPPService?wsdl
I have added Web reference in My project for above URL and written the following code to call consume the web service
Transflow.TransflowRTPPService service = new Transflow.TransflowRTPPService();
Transflow.SubmitTransactionResponse response = new Transflow.SubmitTransactionResponse();
response = service.submitTransaction(false, true, 1002, true, "12345678", "XYZ", 15200.32, true, "INR", "cash", "C", "12", "0000", "1234567890", "Nitesh", 2, true, "Hello");
When i run this code im getting following Error
Client found response content type of 'text/html', but expected 'text/xml'.
The request failed with the error message:
--
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "htt开发者_开发技巧p://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<TITLE>The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
<meta http-equiv="REFRESH" content="0;url=http://ultra_error"></HEAD>
<BODY>
</BODY>
What could be causing this problem?
You are most likely getting this error because the web service is havign an error and sending you to some form of html error page. This means that your client is getting an html response rather than xml. Try and use fiddler (google fiddler2) and you should be able to see the post you make and the response you get.
精彩评论