Axis2引用发布服务

Posted on 2009-07-14 14:21 eric_xu 阅读(246) 评论(0)  编辑  收藏 所属分类: J2EE

wsdl生成客户端

Wsdl2java –uri http://localhost:8080/axis2/services/SimpleServer?wsdl –o d:" -d jaxbri

将生成的java文件拷贝到工程的src文件夹下

public class WsTest {

    
/**
     * 
@param args
     * 
@throws RemoteException 
     
*/
    
public static void main(String[] args) throws RemoteException {
        
// TODO Auto-generated method stub
        SimpleServerStub ssstub = new SimpleServerStub();
        SimpleMethod sm 
= new SimpleMethod();
        sm.setName(
"xujun");
        SimpleMethodResponse response 
= ssstub.simpleMethod(sm);
        String result 
= response.get_return();
        System.out.println(result);
    }

}

只有注册用户登录后才能发表评论。


网站导航:
 

posts - 37, comments - 5, trackbacks - 0, articles - 0

Copyright © eric_xu