Ashankha,

Here are the two examples I used.
And I had axiom-dom in my classpath.
I used this using the 1.0 jars and inside Qpid where I have embeded the
synapse engine. (The code I showed u in Sri Lanka)
(Everything works fine now, after I removed axiom-dom from my classpath).

I didn't open a JIRA bcos I wasn't sure whether it was a bug or just a
classpath mess with axiom.
If u want to track this, then I am happy to open it.

Regards,

Rajith.

On 7/10/07, Asankha C. Perera <[EMAIL PROTECTED]> wrote:

Rajith

Can you provide me the sample configuration that causes probelms - or
open a JIRA so that we could check on this further?

asankha

Rajith Attapattu wrote:
> folks,
>
> I found the cause for the two problems I highlighted in the list.
> Both the script mediator and the xpath evaluation
> (Axis2MessageContext.getStringValue()) had problems dealing with the
> DOM implementation.
>
> Once I removed the axion-dom impl jar from the classpath it went away.
> Have anybody else experianced this?
>
> Has anybody run xpath evaluations or script mediator together with any
> WS-Sec examples in synapse ?
> (If I am not mistaken, in WS-Sec u need to have the axiom-dom impl)
>
> If this is a problem, shouldn't we fix this? as somebody can
> technically use the axiom-dom impl instead of the stax impl.
> (However as Paul stated if we deal at OMElement level it should be ok,
> but we seem to have some problems with adding or casting nodes in the
> above two instances)
>
> Eran, if the axiom-dom impl is in the classpath (along with stax-impl)
> which one gets loaded as the OM implementation? does it depend on the
> Type of factory that u create? Can you explain a bit.
>
> Regards,
>
> Rajith
>
> Regards,
>
> Rajith Attapattu
> Red Hat.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


<definitions xmlns="http://ws.apache.org/ns/synapse";>

   <!-- content based routing example -->

    
   <endpoint name="criticalTicketQueue"> 
      <address uri="amqp://amq.direct?routingKey=criticalTicket"/>
   </endpoint>

   <endpoint name="lowPriorityTicketQueue">
      <address uri="amqp://amq.topic?routingKey=lowPriorityTicket"/>	
   </endpoint>

   <endpoint name="ticketQueue">
      <address uri="amqp://amq.topic?routingKey=troubleTicket"/>	
   </endpoint>

    <sequence name="main">
	<log level="full"/>
	<switch source="//m:troubleTicket/m:priority" xmlns:m="http://redhat.com/sample"; >
	    <case regex="critical">
	        <send>
	           <endpoint key="criticalTicketQueue"/>
	        </send>
	    </case>
	    <case regex=".*low*"> 
	        <send>
                  <endpoint key="lowPriorityTicketQueue"/>
	        </send>
	    </case>
            <default>
	        <send>
                  <endpoint key="ticketQueue"/>
	        </send>
            </default> 
       </switch>
    </sequence>

</definitions>

 <!-- routing is based on priority
 
 <m:troubleTicket xmlns:m=\"http://redhat.com/sample\";>
    <m:customerId>532535</m:customerId>
    <m:priority>critical</m:priority>
    <m:appId>ESB</m:appId>
    <m:desc>blabla</m:desc>
 </m:troubleTicket> 

 --> 
<definitions xmlns="http://ws.apache.org/ns/synapse";>

   <!-- message transformation -->

   <endpoint name="stockQuoteQueue"> 
      <address uri="amqp://amq.direct?routingKey=stockQuote"/>
   </endpoint>

    <sequence name="main">
	<log level="full"/>
	<script language="js"><![CDATA[
               var symbol = mc.getPayloadXML()..*::ticker.toString();
               var price = mc.getPayloadXML()..*::value.toString();
               mc.setPayloadXML(
                  <m:stockQuote xmlns:m="http://redhat.com/sample";>
                     <m:price>{price}</m:price>
                     <m:symbol>{symbol}</m:symbol>                     
                  </m:stockQuote>);
        ]]></script>
        <send>
           <endpoint key="stockQuoteQueue"/>
        </send>
    </sequence>

</definitions>


 <!-- Will transform the message as follows 

 <m:quote xmlns:m="http://redhat.com/sample";> 
    <m:ticker>RHT</m:ticker>
    <m:value>125</m:value>
 </m:quote>

 <m:stockQuote xmlns:m="http://redhat.com/sample";> 
    <m:symbol>RHT</m:symbol>
    <m:price>125</m:price>
 </m:stockQuote>

 -->
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to