阅读背景:

java客户端调用C++ GSoap生成的webservice

来源:互联网 
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 = "https://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 block
			e.printStackTrace();
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}package com.test.webservice.client;

import jav



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: