基于pi的webservice发布实例

基于pi的webservice发布实例

ID:15294020

大小:172.77 KB

页数:10页

时间:2018-08-02

基于pi的webservice发布实例_第1页
基于pi的webservice发布实例_第2页
基于pi的webservice发布实例_第3页
基于pi的webservice发布实例_第4页
基于pi的webservice发布实例_第5页
资源描述:

《基于pi的webservice发布实例》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、基于PI的Webservice发布实例分类:ABAPPI2011-08-2121:221442人阅读评论(1)收藏举报最近的项目中,接口较多,而Webservice技术是主要实现方式之一。下面以项目中的一个具体实例来体验一下基于PI的Webservice发布。业务场景SAP系统实时接收一个外围接口系统(基于Web的电子商务平台)回传的数据。技术分析由于同步要求较高,数据量偏小,采用Webservice实现较为合理。实例演示创建好自建表,用于接收回传的数据: TC:SPROXY根据集成组在PI配置

2、的服务名创建ServiceInterface 在实现类中,根据传入的XML字符串,解析后更新到自建表:  data: ls_field_data like zmmjyh_cdif,        lt_field_data like table of ls_field_data,        ls_zmmjyh_ht_0007 like zmmjyh_ht_0007,        lt_zmmjyh_ht_0007 like table of ls_zmmjyh_ht_0007,      

3、  l_retcode type i,        l_fieldname type string,        l_float type f.   field-symbols:  type any,                  type any.   "解析XML数据到通用内表  type-pools: ixml.  types: begin of t_xml_line ,  data(256) type x,  end of

4、 t_xml_line.   data: l_ixml            type ref to if_ixml,        l_streamfactory   type ref to if_ixml_stream_factory,        l_parser          type ref to if_ixml_parser,        l_istream         type ref to if_ixml_istream,        l_document     

5、   type ref to if_ixml_document,        l_node            type ref to if_ixml_node,        l_xmldata         type string.   data: l_elem            type ref to if_ixml_element,        l_root_node       type ref to if_ixml_node,        l_next_node    

6、   type ref to if_ixml_node,        l_name            type string,        l_iterator        type ref to if_ixml_node_iterator.   data: l_xml_table       type table of t_xml_line,        l_xml_line        type t_xml_line,        l_xml_table_size  type

7、 i. * Creating the main iXML factory  l_ixml = cl_ixml=>create( ). * Creating a stream factorya  l_streamfactory = l_ixml->create_stream_factory( ).   l_istream = l_streamfactory->create_istream_string( string = input ). * Creating a document   l_doc

8、ument = l_ixml->create_document( ). * Create a Parser   l_parser = l_ixml->create_parser( stream_factory = l_streamfactory                                    istream        = l_istream                                    document       = l_document ).

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。