Dushan Sachinda Abeyruwan created SYNAPSE-894:
-------------------------------------------------

             Summary: [Iterate Mediator] - Unwanted tags attached to the 
payload if preservePayload="false"
                 Key: SYNAPSE-894
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-894
             Project: Synapse
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.1
         Environment: ubuntu 12.04
            Reporter: Dushan Sachinda Abeyruwan
            Priority: Critical
             Fix For: FUTURE


1. I have a request as below 

<?xml version='1.0' encoding='utf-8'?> 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> 
<soapenv:Body> 
         <m0:requestQuotes xmlns:m0="http://services.samples";> 
<m0:getQuote> 
<m0:request> 
<m0:symbol>IBM1</m0:symbol> 
</m0:request> 
<m0:request> 
<m0:symbol>IBM2</m0:symbol> 
</m0:request> 
<m0:request> 
<m0:symbol>IBM3</m0:symbol> 
</m0:request> 
<m0:request> 
<m0:symbol>IBM4</m0:symbol> 
</m0:request> 
</m0:getQuote> 
</m0:requestQuotes> 
      </soapenv:Body> 
</soapenv:Envelope> 

2. I specified the iterate configuration as following. 

   <iterate xmlns:m0="http://services.samples"; 
      preservePayload="false" 
      expression="//m0:requestQuotes/m0:getQuote/m0:request" 
      id="iterate1"> 
      <target> 
         <sequence> 
            <log level="full" /> 
            <send> 
               <endpoint> 
                  <address 
uri="http://localhost:9001/services/SimpleStockQuoteService"; /> 
               </endpoint> 
            </send> 
         </sequence> 
      </target> 
   </iterate> 

4. When invoked, I see a message like below 

<?xml version='1.0' encoding='utf-8'?> 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> 
<soapenv:Body> 
       <m0:requestQuotes xmlns:m0="http://services.samples";> ----> Is this 
required? 
<m0:getQuote> 
</m0:getQuote> 
</m0:requestQuotes> 
        <m0:request xmlns:m0="http://services.samples";> 
<m0:symbol>IBM4</m0:symbol> 
        </m0:request> 
</soapenv:Body> 
</soapenv:Envelope> 

Why does it attach <m0:requestQuotes 
xmlns:m0="http://services.samples";><m0:getQuote></m0:getQuote></m0:requestQuotes>
 part to the XML? Is this the correct behavior? 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to