Java论坛网»Java技术»java调用IIS发布的WEB SERVICES问题
java调用IIS发布的WEB SERVICES问题
问?:
大家好!
哪个有JAVA调用IIS发布的WEB SERVICES的实例程序,
目前我的JAVA程序调用WEB SERVICES的时候,WEB SERVICES端总是收到不连接信息。
代码通讯部分如下:
//Create the connection and the message factory.
SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
SOAPConnection connection = scf.createConnection();
MessageFactory msgFactory = MessageFactory.newInstance();
// Create a message
SOAPMessage soapmessage = msgFactory.createMessage();
// Create an envelope in the message
SOAPEnvelope envelope = soapmessage.getSOAPPart().getEnvelope();
String mStrXsi = "http://www.w3.org/2001/XMLSchema-instance";
String mStrXsd = "http://www.w3.org/2001/XMLSchema";
envelope.addNamespaceDeclaration("xsi", mStrXsi);
envelope.addNamespaceDeclaration("xsd", mStrXsd);
// Get hold of the the body
SOAPBody body = envelope.getBody();
FuncCreateSoapMsg(BusiSend, body, envelope, null ,null);
soapmessage.saveChanges();
System.out.println("\n----------- Request Message ----------\n");
soapmessage.writeTo(System.out);
//Send the message
//String Url = "http://localhost/PowerImAppWeb/resources/ImProcess.jpd"; //web Serivce地址信息
String Url = "http://localhost/WebIbssToInfoService/Info.asmx"; //web Serivce地址信息
SOAPMessage reply = connection.call(soapmessage, Url);
哪个有JAVA调用IIS发布的WEB SERVICES的实例程序,
目前我的JAVA程序调用WEB SERVICES的时候,WEB SERVICES端总是收到不连接信息。
代码通讯部分如下:
//Create the connection and the message factory.
SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
SOAPConnection connection = scf.createConnection();
MessageFactory msgFactory = MessageFactory.newInstance();
// Create a message
SOAPMessage soapmessage = msgFactory.createMessage();
// Create an envelope in the message
SOAPEnvelope envelope = soapmessage.getSOAPPart().getEnvelope();
String mStrXsi = "http://www.w3.org/2001/XMLSchema-instance";
String mStrXsd = "http://www.w3.org/2001/XMLSchema";
envelope.addNamespaceDeclaration("xsi", mStrXsi);
envelope.addNamespaceDeclaration("xsd", mStrXsd);
// Get hold of the the body
SOAPBody body = envelope.getBody();
FuncCreateSoapMsg(BusiSend, body, envelope, null ,null);
soapmessage.saveChanges();
System.out.println("\n----------- Request Message ----------\n");
soapmessage.writeTo(System.out);
//Send the message
//String Url = "http://localhost/PowerImAppWeb/resources/ImProcess.jpd"; //web Serivce地址信息
String Url = "http://localhost/WebIbssToInfoService/Info.asmx"; //web Serivce地址信息
SOAPMessage reply = connection.call(soapmessage, Url);
答!: 1:
up
相关JAVA教程:
关于struts的分页问题
怎样通过JDBC获取表字段的注释信息
JSF+Spring+Hibernate运行时出现no session or session was closed错误:
如何在Servlet里获取客户端证书的相关信息
spring和Hibernate集成时,Session一般是怎样管理的?
有关于HibernateSessionFactory问题
大家帮忙看看这个JSTL的问题,从ArrayList中取得map对象,并迭代出map
读取图片问题
JBOSS打出的错误报告帮忙分析原因,多谢
如何配置LOG4J
struts:No getter method for property Teacher.user of...html.BEAN
有没有人做过协同开发的项目-----关于共享屏幕的问题!小女子在线等待!!