如何为 OIM Web 服务适配器配置 xpath?
How to configure xpath for OIM Webservice adapter?
我正在尝试构建一个简单的 OIM Web 服务适配器。
OIM -> calls ICF WS -> calls Partner Link WS
从 BPEL,我有以下映射
/ns2:create/userAccount/__PASSWORD__ -> /ns3:createUser/password
PASSWORD 已加密,因此我在调用合作伙伴 Link WS 之前添加了一个解密密码的策略,如 here
所述
问题出自 OIM 文档中的这一特定说明
Configure the SOA composite in the composite.xml file. To do so, add
the following entries within the tags of the webservice
that requires password decryption.
文档中提供的示例如下所示
<wsp:PolicyReference URI="oimcp/WS_CONNECTOR_OUTBOUND"
orawsp:category="security" orawsp:status="enabled"/>
<property name="passcode" type="xs:string">abcd1234</property>
<property name="password.field.xpath.locations"
type="xs:string">/ns6:ListOfUser/ns6:User/ns6:Password</property>
<property name="target.payload.namespaces"
type="xs:string">ns6=urn:/acme/xml/password</property>
target.payload.namespaces 当您提供错误时,错误消息会提供示例
<12/03/2015 19h24min21s UTC> <Error> <oracle.soa.bpel.engine.ws>
<BEA-000000> <got FabricInvocationException java.lang.IllegalArgumentException:
target.payload.namespaces property validation failed.
Correct format is : ns1=http://a.com,ns2=http://b.com
此外,Grigoryev 先生 in this thread 说
(...)the policy should be attached to the target partner link, not the
connector composite(...)
这有点道理。所以我在这里尝试了几种变体,比如
<property name="password.field.xpath.locations" type="xs:string">
/ns3:createUser/password
</property>
<property name="target.payload.namespaces" type="xs:string">
ns3=http://ws.xyz.com
</property>
但我在这个过程中得到的只是一条这样的消息
<12/03/2015 19h54min24s UTC> <Warning> <ORG.IDENTITYCONNECTORS.GENERICWS>
<BEA-000000>
<Node /soap:Envelope/soap:Body//ns3:createUser/password is null.
Ignoring decryption of masked fields.>
然后,请求来自合作伙伴 link,密码已加密(无用)。
我应该如何正确配置这个东西?我在网上找不到任何像样的例子。即使这个例子(来自 "answered" 的问题)也显然是错误的。
问题已解决
<wsp:PolicyReference URI="oimcp/WS_CONNECTOR_OUTBOUND" orawsp:category="security" orawsp:status="enabled"/>
<property name="passcode" type="xs:string">passcode</property>
<property name="password.field.xpath.locations" type="xs:string">/password</property>
<property name="target.payload.namespaces" type="xs:string">ns3=http://ws.xyz.com</property>
我正在尝试构建一个简单的 OIM Web 服务适配器。
OIM -> calls ICF WS -> calls Partner Link WS
从 BPEL,我有以下映射
/ns2:create/userAccount/__PASSWORD__ -> /ns3:createUser/password
PASSWORD 已加密,因此我在调用合作伙伴 Link WS 之前添加了一个解密密码的策略,如 here
所述问题出自 OIM 文档中的这一特定说明
Configure the SOA composite in the composite.xml file. To do so, add the following entries within the tags of the webservice that requires password decryption.
文档中提供的示例如下所示
<wsp:PolicyReference URI="oimcp/WS_CONNECTOR_OUTBOUND"
orawsp:category="security" orawsp:status="enabled"/>
<property name="passcode" type="xs:string">abcd1234</property>
<property name="password.field.xpath.locations"
type="xs:string">/ns6:ListOfUser/ns6:User/ns6:Password</property>
<property name="target.payload.namespaces"
type="xs:string">ns6=urn:/acme/xml/password</property>
target.payload.namespaces 当您提供错误时,错误消息会提供示例
<12/03/2015 19h24min21s UTC> <Error> <oracle.soa.bpel.engine.ws>
<BEA-000000> <got FabricInvocationException java.lang.IllegalArgumentException:
target.payload.namespaces property validation failed.
Correct format is : ns1=http://a.com,ns2=http://b.com
此外,Grigoryev 先生 in this thread 说
(...)the policy should be attached to the target partner link, not the connector composite(...)
这有点道理。所以我在这里尝试了几种变体,比如
<property name="password.field.xpath.locations" type="xs:string">
/ns3:createUser/password
</property>
<property name="target.payload.namespaces" type="xs:string">
ns3=http://ws.xyz.com
</property>
但我在这个过程中得到的只是一条这样的消息
<12/03/2015 19h54min24s UTC> <Warning> <ORG.IDENTITYCONNECTORS.GENERICWS>
<BEA-000000>
<Node /soap:Envelope/soap:Body//ns3:createUser/password is null.
Ignoring decryption of masked fields.>
然后,请求来自合作伙伴 link,密码已加密(无用)。
我应该如何正确配置这个东西?我在网上找不到任何像样的例子。即使这个例子(来自 "answered" 的问题)也显然是错误的。
问题已解决
<wsp:PolicyReference URI="oimcp/WS_CONNECTOR_OUTBOUND" orawsp:category="security" orawsp:status="enabled"/>
<property name="passcode" type="xs:string">passcode</property>
<property name="password.field.xpath.locations" type="xs:string">/password</property>
<property name="target.payload.namespaces" type="xs:string">ns3=http://ws.xyz.com</property>