I am not sure if the sample is still necesary but I post it just in case:

/<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:cxf="http://camel.apache.org/schema/cxf";
                         
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration";
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
       http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
                         http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd";
>
  <cxf:cxfEndpoint id="testCXF"
                   address="http://0.0.0.0:8095/testCXF";
                   endpointName="s:Hello_Port"
                   serviceName="s:Hello_Service"
                   wsdlURL="TestData\wsdl\hello.wsdl"
                  
xmlns:s="http://www.examples.com/wsdl/HelloService.wsdl"/>
  <camelContext xmlns="http://camel.apache.org/schema/spring";>
    <route>
                        <from uri="cxf:bean:testCXF?dataFormat=MESSAGE"/>
                        <transform>
        <simple>${bodyAs(String)}</simple>
      </transform>
                                <validate>
                                                <groovy>
                                                        
                                                </groovy>
                                        </validate>
                </route>
  </camelContext>
</beans>
/

The WSDL is grabed from http://www.tutorialspoint.com/wsdl/wsdl_example.htm
(it actually needs a fix by closing properly the <soap:address 
location="http://www.examples.com/SayHello/";>  element)

I tested the behaviour on ActiveMQ 5.9 by using WebServiceStudio from
Codeplex. The problem occurs randomly but can be reproduced quite quickly:
1.Generate the proxy classes by providing the wsdl url
(http://localhost:8095/testCXF?wsdl
2.Change the value of firstName to 123 and press invoke; should return the
original message without any error
3.Change the value to something different from 123 and press invoke;
sometimes it returns the previous soap message (containing 123 and sometimes
fails with validation exception; on failure just press Continue)
4.Cahnge the value back to 123 nad try invoke; randomly it works (or not...)

As I inspected the values of the engine/context ( in the methods mentioned
in my previous posts) and randomly the instances from ScriptBuilder differes
from the ones in GroovyCompiledScript.

If required I vcan provide additional details.
Thank you,
Florin




-----
Florin
--
View this message in context: 
http://camel.465427.n5.nabble.com/Groovy-compiled-scripts-cache-execution-context-tp5747131p5747202.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to