码迷,mamicode.com
首页 > 数据库 > 详细

Using Integrated SOA Gateway in Oracle EBS(websevice)

时间:2014-07-31 20:36:47      阅读:453      评论:0      收藏:0      [点我收藏+]

标签:blog   http   使用   os   strong   io   文件   for   

http://blog.csdn.net/pan_tian/article/details/10159935

Oracle EBS如何与第三方系统相集成?比如这样的需求,X系统知道物料编码,需要从EBS系统里读取具体物料信息,或者X系统想把自己的人员信息同步到EBS,这类集成问题你就可能需要用到Oracle EBS Integrated SOA Gateway

Integrated SOA Gateway是EBS里的一个职责,分配给用户后就能看到 ,进入职责(如下图)后,就能看到所有Oracle EBS可以(只是可以,真正放开需要发布和部署的动作)对外开发的接口。

(当然如果这些系统自带接口还不能满足你的集成需求的话,那么你就需要自定义客户化接口了)

bubuko.com,布布扣

首先分享一些收集到的文档,后续有需要可以再详细阅读:

Oracle® Integration Repository User‘s Guide

Oracle E-Business Suite Integrated SOA Gateway User‘s Guide
Oracle E-Business Suite Integrated SOA Gateway Implementation Guide R12.1
Oracle E-Business Suite Integrated SOA Gateway Developer‘s Guide

20 Minute Guide to Oracle Integration Repository

Enable Oracle E-Business Suite Integrated SOA Gateway 
Oracle Integration Repository 

Oracle Application Server Adapters for Files, FTP, Databases, and Enterprise Messaging User‘s Guide 
Securing E-Business Suite Web Services with Integrated SOA Gateway

Using SOA Gateway in EBS 12 

Enable Oracle E-Business Suite Integrated SOA Gateway

要使用Integrated SOA Gateway,首先要打一些补丁,具体方法可以参见Note 556540.1 或者 我的另一篇文章

普通的用户只能查看EBS的接口信息,但并不能发布接口,以及部署,只有sysadmin账户有这个权限。(注:默认情况下,绝大多数的接口是没有发布及部署的,只有需要sysadmin发布后,第三方系统才能调用。)

如果不想使用sysadmin这个账户来管理接口,那么就要给目标用户分配三个角色,才能做sysadmin同样的事情,这三个角色是:

* Irep Administrator(中文:Irep 管理员)
* System Integration Developer(中文:系统集成开发员)
* System Integration Analyst(中文:系统集成分析专家)

每一个角色都有着对接口库不同的权限,如下图

bubuko.com,布布扣

sysadmin默认是具有上述三个角色的,所以不需要特别设置。其他用户就需要设置了,如何给用户分配角色可以参见Note:861982.1

 

Interfaces

接下来会以系统默认提供的一个接口为例,演示一下,如何放开接口,允许外部程序调用的一个过程。

以sysadmin账户登录,然后路径:Integrated SOA Gateway > Supply Chain Management > Inventory > Inventory Organization Setup,可以看到两个接口,其中的一个叫Locator Maintenance API,这个接口允许用户创建,修改,删除Locator。

(如果接口的Internal Name为User_XXX_XXX的话,比如USER_PKG_LOT,USER_PKG_SERIAL,表示这个接口是需要用户自定义接口,需要自己实现后台的业务处理逻辑)

bubuko.com,布布扣

再点进去就能看到接口的详细信息。你能看到这个接口是一个PL/SQL接口,后台对应的Package叫INV_LOC_WMS_PUB,这个接口包含四个Locator处理的方法。如果你有兴趣,你可以打开INV_LOC_WMS_PUB这个Package,就能看到具体的实现逻辑。

bubuko.com,布布扣

每一个方法能点进去,就是这个接口方法的描述以及接口参数。

bubuko.com,布布扣

 

生成WSDL

