您的位置:首页 > 其它

cxf生成的webService,注解/注释自动生成的webService

2017-01-15 15:04 183 查看
cxf生成的webService,注解/注释自动生成的webService:
1.注释掉无参的构造方法 eg:  

 //    public PushEBIFromCNEBServiceImpl() {
//        super(WSDL_LOCATION, SERVICE);
//    }
//   
//    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
//    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
//    //compliant code instead.
//    public PushEBIFromCNEBServiceImpl(WebServiceFeature ... features) {
//        super(WSDL_LOCATION, SERVICE, features);

                    //    }
2.注释掉静态static块eg:

//    static {
 //        URL url = null;
//        try {
//            url = new URL("http://192.168.2.182:8089/yjgl/PushEBIFromCNEBServiceImpl?wsdl");
//        } catch (MalformedURLException e) {
//            java.util.logging.Logger.getLogger(PushEBIFromCNEBServiceImpl.class.getName())
//                .log(java.util.logging.Level.INFO,
//                     "Can not initialize the default wsdl from {0}", "http://192.168.2.182:8089/yjgl/PushEBIFromCNEBServiceImpl?wsdl");
//        }
//        WSDL_LOCATION = url;

//    }
3.注释掉wsdllocation
eg:
 @WebServiceClient(name = "PushEBIFromCNEBServiceImpl",

                 // wsdlLocation = "http://192.168.2.182:8089/yjgl/PushEBIFromCNEBServiceImpl?wsdl",
                  targetNamespace = "http://impl.service.server.ws.webservice.receive.adaptor.adc.taiji.com/") 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: