【发布时间】:2013-02-18 11:52:45
【问题描述】:
我创建了一个 WS-BPEL 工作流,它将调用异步 Web 服务并等待回调响应。 carbon 应用程序也成功部署到 BPS 中。
关于我的外部异步 Web 服务的详细信息
1. 它需要通过 http 进行基本身份验证。
2. 要求肥皂封头在肥皂信封中可用。
3. 它将处理请求并向它在soap 标头中接收到的ReplyTo 地址发送回调,并使用MessageID 来关联回调。
我的 BPEL 流程的 deploy.xml 文件如下所示...
<?xml version="1.0" encoding="UTF-8"?>
<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:callback.integration.service="http://callback.integration.service/"
xmlns:epr="http://wso2.org/bps/bpel/endpoint/config"
xmlns:sample="http://wso2.org/bps/sample"
xmlns:ws.integration.service="http://ws.integration.service/">
<process name="sample:Test">
<active>true</active>
<retired>false</retired>
<process-events generate="all"/>
<provide partnerLink="client">
<service name="sample:Test" port="TestPort"/>
</provide>
<provide partnerLink="IntegrationService">
<service name="callback.integration.service:IntegrationCallback" port="IntegrationResponsePort"/>
</provide>
<invoke partnerLink="IntegrationService">
<service name="ws.integration.service:IntegrationService" port="IntegrationRequestPort">
<epr:endpoint endpointReference="IntegrationService.epr"/>
</service>
</invoke>
</process>
</deploy>
IntegrationService.epr 文件如下所示...
<wsa:EndpointReference
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com uep_schema.xsd"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/">
<wsa:Address>http://http://server:8080/integration/IntegrationService</wsa:Address>
<wsa:Metadata>
<id>SInvokeEPR</id>
<qos>
<enableAddressing />
</qos>
<transport type="http">
<authorization-username>username</authorization-username>
<authorization-password>password</authorization-password>
</transport>
</wsa:Metadata>
</wsa:EndpointReference>
现在,当我从 carbon 服务管理控制台测试 bpel 进程时,我确实收到了对我的异步 Web 服务的请求。然而,soap 信封看起来如下,它缺少一个正确的 ReplyTo 地址来发送回调。
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://server:8080/integration/IntegrationService</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:91ac4ebd-b100-440e-a01d-c4a5c0d8a56f</wsa:MessageID>
<wsa:Action>http://ws.integration.service/IntegrationRequestPortType/createTask</wsa:Action>
</soapenv:Header>
<soapenv:Body>
...
</soapenv:Body>
</soapenv:Envelope>
现在我需要通过回调来回复这个请求。回调肥皂信封将包含此 MessageID,以便回调与正确的流程实例相关联。
如何将正确的 ReplyTo 地址附加到soap 标头?
【问题讨论】:
-
我正在使用 BPS 版本 3.0.0 并使用最新的 WSO2 Developer Studio 版本。我已经根据Here by Azeez提供的示例完成了BPEL流程@
-
我获得了使用 WS-BPEL 相关集的相关性。不知何故,基于 ws-Addressing 的相关性不起作用。
标签: wso2 bpel asynccallback ws-addressing