1

I am trying to put together a sequence that pulls out properties from an initial request and stores those properties until the response comes back, replace certain regions and send that to another service. I have successfully accomplished this but I want to refine my approach by hosting the payloadFactory format in the registry and reference it using the key attribute within the format tag.

Here is an example of what I want to accomplish: Sajini's Blog

Here is the code I am currently working with:

<sequence xmlns="http://ws.apache.org/ns/synapse">
   <payloadFactory>
      <format>
         <AddEditEmailAddress xmlns="http://tempuri.org/">               
            <eResponse xmlns:a="http://schemas.datacontract.org/2004/07/NoelGroup.Users.Core.Task.BusinessLayer" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">            $1                  
               <Success xmlns="http://schemas.datacontract.org/2004/07/NoelGroup.Users.Task.BusinessLayer">true</Success>            $2            
            </eResponse>               
            <personId>$3</personId>         
         </AddEditEmailAddress>
      </format>
      <args>
         <arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('default','BROKEN_OBJECT')"/>
         <arg xmlns:ns="http://org.apache.synapse/xsd" xmlns:a="http://schemas.datacontract.org/2004/07/NoelGroup.Users.Core.Task.BusinessLayer" expression="get-property('default','EMAILS')"/>
         <arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('default','PERSON_ID')"/>
      </args>
   </payloadFactory>

And here is what I desire:

<sequence xmlns="http://ws.apache.org/ns/synapse">
   <payloadFactory>
      <format key="conf:/User_Sync_Assets/Email_Req.xml"/>
      <args>
         <arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('default','BROKEN_OBJECT')"/>
         <arg xmlns:ns="http://org.apache.synapse/xsd" xmlns:a="http://schemas.datacontract.org/2004/07/NoelGroup.Users.Core.Task.BusinessLayer" expression="get-property('default','EMAILS')"/>
         <arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('default','PERSON_ID')"/>
      </args>
   </payloadFactory>
4

1 回答 1

0

此功能将在 ESB 4.7.0 版本中提供。

于 2013-05-19T08:44:55.273 回答