当前位置: 技术问答>java相关
Webservice 中 用动态生成客户端的方法调用时出现错误。
来源: 互联网 发布时间:2017-03-31
本文导语: 调用代码如下: URL wsdlUrl = new URL(/tech-qa-java/strUrlString/index.html); ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service queryService = serviceFactory.createService(wsdlUrl,new QName(strNameSpace, strServiceName))...
调用代码如下:
URL wsdlUrl = new URL(/tech-qa-java/strUrlString/index.html);
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service queryService = serviceFactory.createService(wsdlUrl,new QName(strNameSpace, strServiceName));
QueryAWIF queryAW = (QueryAWIF) queryService.getPort(new QName(strNameSpace, strPortName),ces.archive.ws.queryAW.QueryAWIF.class);
出错代码如下:
java.lang.NoSuchMethodError
at com.sun.xml.rpc.wsdl.parser.Util.verifyTagNSRootElement(Util.java:59)
at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.java:191)
at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.java:165)
at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitions(WSDLParser.java:96)
at com.sun.xml.rpc.wsdl.parser.WSDLParser.parse(WSDLParser.java:91)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:85)
at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:77)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.getModel(ServiceInfoBuilder.java:96)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:59)
at com.sun.xml.rpc.client.dii.ConfiguredService.(ConfiguredService.java:44)
at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:32)
at ces.system.roledefine.ws.Web_Service.getInfo(Web_service.java:66)
at ces.system.roledefine.ws.Web_Service.main(Web_service.java:190)
Exception in thread "main"
谢谢了。
URL wsdlUrl = new URL(/tech-qa-java/strUrlString/index.html);
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service queryService = serviceFactory.createService(wsdlUrl,new QName(strNameSpace, strServiceName));
QueryAWIF queryAW = (QueryAWIF) queryService.getPort(new QName(strNameSpace, strPortName),ces.archive.ws.queryAW.QueryAWIF.class);
出错代码如下:
java.lang.NoSuchMethodError
at com.sun.xml.rpc.wsdl.parser.Util.verifyTagNSRootElement(Util.java:59)
at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.java:191)
at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.java:165)
at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitions(WSDLParser.java:96)
at com.sun.xml.rpc.wsdl.parser.WSDLParser.parse(WSDLParser.java:91)
at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:85)
at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:77)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.getModel(ServiceInfoBuilder.java:96)
at com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(ServiceInfoBuilder.java:59)
at com.sun.xml.rpc.client.dii.ConfiguredService.(ConfiguredService.java:44)
at com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:32)
at ces.system.roledefine.ws.Web_Service.getInfo(Web_service.java:66)
at ces.system.roledefine.ws.Web_Service.main(Web_service.java:190)
Exception in thread "main"
谢谢了。
|
我在JBuilder下也出现这样的错误,
后来我放在tomcat下也就好了。
后来我放在tomcat下也就好了。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。