java客户端调用C++ GSoap生成的webservice
来源:互联网 发布:mac 键盘控制声音 编辑:程序博客网 时间:2024/05/21 19:32
package com.test.webservice.client;import java.rmi.RemoteException;import javax.xml.namespace.QName;import javax.xml.rpc.ServiceException;import org.apache.axis.client.Call;import org.apache.axis.client.Service;public class TestClent {public static void main(String[] args) {try {String endpoint = "http://www.cmsz.com:7088/getdbpwd/getdbpwdservice"; Service service = new Service(); Call call = (Call)service.createCall(); call.setTargetEndpointAddress(endpoint);call.setOperationName(new QName( "urn:getdbpwd", "getdbpwd")); call.addParameter( "pmsDBUser",null,javax.xml.rpc.ParameterMode.IN); call.setReturnClass(String.class); String temp = (String)call.invoke(new Object[]{"pubdba"}); System.out.println("result: " + temp);} catch (ServiceException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (RemoteException e) {// TODO Auto-generated catch blocke.printStackTrace();}}}
对应的WSDL 文件如下:
<?xml version="1.0" encoding="UTF-8"?><definitions name="getdbpwd" targetNamespace="http://www.cmsz.com:7088/getdbpwd/getdbpwd.wsdl" xmlns:tns="http://www.cmsz.com:7088/getdbpwd/getdbpwd.wsdl" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:getdbpwd" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/" xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"><types> <schema targetNamespace="urn:getdbpwd" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:getdbpwd" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/> </schema></types><message name="getdbpwdRequest"> <part name="pmsDBUser" type="xsd:string"/></message><message name="getdbpwdResponse"> <part name="password" type="xsd:string"/></message><portType name="getdbpwdPortType"> <operation name="getdbpwd"> <documentation>Service definition of function ns__getdbpwd</documentation> <input message="tns:getdbpwdRequest"/> <output message="tns:getdbpwdResponse"/> </operation></portType><binding name="getdbpwd" type="tns:getdbpwdPortType"> <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="getdbpwd"> <SOAP:operation style="rpc" soapAction=""/> <input> <SOAP:body use="encoded" namespace="urn:getdbpwd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <SOAP:body use="encoded" namespace="urn:getdbpwd" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation></binding><service name="getdbpwd"> <documentation>gSOAP 2.7.15 generated service definition</documentation> <port name="getdbpwd" binding="tns:getdbpwd"> <SOAP:address location="http://www.cmsz.com:7088/getdbpwd/getdbpwdservice"/> </port></service></definitions>
- java客户端调用C++ GSoap生成的webservice
- java客户端调用C++ GSoap生成的webservice
- gsoap生成webservice调用客户端接口
- gsoap生成webservice调用客户端接口
- gsoap生成webservice调用客户端接口
- gsoap生成webservice调用客户端接口
- gsoap生成webservice调用客户端接口 .
- gsoap生成webservice调用客户端接口
- java通过wsdl2java工具生成生成客户端调用c#.net做的webservice
- Linux下gSOAP生成webservice客户端代码 的使用心得
- gsoap(C/C++调用webservice)
- gsoap(C/C++调用webservice)
- gsoap(C/C++调用webservice)
- gsoap(C/C++调用webservice)
- gsoap(C/C++调用webservice)
- gsoap客户端调用几个webservice服务
- C++客户端通过gSOAP调用WebService
- C++客户端通过gSOAP调用WebService
- fopen函数
- 实现将student中的所有信息在一个模板页上显示,格式参考课件中的图片。并实现编辑功能。
- 修改Action类不重启tomcat方法 .
- Android应用开发图片异步加载
- flyweight pattern -- 享元模式
- java客户端调用C++ GSoap生成的webservice
- linux的nohup命令的用法
- 24/16/8位bmp图片文件头、信息头的二进制数据
- 关于网络编程的一些笔记
- SAP 收货时,根据信息记录中的价格段来控制收货价格
- More Effective C++读书笔记15
- Mysql,SqlServer,Oracle主键自动增长的设置
- libsvm初步入门
- Collocations in Mahout阅读理解