- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在开发 Oracle 融合中间件 12.1.3。
在我的组合中,我添加了一个“Rest Binding”外部引用,为此我添加了oracle/wss_http_token_client_policy并覆盖了csf-key em> 属性。
在文件中,它看起来像:
myComposite.BAS:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by Oracle SOA Modeler version 12.1.3.0.0 at [01-06-2016 16:01]. -->
<composite name="MyCompositeBAS"
revision="9.8.8"
label="2016-06-01_16-01-48_442"
mode="active"
state="on"
xmlns="http://xmlns.oracle.com/sca/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"
xmlns:ui="http://xmlns.oracle.com/soa/designer/"
xmlns:sca-ext="http://xmlns.oracle.com/sca/1.0-ext">
[.....]
<component name="MyCompositeBASProcess" version="2.0">
<implementation.bpel src="BPEL/MyCompositeBASProcess.bpel"/>
<componentType>
<service name="mycompositebasprocess_client" ui:wsdlLocation="WSDLs/MyCompositeBASProcess.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/GDDSOA/MyCompositeBAS/MyCompositeBASProcess#wsdl.interface(MyCompositeBASProcess)"
callbackInterface="http://xmlns.oracle.com/GDDSOA/MyCompositeBAS/MyCompositeBASProcess#wsdl.interface(MyCompositeBASProcessCallback)"/>
</service>
<reference name="CMProxyRS" ui:wsdlLocation="WSDLs/CMProxyRS.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/GDDSOA/MyCompositeBAS/CMProxyRS#wsdl.interface(CMProxyRS_ptt)"/>
</reference>
</componentType>
<property name="bpel.config.oneWayDeliveryPolicy" type="xs:string" many="false">async.persist</property>
</component>
<reference name="CMProxyRS" ui:wsdlLocation="WSDLs/CMProxyRS.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/GDDSOA/MyCompositeBAS/CMProxyRS#wsdl.interface(CMProxyRS_ptt)"/>
<binding.rest config="Adapters/CMProxyRS.wadl" location="http://myUatServer/cmproxy/resources/v2/" />
</reference>
[....]
<wire>
<source.uri>MyCompositeBASProcess/CMProxyRS</source.uri>
<target.uri>CMProxyRS</target.uri>
</wire>
</composite>
<小时/>
wsm- assembly.xml:
<?xml version="1.0" encoding="windows-1252" ?>
<orawsp:wsm-assembly xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy">
<sca11:policySet xmlns:sca11="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="policySet"
appliesTo="SCA-REST-REFERENCE()" attachTo="REFERENCE('CMProxyRS')" orawsp:highId="2"
xml:id="SCA-REST-REFERENCE__REFERENCE__CMProxyRS__">
<wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy"
DigestAlgorithm="http://www.w3.org/ns/ws-policy/Sha1Exc"
URI="oracle/wss_http_token_client_policy" orawsp:status="enabled" orawsp:id="2">
<orawsp:OverrideProperty xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy" orawsp:name="csf-key"
orawsp:value="cmproxy.rest"/>
</wsp:PolicyReference>
</sca11:policySet>
</orawsp:wsm-assembly>
<小时/>
这在我设置了基本身份验证的 UAT 和 PROD 环境中运行良好。
我的 DEV 环境问题:REST 服务不需要任何身份验证。 如何更改或删除 <wsp:PolicyReference ...>
组合何时部署在 DEV 环境中?
在网络上查找时,我发现了几个覆盖 PolicyReference 的示例,但针对的是 SOA Suite 11g 上的“SOAP 绑定(bind)”外部引用。我没有找到任何针对 REST 服务和 12c 的特定内容。
我尝试改编我在网上找到的示例:
** 覆盖“配置计划”中的策略 **
我编写了一个专用于 DEV 环境的配置计划:
<?xml version="1.0" encoding="UTF-8"?>
<SOAConfigPlan xmlns:jca="http://platform.integration.oracle/blocks/adapter/fw/metadata"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"
xmlns:edl="http://schemas.oracle.com/events/edl" xmlns="http://schemas.oracle.com/soa/configplan">
<composite name="MyCompositeBAS">
<import>
<searchReplace>
<search/>
<replace/>
</searchReplace>
</import>
<reference name="CMProxyRS">
<binding type="rest">
<attribute name="location">
<replace>http://myDevServer/cmproxy/resources/v2/</replace>
</attribute>
<wsp:PolicyReference URI="oracle/no_authentication_client_policy" orawsp:category="security" orawsp:status="enabled"/>
</binding>
</reference>
</composite>
</SOAConfigPlan>
或者,我还尝试“禁用”(在配置计划中)wsm-assembly.xml
中定义的策略。将我的配置计划中的最后一个 block 替换为:
[....]
<reference name="CMProxyRS">
<binding type="rest">
<attribute name="location">
<replace>http://myDevServer/cmproxy/resources/v2/</replace>
</attribute>
<wsp:PolicyReference orawsp:category="security" orawsp:status="disabled" URI="oracle/wss_username_token_client_policy"/>
<!--wsp:PolicyReference URI="oracle/no_authentication_client_policy" orawsp:category="security" orawsp:status="enabled"/ -->
</binding>
</reference>
[....]
但是它不起作用。我知道配置计划已应用,因为我可以看到组合尝试访问 myDevServer
上的 REST 服务器,但“原来”的政策并没有被取消。这在企业管理器上得到了证实:在CMProxyRS
上策略选项卡,oracle/wss_http_token_client_policy
仍然可见,Effective
和Enabled
已检查。
覆盖“composite.xml”中的策略
我还尝试直接在 composite.xml
中重新定义策略看看是否可以覆盖 wsm-assembly.xml
中定义的内容文件。我尝试了几种方法,各有不同:
composite.xml:
[....]
<binding.rest config="Adapters/CMProxyRS.wadl" location="http://myDevServer/cmproxy/resources/v2/" >
<wsp:PolicyReference URI="oracle/wss_http_token_client_policy" orawsp:category="security" orawsp:status="disabled"/>
</binding.rest>
[....]
11g 和 12c 之间的差异
我在网上找到的示例是为 11g 设计的,而不是为 12c 设计的。当您通过 jDeveloper GUI 设置策略时,唯一可能不同的行为如下:
<wsp:PolicyReference >
标签添加在wsm-assembly.xml
中文件,包裹在 <sca11:policySet >
中;<wsp:PolicyReference >
标签直接添加在composite.xml
中文件。 (这就是为什么我在之前的测试中尝试直接在组合中设置策略...)所以我也尝试添加 <sca11:policySet >
在我的配置计划中,但失败了......
命名空间的差异
如果您照顾wsp:
,你会看到:
wsm-assembly.xml
,它在这里定义:xmlns:wsp="http://www.w3.org/ns/ws-policy"
composite.xml
和 configuration plan
,它在这里定义:xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
所以我也尝试将命名空间强制为 http://www.w3.org/ns/ws-policy
在我的配置计划中,但部署失败(即未应用配置计划)。
我不知道如何才能走得更远......
有人可以分享一下想法吗?有人在不同环境中成功查询具有不同策略的 REST 服务吗?
非常感谢。
最佳答案
在 DEV 环境中部署项目后,
1) 转到 Oracle 融合中间件控制台。2)打开项目。3) 在 OWSM 策略选项卡下,您可以添加或删除此策略。4) 删除后保存 session 并重试。
还有另一种选择。
您可以通过复制 oracle/wss_http_token_client_policy 类型的允许所有类型策略来创建自己的新策略,而不是使用 oracle/wss_http_token_client_policy 策略。
在此新策略中,您可以添加您在 weblogic 上创建的用户或组。
在 DEV 服务器上部署项目时,请勿在此新策略中添加任何用户或组,默认情况下这将允许所有用户访问此服务。
关于java - 如何在 Soa Suite 12c 中覆盖 REST 绑定(bind)引用的 OWSM 策略?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42073862/
我有一个 foo 类,它有一个 bar 方法,它接受可调用的东西(函数指针/仿函数)。这个可调用的东西应该作为绑定(bind)元素传递给另一个方法 doit 和第三个方法 bar_cb 方法。 #in
我正在尝试在我的 WPF 4.0 应用程序(使用 VS 2010 Pro RTM)中创建自定义 TabItem 模板/样式,但尽管一切似乎都正常工作,但我注意到跟踪窗口中存在绑定(bind)错误。 我
作为一名刚接触 Android 的开发人员,我想我可能误解了绑定(bind)服务。 我创建了一项服务来结束对服务器的访问。作为此服务的一部分,该服务正在监听多播地址,以识别本地网络上的设备何时出现和消
这个问题在这里已经有了答案: What is the use of the JavaScript 'bind' method? (23 个回答) 关闭 7 年前。 所以我一直在尝试了解一些 JS 上
我不明白这三种语法之间的区别: where a = f (b) do a <- f (b) do let a = f (b) 我确实明白了a <- f(b)与其他两个不同,在大多数情况下,我尝试了所有
我在将 Cocoa 项目从手动同步接口(interface)模型转换为绑定(bind)模型时遇到问题,这样我就不必担心接口(interface)粘合代码。 我关注了 CocoaDevCentral C
我正在尝试找出一种好的方法来对处理大数据集的代码进行并行化,然后将结果数据导入 RavenDb。 数据处理受 CPU 限制和数据库导入 IO 限制。 我正在寻找一种解决方案,以对 Environmen
我正在 foreach 循环中生成单选按钮。我试图将选中的属性绑定(bind)到父级中的基本可观察值。不幸的是,当单击单选按钮时,父级的属性似乎没有在单击处理程序中更新。 基于一些previous w
在我的 Windows Phone 应用程序中,我有两个 LongListSelectors并排在页面上。我想做到这一点,以便当用户滚动其中一个时,另一个滚动相同的量。 两个 LongListSele
我在网上看到这个问题准备面试: Given a non-preemptive kernel which type of process will get affected morein terms o
我有一个 foreach 绑定(bind),如下所示: Summary Permitting 原因是有两个选项卡始终存在,并且我根据是否添加了其他选项卡来添加其他选项
任何人都有绑定(bind)相同的情况DataContext到 TextBlock 中的 Text 属性(例如)。 我必须分配 DataContext以我的风格反射(reflect)基于 Datacon
给定以下代码: Login 和下面的javascript $(function () { $('#btnLogin').click(function () { co
我使用 boost::asio 创建了一个服务器。我在绑定(bind)到端点时遇到问题。所以,如果我在构造函数中初始化一个接受器: Server::Server(QWidget *parent) :
我正在将现有项目从 MySQL 转换为 Postgres。代码中有相当多的原始 SQL 文字使用 ? 作为占位符,例如 SELECT id FROM users WHERE
似乎在绑定(bind)某些数据时出错了,有人可以帮我解决我哪里出错了,尽管我无法弄清楚。 真的不需要在这里显示太多,这是 Binding,我已经通过移除背景并在其中放置颜色来测试背景,效果很好。 编辑
我正在尝试使用 wcf 构建一个 http 监听器(web 服务)。这个监听器是一个更大的桌面应用程序的一部分。此桌面应用程序还会调用 http 监听器。 当监听器接收到数据时,它应该被传递到桌面应用
嘿嘿。 我正在使用 Node.JS 和 child_process 来生成 bash 进程。我试图了解我是否正在执行 I/O 绑定(bind)、CPU 绑定(bind)或两者兼而有之。 我正在使用 p
尝试执行以下操作并出现“Got interpolation ({{}}) where expression was expected”错误。 {{item.name}} 谢谢!
我有一个导入的 Java 库,它是我解决方案中的“绑定(bind)库”项目。 我正在尝试从解决方案中的另一个项目绑定(bind)到第 3 方库中的服务。 第 3 方库文档 [在 java 中] 非常简
我是一名优秀的程序员,十分优秀!