java.io.IOException: Server returned HTTP response code: 500 for URL: http://10.235.202.170:53088/00.0001.O_OtherBusi_serviceHandler
这是什么意思呀?
String s = ""+
"soapenv:Header"+
""+
""+
"00.0001.06"+
"10.0001.Inmspss_smsSend"+
"00.0001.06201511171300550001234567890"+
"20151117130055000"+
""+
"V0.1"+
""+
""+
""+
""+
""+
""+
""+
"/soapenv:Header"+
"<soapenv:Body>"+
/*"<![CDATA["+
"<phoneNums>13311568558</phoneNums>"+
"<sendTime>2015-11-17 10:59:25</sendTime>"+
"<smsContent>aawawawaaw</smsContent>"+
"<systemId>admin20151026170721234<systemId>"+
"<systemName>admin</systemName>"+
"<smsId/>"+
"]]>"+*/
"</soapenv:Body>"+
"</soapenv:Envelope>";
String kk = a.invokeSoap(s,"http://10.235.202.170:53088/00.0001.O_OtherBusi_serviceHandler","mixedSendSms");
我的jsp中是以上这么写的
public class MobileCheck1 {
public static String invokeSoap(String input,String url,String action)throws Exception{
String output = "";
URL URL = new URL(url);
HttpURLConnection con = (HttpURLConnection) URL.openConnection();
con.setConnectTimeout(120000);
con.setDoOutput(true);
con.setRequestProperty("Pragma:", "no-cache");
con.setRequestProperty("Cache-Control", "no-cache");
con.setRequestProperty("Content-Length", String.valueOf(input
.length()));
con.setRequestProperty("Content-Type", "text/xml;charset=gb2312");
con.setRequestProperty("SOAPAction", action);
con.setRequestProperty("Accept-Charset", "gb2312");
con.setUseCaches(false);
con.setRequestMethod("POST");System.out.println(")))))))))))))))))))))))))))))))))"+"运行到这里了1");
con.connect();System.out.println(")))))))))))))))))))))))))))))))))"+"运行到这里了13");
if (input != null)
{
con.getOutputStream().write(input.getBytes());
con.getOutputStream().flush();
con.getOutputStream().close();
}
try {
InputStream in = con.getInputStream();
if (in != null)
{
InputStreamReader is = new InputStreamReader(in,"gb2312");
BufferedReader br = new BufferedReader(is);
String s;
while ((s = br.readLine()) != null)
{
output += s;
}
br.close();
in.close();
}
} catch (Exception e) {
e.printStackTrace();
System.out.println("调用 con.getInputStream() 是出现异常,异常信息:"+e.getMessage());
}
System.out.println("))))))))))))))output"+output);
return output;}
我的java中是以上这么写的
String s = ""+
"soapenv:Header"+
""+
""+
"00.0001.06"+
"10.0001.Inmspss_smsSend"+
"00.0001.06201511171300550001234567890"+
"20151117130055000"+
""+
"V0.1"+
""+
""+
""+
""+
""+
""+
""+
"/soapenv:Header"+
"<soapenv:Body>"+
/*"<![CDATA["+
"<phoneNums>13311568558</phoneNums>"+
"<sendTime>2015-11-17 10:59:25</sendTime>"+
"<smsContent>aawawawaaw</smsContent>"+
"<systemId>admin20151026170721234<systemId>"+
"<systemName>admin</systemName>"+
"<smsId/>"+
"]]>"+*/
"</soapenv:Body>"+
"</soapenv:Envelope>";
String kk = a.invokeSoap(s,"http://10.235.202.170:53088/00.0001.O_OtherBusi_serviceHandler","mixedSendSms");
这是我在jsp中写的