2013-03-04 2 views
3

비동기 웹 서비스를 호출하고 콜백 응답을 기다리는 WS-BPEL 워크 플로를 만들었습니다. 탄소 응용 프로그램은 BPS에도 성공적으로 배포됩니다.SOAPHeader에 ReplyTo 속성이 누락되었습니다.

내 외부 비동기 웹 서비스에 대한 세부 정보
1. http를 통한 기본 인증이 필요합니다.
2. 비누 봉투에 비누 머리글이 있어야합니다.
3. 요청을 처리하고 콜백을 ReplyTo 주소로 보내고 SOAP 헤더에서 수신하고 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> 

지금 탄소 서비스 관리 콘솔에서 bpel 프로세스를 테스트하고 비동기 웹 서비스에 요청합니다. 그러나 비누 봉투는 다음과 같이 보이며 적절한 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> 

이제 내 요청은 콜백으로이 요청에 응답하는 것입니다. 콜백 SOAP 봉투에는이 MessageID이 포함되어 콜백이 올바른 프로세스 인스턴스와 상호 연관됩니다.

어떻게 얻을 수 있습니까 답글 주소가 비누 헤더에 추가 되었습니까?

+0

BPS 버전 3.0.0을 사용 중이며 최신 WSO2 Developer Studio 버전을 사용 중입니다. 필자는 제공된 샘플에 따라 BPEL 프로세스를 수행했습니다. [Here Azedz] (http://blog.afkham.org/2012/05/ws-bpel-spec-sample-using-wso2-bps.html) –

+0

I WS-BPEL 상관 관계 세트로 작업 할 상관 관계가 있습니다. 어떻게 든 ws- 주소 기반 상관 관계가 작동하지 않습니다. –

답변

0

올바르게 WSO2 BPS (또는 Apache ODE와 함께 사용)를 사용한다고 가정하면 할당에서이 사본을 사용하여 수동으로 헤더를 설정할 수 있습니다. (http://ode.apache.org/extensions/headers-handling.html)

<bpel:copy> 
    <bpel:from> 
    <bpel:literal> 
    <wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
     <Address>http://localhost:9763/services/SIServerCallback</Address> 
    </wsa:ReplyTo> 
    </bpel:literal> 
</bpel:from> 
<bpel:to variable="ServiceInvokerIARequest" header="ReplyTo"> 
</bpel:to> 
</bpel:copy> 
관련 문제