2016-08-05 73 views
0

在我的BPEL中,我在catch塊中發現了一個錯誤。在catch塊中,我有一個分配活動,它將輸入負載(數據)映射到故障變量並填充jms隊列。從該jms隊列中,再有一個服務提取數據併發送錯誤郵件。 現在在錯誤的郵件我得到有效載荷爲:在輸出中獲取xml標記中的不需要的URL。 BPEL Oracle SOA 11g

<sal:salesUser xmlns:sal="http://www.mycompany.com/schemas/SalesUserMessage"> <!--Optional: --> 
<sal1:userID xmlns:sal1="http://www.mycompany.com/schemas/SalesUserObject">123ABC</sal1:userID> 
</sal:salesUser> 

但是,如果我檢查流通追溯有效載荷一直在尋找這樣的事情,我相信沒有我的郵件的URL應該得到以下數據:

<sal:syncSalesUser> 
<!-- Optional: 
       --> 
<sal1:userID>123ABC</sal1:userID> 
<!-- Optional: 
       --> 
</sal:syncSalesUser> 

請告訴我爲什麼我要在郵件中的xml標記中獲取url。

PFB我抓的分配款黑色:

<catch faultName="bpelx:remoteFault" faultVariable="RuntimeFaultVar"> 
    <sequence name="seq_RemoteFault"> 
    <assign name="assign_RemotefaultMessage"> 
     <copy> 
     <from expression="oraext:get-content-as-string(bpws:getVariableData('receiveInput_InVar','userNotify','/ns22:userNotify/ns22:payload/ns22:user'))"/> 
     <to variable="FaultMessage" part="payload" 
      query="/ns7:FaultSchema/ns7:FaultMessage/ns7:Payload"/> 
     </copy> 
    </assign> 
    <invoke name="publish_RemoteFaultToQueue" 
      partnerLink="publish_ErrorToQueue" 
      portType="ns3:Produce_Message_ptt" operation="Produce_Message" 
      inputVariable="invoke_jms_publish_ErrorToQueue"/> 
    <terminate name="Terminate"/> 
    </sequence> 

在此先感謝。

+0

在flowtrace命名空間URL(的xmlns:SAL = 「http://www.mycompany.com/schemas/SalesUserMessage」)是顯示在頂部。這就是爲什麼你沒有看到它們。如果你不想看到這些,你必須修改你的變量來刪除命名空間,如http://orasoa.blogspot.fr/2008/12/remove-namespaces-in-osb-and-bpelesb.html所述 – MrAdibou

回答

0

如果你想要你想要的輸出,你應該考慮使用一個xquery去除所有的命名空間。

可以嘗試下面的XQuery:

xquery version "1.0" encoding "Cp1252"; 
(:: pragma parameter="$anyType1" type="xs:anyType" ::) 
(:: pragma type="xs:anyType" ::) 

module namespace xf="http://tempuri.org/Cancel_Order/RemoveNamespace"; 

declare function xf:strip-namespace($e as element())as element() 
{element { fn:QName("",fn:local-name($e)) } 
{ for $child in $e/(@*,node()) 
return 
if ($child instance of element()) 
    then xf:strip-namespace($child) 
     else $child 
     } 
}; 

希望它可以幫助