Thanks Anjana. Finally I can access to the mc and change the content of one element.
I don´t use the serProperty method, because I don´t understand the parameters I need to pass. I continue study this. :-D In this case: void setProperty(java.lang.String key, java.lang.Object value) what is key?? I figure out that value is the information, in my case the image object that I need to put into the message. Ing. Jorge Infante Osorio. J´Dpto Soluciones SOA. CDAE. UCI De: carbon-dev-boun...@wso2.org [mailto:carbon-dev-boun...@wso2.org] En nombre de Anjana Fernando Enviado el: domingo, 22 de mayo de 2011 1:49 Para: carbon-dev@wso2.org Asunto: Re: [Carbon-dev] Using class mediator to chance an output message Hi Jorge, In the MessageContext class what you'll have to use is the setProperty [1] method. And your jars, you'll have to put them in /repository/components/lib. [1] http://synapse.apache.org/apidocs/org/apache/synapse/MessageContext.html#set Property%28java.lang.String,%20java.lang.Object%29 Cheers, Anjana. On Sun, May 22, 2011 at 12:06 AM, Jorge Infante Osorio <jorg...@uci.cu> wrote: Hi folks. I have the following scenario: A dataservice in WSAS return inside it response message an URL that point to the location of a file, in this case a binary file, and in the ESB I have a proxy service that return in it message response not the URL but the binary file. So in the dataservice WSDL the xsd type is string and in the proxy service the xsd type is base64Binary. My idea is to implement a class mediator in ESB that access the message context, extract the URL, them access to the server that store the file and load the file as an object and inject this object back to the message context. I study your class mediator examples and see a code line like this: mc.getEnvelope().getBody().getFirstElement().getFirstElement().getFirstChild WithName(nombre).setText(image); nombre is a QName objet. If image is a an object, not a string, how can inject it inside the message context? I only found the setText method. Any help? Another question: where I have to store the class, I put an example class in classpath and in [ESB_HOME]\repository\components\plugins\ but I can´t load it? Thanks, Ing. Jorge Infante Osorio. J´Dpto Soluciones SOA. CDAE. UCI _______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev -- Anjana Fernando Senior Software Engineer WSO2 Inc. | http://wso2.com lean . enterprise . middleware _______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev