4,579,389 th visitor since 2017.2.1 ( Today : 275 )
Programming
No. 437
Name. swindler
Subject. WebService SOAP_ACTION 세팅
Main Cate. Java
Sub Cate.
Date. 2008-03-31 15:50
Hit. 2966 (203.248.117.3)
File.
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

import javax.xml.namespace.QName;


public class WebServiceClient {

    public void test()
    {
try
{
    String url = "http://210.122.97.114/PAYSRC/WSAdmin/SrvAdmin.asmx";
    url = "http://211.43.206.101:2000/PAYSRC/WSAdmin/SrvAdmin.asmx";
    
    String namespace = "http://tempuri.org/";
    String serviceName = "RefundAdm";
    
    QName serviceQN = new QName(namespace, serviceName);

    //ServiceFactory factory = ServiceFactory.newInstance();
//Service service = factory.createService( wsdlLocation, serviceQN );
    
Service service = new Service();
Call call = (Call)service.createCall();
call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://tempuri.org/RefundAdm");
call.setTargetEndpointAddress(url);
call.setOperationName(serviceQN);
QName q = call.getOperationName();
System.out.println(q.toString());

System.out.println("-----------before invoke");
String ret = (String) call.invoke( new Object[] {"tt", "05102497", "0", "0", "결제취소", "swindler" } );
System.out.println("-----------after invoke");

System.out.println("ret : "+ret);

}catch(Exception e)
{
    System.out.println(e);
    e.printStackTrace();
}
    }
    
    public static void main(String [] args)
    {
        WebServiceClient client = new WebServiceClient();
        
        client.test();
    
    }
}


[바로가기 링크] : http://coolx.net/cboard/develop/437



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog