demo Functionwebserviceproxyby oceandemo.docx

上传人:b****8 文档编号:10518037 上传时间:2023-02-17 格式:DOCX 页数:32 大小:2.45MB
下载 相关 举报
demo Functionwebserviceproxyby oceandemo.docx_第1页
第1页 / 共32页
demo Functionwebserviceproxyby oceandemo.docx_第2页
第2页 / 共32页
demo Functionwebserviceproxyby oceandemo.docx_第3页
第3页 / 共32页
demo Functionwebserviceproxyby oceandemo.docx_第4页
第4页 / 共32页
demo Functionwebserviceproxyby oceandemo.docx_第5页
第5页 / 共32页
点击查看更多>>
下载资源
资源描述

demo Functionwebserviceproxyby oceandemo.docx

《demo Functionwebserviceproxyby oceandemo.docx》由会员分享,可在线阅读,更多相关《demo Functionwebserviceproxyby oceandemo.docx(32页珍藏版)》请在冰豆网上搜索。

demo Functionwebserviceproxyby oceandemo.docx

demoFunctionwebserviceproxybyoceandemo

SE37/SE80建里RFC

 

 

 

 

 

 

SE80建立 企业级服务(EnterpriseService)

 

 

以下图片仅供参考:

 

 

 

注:

这里的page如果是传输PRD的,需要指定传输开发包

 

 

点击:

Complete

 

 

 

 

 

 

 

SOAManager配置WebService

 

 

 

解决方法,配置对应host文件。

 

192.168.11.243

192.168.11.244

192.168.11.244

192.168.11.207

192.168.11.208

192.168.11.218

 

<>

 

以下配置实例是之前的配置图,仅供参考:

 

 

 

下图对应的是,SE37对应的Function名称

 

 

 

 

 

 

 

红色框内就是要访问的地址

 

 

路径访问输入帐号密码:

 

生成XML文件

 

 

 

 

注:

在配置完以上步骤后,在SAP服务项里,会自动生成对应的Function服务项,具体查看SICF

 

 

 

路径:

default_host/sap/bc/srt/rfc/sap/(Function_name)

 

 

 

 

 

 

SE80配置代理

 

选中Function所在的page,建立企业服务

注意:

此配置过程一定要在EN环境下配置,否则会出现配置错误:

 

 

 

 

 

 

注:

此处URL为soaManager配置获取的路径:

 

注:

要把路径中的域名换成SAP服务器IP地址:

eg:

   =  192.168.11.243

 

 

 

 

这里报错了,因为之前的配置环境是在ZH下

 

 

 

换成EN的结果:

 

 

 

路径查看:

右边的红框内,为代理类名称

 

 

 

 

 

LPConfig 配置代理端口:

点击新建

 

 

注:

此处URL,为SICF中对应Function服务项的路径:

路径获取方法:

(注:

这边测试服务时候,要把服务展开到根节点,然后选择进行测试,并获取路径。

 

 

:

8010/sap/bc/srt/rfc/sap/zseas_fm001?

sap-client=300

 

注:

同样的,把此处的SAP服务器域名,换成SAP服务器的IP地址:

192.168.11.243

 

勾选对应按钮,并激活。

 

 

 

 

 

SE38 创建测试代理程序:

 

 

注在经过以上配置后,SAP会生成对应的代理类 :

 

ZSEAS_WEB_CO_ZSEAS_FM001

 

可以通过SE24查看:

 

 

 

对应生成的Function

输入结构:

 

输出结构:

 

 

结合以上图片,查看程序:

 

程序源码:

report zseas_test030 no standard page heading message-id 00.

data:

* Reference variables for proxy and exception class

  lo_clientproxy     type ref to zseas_web_co_zseas_fm001,

  lo_sys_exception   type ref to cx_ai_system_fault,

* Structures to set and get message content

  ls_result          type string,

  ls_request        type zseas_web_zseas_fm001,

  ls_response       type zseas_web_zseas_fm001response.

selection-screen begin of block b1 with frame title text-001.

parameters:

  oper_a(10)  type c obligatory.

parameters:

  oper_b(20)  type c obligatory.

selection-screen end of block b1.

****Set the input parameter into the Request of the SOAP Object

****Create the Proxy and Clall it.

create object lo_clientproxy.

ls_request-id = oper_a.

ls_request-name = oper_b.

try.

    call method lo_clientproxy->zseas_fm001

      exporting

        input  = ls_request

      importing

        output = ls_response.

****Write Out the Basic Information

    ls_result = ls_response-name_id.

    write /  ls_result.

  catch cx_ai_system_fault into lo_sys_exception.

*   Error handling

    write:

 / lo_sys_exception->errortext.

endtry.

 

 

程序运行测试:

 

 

 

 

 

到此,SAP代理内部WebService 配置结束。

 

 

 

代理JAVAWebServices

 

JAVA端使用CXF插件发布WebServices

发布路径:

http:

//10.19.11.212:

9002/hello

WebServices路径:

http:

//10.19.11.212:

9002/hello?

wsdl

 

 

路径访问效果:

 

 

SAP端代理JAVAWebServices

se80建立:

 

注:

在配置过程中,指定的URL,就是上面JAVA发布的WebService.

参考下图:

 

 

 

 

LPConfig 配置:

注:

此处配置的URL和SE80里配置的路径是一样的

 

 

SE38测试程序:

 

 

 

 

 

完结

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 总结汇报 > 实习总结

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1