第一次接触使用delph7调用java接口,发布XML格式报文 ,求高手指导,最好有个例子,感谢不尽!

jcxhan 2017-03-25 06:23:50
接口测试地址
测试地址:http://223.68.184.9:8084/DAQItem/services/CallUniversalService
维修厂编号:32101594
验证用户名:antj_01
验证密码:antj_01pass2016
...全文
917 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lyhoo163 2017-04-06
  • 打赏
  • 举报
回复
jcxhan 2017-03-27
  • 打赏
  • 举报
回复
已连接成功,下面还有更多问题麻烦大家。谢谢。
jcxhan 2017-03-25
  • 打赏
  • 举报
回复
delphi 客户端自动生成了webserive的访问代码 // ************************************************************************ // // The types declared in this file were generated from data read from the // WSDL File described below: // WSDL : http://223.68.184.9:8084/DAQItem/services/CallUniversalService?wsdl // Encoding : UTF-8 // Version : 1.0 // (2017-03-22 21:47:58 - 1.33.2.5) // ************************************************************************ // unit CallUniversalService1; interface uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns; type // ************************************************************************ // // The following types, referred to in the WSDL document are not being represented // in this file. They are either aliases[@] of other types represented or were referred // to but never[!] declared in the document. The types from the latter category // typically map to predefined/known XML or Borland types; however, they could also // indicate incorrect WSDL documents that failed to declare or import a schema type. // ************************************************************************ // // !:string - "http://www.w3.org/2001/XMLSchema" // ************************************************************************ // // Namespace : http://service.rong // transport : http://schemas.xmlsoap.org/soap/http // style : document // binding : CallUniversalServiceSoapBinding // service : CallUniversalServiceService // port : CallUniversalService // URL : http://223.68.184.9:8084/DAQItem/services/CallUniversalService // ************************************************************************ // CallUniversalService = interface(IInvokable) ['{2D7FAF1F-C142-A89F-21C5-D321BCA855EA}'] function readStringXml(const x: WideString): WideString; stdcall; end; function GetCallUniversalService(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): CallUniversalService; implementation function GetCallUniversalService(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): CallUniversalService; const defWSDL = 'http://223.68.184.9:8084/DAQItem/services/CallUniversalService?wsdl'; defURL = 'http://223.68.184.9:8084/DAQItem/services/CallUniversalService'; defSvc = 'CallUniversalServiceService'; defPrt = 'CallUniversalService'; var RIO: THTTPRIO; begin Result := nil; if (Addr = '') then begin if UseWSDL then Addr := defWSDL else Addr := defURL; end; if HTTPRIO = nil then RIO := THTTPRIO.Create(nil) else RIO := HTTPRIO; try Result := (RIO as CallUniversalService); if UseWSDL then begin RIO.WSDLLocation := Addr; RIO.Service := defSvc; RIO.Port := defPrt; end else RIO.URL := Addr; finally if (Result = nil) and (HTTPRIO = nil) then RIO.Free; end; end; initialization InvRegistry.RegisterInterface(TypeInfo(CallUniversalService), 'http://service.rong', 'UTF-8'); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(CallUniversalService), ''); InvRegistry.RegisterInvokeOptions(TypeInfo(CallUniversalService), ioDocument); end. java 调用接口例子: 接口调用示例: /**调接口测试 * @param args * @throws AxisFault */ public static void main(String[] args) throws AxisFault { // TODO Auto-generated method stub // 使用RPC方式调用WebService RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); // 指定调用WebService的URL (目前为测试地址) EndpointReference targetEPR = new EndpointReference("http://223.68.184.9:8084/DAQItem/services/CallUniversalService"); options.setTo(targetEPR); // 指定要调用的计算机器中的方法及WSDL文件的命名空间: QName opAddEntry = new QName("http://service.rong","readStringXml"); // 参数 String xml = "调用接口需要传输的xml参数"; Object[] opAddEntryArgs = new Object[] {xml}; // 调用plus方法并输出该方法的返回值 Class[] classesa = new Class[] {String.class }; String rest=(String) serviceClient.invokeBlocking(opAddEntry,opAddEntryArgs, classesa)[0]; try { System.out.println(URLDecoder.decode(rest.toString(), "utf-8")); } catch (UnsupportedEncodingException e) { // TODO 自动生成的 catch 块 e.printStackTrace(); } }
摘 要 随着互联网影视产业的迅速发展,电影资源呈指数级增长,类型也愈加多样化,但是用户面对如此庞大的影片库时,会遇到信息过载、筛选效率低下、观影决策成本高这些难题,而传统的电影平台大多只是对基本的分类和热度进行展示,并没有提供个性化的推荐服务,社交互动以及一体化管理的能力也比较薄弱。 该系统使用的是Spring Boot+Vue前后端分离的方式进行开发,设计并开发了一个电影推荐和评论系统。开发系统中存在三个问题,即无法准确地判断出用户的喜好、电影推荐功能上线之初没有用户数据,因此推荐效果不佳、大量用户同时评论打分时系统容易出现不稳定的情况。为了克服上述问题,本文查阅相关资料,不断迭代开发原型,并进行实际测试,完成整个系统的全部过程,即系统需分析、架构设计、功能开发、系统测试。系统分为普通用户和管理员两种身份,具有注册登录、电影浏览、电影推荐、评分评论、影片收藏、个人中心、后台管理等功能,采用结合用户喜好和电影热度的简单推荐方式,提供热门电影推荐和个性化推荐,很好地解决了推荐功能初始没有数据、数据较少的问题。项目用接口来完成前后端的数据交互,使用MySQL数据库存储用户、电影、评论、收藏等各种数据,并且加入权限验证、密码加密等安全措施,保证系统安全稳定并且便于后期扩展。除此之外,系统还增加了电影资讯查看、首页轮播图设置、编辑资讯等功能,使整个电影平台的服务更加全面,使用更加高效。经过全面的功能测试、接口测试和性能测试,系统各个模块运行稳定,推荐接口响应时间小于300ms,主要的互动操作成功率大于98%,可以大大降低用户的选片成本,提高观影决策的速度和社区互动的效果。 本文给出一套轻量级、易部署、可复用的电影推荐类Web应用工程实现方案,相比于传统的单一列表展示型平台,个性化服务、社交互动体验和后台管理效率都有明显的提高,可以给影视文化数字化传播、推荐算法轻量化工程实践

1,594

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