这里需要把PL/SQL的Package以Webservice方式发布,就需要把这个接口生成WSDL。(如何你自己的客户化PL/SQL注册到Integrated SOA Gateway,见这篇文章

WSDL: Web服务定义语言(Web Service Definition Language),用来定义服务接口。实际上,它能描述服务的两个不同方面:服务的签名(名字和参数),以及服务的绑定和部署细节(协议和位置)。

bubuko.com,布布扣

WSDL生成后,Web Service Status就变成了‘Generated‘。并且你可以查看WSDL

bubuko.com,布布扣

‘View WSDL‘就能看到WSDL信息

bubuko.com,布布扣

 

Deploy Webservice 

生成了WSDL后,外部系统还不能调用它,你需要把生成的WSDL部署到应用服务器上,这一步还会安装一些必要的Webservice文件到应用服务器上。这里需要对Webservice的安全类型做一个勾选:Username Token、SAML Token。

关于这两个安全类型,可以详细阅读下Securing E-Business Suite Web Services with Integrated SOA Gateway ,里边有详细的解释。

bubuko.com,布布扣

 

Create Grant

部署完后,Webservice状态变为了Deployed。这之后还有一步- 授权,你是希望所有用户都能访问接口,还是只是特定用户。

bubuko.com,布布扣

Test Web service

WSDL的地址是http://[host]:[port]/webservices/SOAProvider/plsql/inv_loc_wms_pub/?wsdl

那么Oracle自带测试web service的地址是上边WSDL的地址,但是去掉‘?wsdl‘ (主要不要去掉斜杠/,否则会报No WebService Provider is registered at this URL)

http://[host]:[port]/webservices/SOAProvider/plsql/inv_loc_wms_pub/

bubuko.com,布布扣

bubuko.com,布布扣

Invoke后,就把HTML表单上的信息组成Soap报文,发送到应用服务器,服务器会把返回信息也以Soap报文的形式返回给客户端。

下为SOAP请求报文样例:

 

  1. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">  
  2.     <soap:Header xmlns:ns1="http://xmlns.oracle.com/apps/cux/soaprovider/plsql/cux_0_ws_server_prg/">  
  3.         <ns1:SOAHeader>  
  4.             <ns1:Responsibility>INVENTORY</ns1:Responsibility>  
  5.             <ns1:RespApplication>CUX</ns1:RespApplication>  
  6.             <ns1:SecurityGroup>STANDARD</ns1:SecurityGroup>  
  7.             <ns1:NLSLanguage>SIMPLIFIED CHINESE</ns1:NLSLanguage>  
  8.             <ns1:Org_Id>0</ns1:Org_Id>  
  9.         </ns1:SOAHeader>  
  10.         <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" soap:mustUnderstand="1">  
  11.             <wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">  
  12.                 <wsse:Username>ESB_TEST</wsse:Username>  
  13.                 <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">1234567890</wsse:Password>  
  14.             </wsse:UsernameToken>  
  15.         </wsse:Security>  
  16.     </soap:Header>  
  17.     <soap:Body xmlns:ns2="http://xmlns.oracle.com/apps/cux/soaprovider/plsql/cux_0_ws_server_prg/invokews/">  
  18.         <ns2:InputParameters>  
  19.             <ns2:P_IFACE_CODE>XXX</ns2:P_IFACE_CODE>  
  20.             <ns2:P_BATCH_NUMBER>1234567654323</ns2:P_BATCH_NUMBER>  
  21.             <ns2:P_REQUEST_DATA>32424</ns2:P_REQUEST_DATA>  
  22.         </ns2:InputParameters>  
  23.     </soap:Body>  
  24. </soap:Envelope>  

(请求报文头中的Responsibility,RespApplication,SecurityGroup,NLSLanguage,Org_Id节点都是Oracle EBS系统要求的SOAP头信息,用于账户验证)     

SOAP响应报文样例:

 

 

  1. <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">  
  2.     <env:Header/>  
  3.     <env:Body>  
  4.         <OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/apps/cux/soaprovider/plsql/cux_0_ws_server_prg/invokews/">  
  5.             <X_RETURN_CODE xmlns="http://xmlns.oracle.com/apps/cux/soaprovider/plsql/cux_0_ws_server_prg/invokefmsws/">ERROR001</X_RETURN_CODE>  
  6.             <X_RETURN_MESG xmlns="http://xmlns.oracle.com/apps/cux/soaprovider/plsql/cux_0_ws_server_prg/invokefmsws/">输入的请求报文格式不正确</X_RETURN_MESG>  
  7.             <X_RESPONSE_DATA xsi:nil="true" xmlns="http://xmlns.oracle.com/apps/cux/soaprovider/plsql/cux_0_ws_server_prg/invokews/"/>  
  8.         </OutputParameters>  
  9.     </env:Body>  
  10. </env:Envelope>  

 

 

除了这个标准的测试方法外,也可以使用SoapUI这样的专业工具来测试Webservice,见这篇文章

 

SOA Monitor

可以在SOA Monitor中监视客户端调用EBS的Webservice的执行的效果。

路径:Integrated SOA Gateway –> SOA Monitor

bubuko.com,布布扣

如果调用失败,可以从详细信息或者日志里查看具体内容。

 

 

------

怎样为一个用户赋予User Management职责

参考Note:734280.1 UMX Error: ‘There are no functions available for this responsibility‘ And/Or ‘There are no valid navigations for this responsibility‘ when Accessing ‘User Management‘ Responsibility.

To implement the solution, please execute the following steps:
1. Log into the applications as SYSADMIN User.
2. Choose User Management responsibility.
3. Navigate to Users web page.
4. Search and find the user you want to inherit the Security Administrator and Customer Administrator Roles.
5. Click on Update Icon.
6. Click on Assign Roles button.
7. Find and choose ‘Security Administrator‘ Role.
8. Apply.
9. Repeat the Steps (6-8) for ‘Customer Administrator‘ Role.
10. Log as the user who was assigned User Management Responsibility and facing the issue.
11. Retest the issue.
12. Migrate the solution as appropriate to other environments.

Using Integrated SOA Gateway in Oracle EBS(websevice),布布扣,bubuko.com

Using Integrated SOA Gateway in Oracle EBS(websevice)

标签:blog   http   使用   os   strong   io   文件   for   

原文地址:http://www.cnblogs.com/xiaoL/p/3881418.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!