首先是调用时有什么异常信息? 其次是你可以打开Tuscany的源代码看一下它的实现,来验证一下你的想法.WebService Binding那块的代码.
我们现在使用RMI和Hessian都没有问题,WebService只是开始时尝试过,后面没有再使用. 基于标准来看,应该是不会有什么问题. good luck. 2010/11/30 lili <[email protected]>: > 首先非常感谢您的答复,而且您是中国人我解释起来就更方便,还想让您帮助一下! > 对于第二个问题,我用标准的axis客户端也是可以调通的,但是用axis2的RPCClient来调,直接引用invokeBlocking方法行不通,参数值传递不过去,代码如下: > RPCServiceClient serviceClient = new RPCServiceClient(); > Options options = serviceClient.getOptions(); > // 指定调用WebService的URL > EndpointReference targetEPR = new EndpointReference( > "http://10.10.39.111:8088/TrainTimeService/services/TrainTimeService"); > options.setTo(targetEPR); > options.setProperty(HTTPConstants.CHUNKED,"false"); > options.setTimeOutInMilliSeconds(100000); > Person person = new Person(); > person.setName("Jack"); > person.setSex("man"); > Object[]opAddEntryArgs = new Object[]{person}; > // 指定要调用的方法及WSDL文件的命名空间 > QName opAddEntry = new > QName("http://traintimeservice.webservice.comtop.com","getPersonName"); > // 调用方法并输出该方法的返回值 > > System.out.println(serviceClient.invokeBlocking(opAddEntry,opAddEntryArgs).getFirstElement().getText().toString()); > > > 其中wsdl文件中也是有对于Person类型的schema描述,wsdl文件见附件。 > 我个人觉得在SCA中使用这个webservice作为引用时,走的也是axis的RPCClient,请帮忙看一下有什么办法?非常感谢!!! > 还有就是内部使用复杂对象传输是用什么方法能不能示例一下?能不能给我个您的方便电话联系方式,太需要您的帮助!呵呵! > > > At 2010-11-30 17:29:19,"Knight Chen" <[email protected]> wrote: > >>1.you can check the WSDL that Tuscany service generated. and compare them. >>There is some different with them. >> >>I have encountered some proble when I use 3rd application to invoke >>Tuscany web service, >>but when i add @WebService,there is OK. >> >>I suggest you can write a custom WSDL to describe the 3rd Web Service >>you want to call ,and try again. >> >> >>2.In java, use standard web service client to post your custom complex >>object to Web Service is OK.(Axis) >>other application may ok with same way. >> >>I think there is no need with some tuscany config. >> >>------------------------ >>我目前项目使用的情况是都很正常,不过没有试过导入其他应用的WSDL,目前没有空研究. >>对于内部应用都是足够使用的,而且传输复杂对象也都没有问题. >>不过我们的应用已经把WebService替换成Hessian,出于调用效率的考虑. >> >> >>祝你好运. >> >> >>2010/11/30 lili <[email protected]>: >>> Dear, >>> I am a programmer of China, as a new one in using SCA I >>> encountered some problems when using SCA, I really need your Help. >>> I have mainly two problems as follows: >>> 1. I have established an SCA project, a service in this project's >>> composite file has a reference ,which is binding to a remote webservice that >>> is writed in C Sharp, I can not access this webservice, it has an exception >>> about axis when I use the service. I want to ask that if there is the way to >>> set some options of the webservice or other method to solve the problem? >>> The url address of the webservice is >>> http://www.webxml.com.cn/WebServices/WeatherWebService.asmx, and its wsdl >>> file address is >>> http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl. >>> 2. The second problem is that , in SCA project ,I use a reference in a >>> service ,and the reference is binding to a native webservice, the parameter >>> of the method in this webservice is an complex object,such as a java class >>> :Person, I want to ask how can I transfer the right parameter to the method >>> so that I can use the method of the webservice? To set the format of the >>> parameter ? Or add other options of the service? Or add something to the >>> SCA? >>> >>> I have found the answers for many times but I haven't , I hope >>> you can give me help very much! I will wait for your good news! Thanks very >>> much for you all! >>> >>> >>> >>> yours, Lily >>> >>> ________________________________ >>> 网易163/126邮箱百分百兼容iphone ipad邮件收发 >> >> >> >>-- >>======================== >>Knight Chen > > > ________________________________ > 网易163/126邮箱百分百兼容iphone ipad邮件收发 -- ======================== Knight Chen
