package chongzhi;

import java.net.MalformedURLException;
import java.net.URL;
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 dingdan {
	public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException {
		String targetEendPoint = "http://14.23.90.100/webservice/services/TerminalService?wsdl";   
		Service service = new Service();   
		Call call = (Call) service.createCall();   
		call.setTargetEndpointAddress(new URL(targetEendPoint));   
		  
		call.setOperationName(new QName(targetEendPoint, "directCharge"));
		String request = 
			  "<directCharge>" +
			  "<storeNo>gz711</storeNo>" +
			  "<terminalNo>35170001</terminalNo>" +
			  "<orderNo>22135211222223</orderNo>" +
			  "<cardId>81</cardId>" +
			  "<priceId>1</priceId>" +
			  "<payType>00</payType>" +
			  "<account>zws2</account>" +
			  "<chargeCount>1</chargeCount>" +
			  "<operator>zws</operator>" +
			  "<requestTime>1376038020796</requestTime>" +
			  "<sign>test</sign>" +
			  "</directCharge>" ;
		  
		String result = (String) call.invoke(new Object[]{request});   
		System.out.println(result); 

	}

}
