jaaxis2调用webservice怎么捕获超时异常(即超时了让-小知识
话题:ja axis2 调用webservice 怎么捕获超时异常(即超时了让
问题详情:思路是:用睡眠20秒的方式,Thread.currentThread().sleep(20000)
回答:在axis2.xml可以设置connection超时时间,超时后会抛出AxisFault,直接捕获这个异常就好了。
话题:帮下我 ,我急需Axis2基于web service实现的相关 码以及具
回答:1. 配置tomcat和SOAP引擎 axis2-1.4.1-bin 和axis2-1.4.1-war ,分别解压。 在axis2-1.4.1-war 解压出来的 夹中有一个axis2.war,把它 到“tomcat安装目录/webapps/”目录下,启动Tomcat,即可看到在“tomcat安装目录/webapps/”目录下有个axis2的 夹 在浏览器的 栏中,输入: localhost:00/axis2/,验证axis2安装成功。 2. 简单的Web service程序在Axis2中 简单的POJO, 码如下: public class MyService { public String getHello() { return "hello world"; } public String getName(String name) { return "Hello "+name; } public int getPlus(int a, int b) { return a+b; } } 把编译之后的MyService.
话题:用axis2的 端调用weblogic中的webservice时报错
问题详情:错误 :ja.lang.IllegalArgumentException: Unable to access
回答:自动生成 端试试 。
话题:webservice,axis2做 端,cxf做 端,获取参数总是为
回答:我也遇到这样的问题,后来找到一个回答,我试过后,问题解决了,你试试吧。 (#WebParam(name="i") int i, #WebParam(name="j") int j) axis2调用ja6 的 的时候 方法参数的注解#WebParam需要去掉。 直接把上面的这句删掉或者注释掉。重新 下再调用就OK了 你原来的那个 类参数方法参数都给了注解。是给xfire调用的。如果把方法参数的注解#WebParam 去掉。xfire又会出现参数为空的情况。 还有种办法就是换种调用方式。 原因可能是xfire的wsdl文档 范比axis2在参数这块多 定一些东西。
话题:axis2调用webservice问题
问题详情:最近刚学webservice axis2调用网上的webservice 归
回答:import jax.xml.namespace.QName;import .apache.axiom.om.OMAbstractFactory;import .apache.axiom.om.OMElement;import .apache.axiom.om.OMFactory;import .apache.axiom.om.OMNamespace;import .apache.axis2.AxisFault;import .apache.axis2.addressing.EndpointReference;import .apache.axis2.client.Options;import .apache.axis2.client.ServiceClient;import .apache.axis2.rpc.client.RPCServiceClient;public class test { public static void main(String[] args) throws Exception { 使用RPC方式调用WebService RPCServiceClient ser=new RPCServiceClient(); Options
话题:ja axis2调用webservice问题
问题详情:错误提示:.apache.axis2.AxisFault: Cannot create
回答::listener does not currently know of SID given in connect de or数据库配置错误。
参考回答:你在程序中写个测试方法,看看是不是数据库连接会有中断的情况。
话题:ja适用axis2调用.的webservice时有时报错
问题详情:里面增加了一个段适用axis2调用asmx的webservice 码。调用的
回答:说明网络通讯不正常。有可能当时网络状况不好,读取超时。可以尝试加长超时的时间。网络通讯的程序,有个异常是很正常的。
话题:Axis2调用C#写的WebService
问题详情: 是Axis2写的程序,调用我C#写的WebService。但是 说总
回答:返回正常,调用Helloworld返回:HelloWorld!Thank you! 码如下:package .ehuatai;public class fdsafas { public static void main(String[] args) { try{ ITransferService service=new ITransferServiceLocator(); ITransferServiceSoap soap=service.getITransferServiceSoap(); String str=soap.helloWorld(); System.out.println(str); }catch(Exception err){ err.printStackTrace(); } }}
话题:用ja实现远程调用webservice
问题详情:我需要远程调用webservice。在 却无法识别(我已经将axis2的
回答:Call这个是axis1的调用方式吧,axis2是这样调用的:String url="" 写你 的 String methodString="" 写要调用的方法名Object[] s=null; 方法的参数 EndpointReference targetEPR=new EndpointReference(url); Options options=new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_); options.setAction("urn:"+methodString); HttpTransportProperties.Authenticator auth=new HttpTransportProperties.Authenticator(); RPCServiceClient client=new RPCServiceClient(); client.setOptions(options); Object[] result=client.invokeBlocking(new QName(": services.framewor
参考回答:先用wsdl2ja 生成工具类 后面就简单了网上去搜搜看吧
话题:Axis2的Web
问题详情:现在要将axis1下面的web service通过axis2来实现,改动量是不是
回答:不是AXIOM方式创建的webservice必须返回OMElement,使用其他方式(如ADB)等可以返回简单类型
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-

















































