You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by agupta2311 <st...@gmail.com> on 2009/03/03 12:01:32 UTC
Re: Slightly OT: XML inside SOAP (RE: Invoking Synapse from Non
Axis 2 Client)
Hi asankha,
I have created a pojo class in jave on netbeans.the code is as follows:
-------------------------------------------------------------
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package mediate2;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.NamingException;
import jms_client.RequestClass;
/**
*
* @author agupta
*/
public class test {
private String processString;
private String program;
public void setProcessString(String s) {
this.processString = s;
}
public String getProcessString() {
return processString;
}
public void setProgram(String s) {
this.program = s;
}
public String getProgram() {
return program;
}
public void execute() {
RequestClass request = new RequestClass();
try {
request.getRequest(processString);
} catch (NamingException ex) {
Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex);
} catch (Exception ex) {
Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
------------------------------------------------------------
jms _client is anohter java project that i have created for jms.Now i ahave
added the jar of jms client in this project.I am calling one method
(getrequest) which takes the input request as string.
I have added this in synapse lib folder as a .jar file.
my synapse configuration is liek this:
-------------------------------------------------------------
<registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
<parameter name="root">file:lib/mediate2.jar/</parameter>
<parameter name="cachableDuration">15000</parameter>
</registry>
<proxy name="BusinessSchoolProxy" transports="http" trace="enable">
<target>
<inSequence>
<log level="full">
<property name="Text" value="Sending request to Business School - "/>
</log>
<pojoCommand name="mediate2.test">
<property name="processString"
expression="//processstring" action="ReadMessage"/>
<property name="program" context-name="program-var"
action="UpdateContext"/>
</pojoCommand>
<send>
<endpoint>
<address uri="http://10.10.10.67:8081/web/BusinessSchoolService"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full">
<property name="Text" value="Getting response from Business School -
"/>
</log>
<send/>
</outSequence>
</target>
<publishWSDL
uri="http://10.10.10.67:8081/web/BusinessSchoolService?wsdl"/>
</proxy>
----------------------------------------------------------------
I am calling this proxy from my application (created in java on netbeans)
.It is calling the pojo class , but i am getting the following error:
--------------------------------------------------------------------
ERROR POJOCommandMediator Error invoking the execute() method on POJO class
: class java.lang.Class
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.synapse.mediators.ext.POJOCommandMediator.mediate(POJOCommandMediator.java:158)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:58)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:125)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:158)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:253)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError:
com/sun/messaging/QueueConnectionFactory
at
jms_client.SampleUtilities.getQueueConnectionFactory(SampleUtilities.java:96)
at jms_client.RequestClass.sendRequest(RequestClass.java:90)
at jms_client.RequestClass.getRequest(RequestClass.java:76)
at mediate2.test.execute(test.java:40)
... 15 more
Caused by: java.lang.ClassNotFoundException:
com.sun.messaging.QueueConnectionFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 19 more
2009-03-03 16:22:11,455 [10.10.10.67-wkstn67] [HttpServerWorker-2] ERROR
TRACE_LOGGER Error invoking the execute() method on POJO class : class
java.lang.Class
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.synapse.mediators.ext.POJOCommandMediator.mediate(POJOCommandMediator.java:158)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:58)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:125)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:158)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:253)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError:
com/sun/messaging/QueueConnectionFactory
at
jms_client.SampleUtilities.getQueueConnectionFactory(SampleUtilities.java:96)
at jms_client.RequestClass.sendRequest(RequestClass.java:90)
at jms_client.RequestClass.getRequest(RequestClass.java:76)
at mediate2.test.execute(test.java:40)
... 15 more
Caused by: java.lang.ClassNotFoundException:
com.sun.messaging.QueueConnectionFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 19 more
2009-03-03 16:22:11,533 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
TRACE_LOGGER Executing fault handler due to exception encountered
2009-03-03 16:22:11,533 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
ProxyServiceMessageReceiver Executing fault handler due to exception
encountered
2009-03-03 16:22:11,533 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
TRACE_LOGGER Fault handler - setting ERROR_MESSAGE : Error invoking the
execute() method on POJO class : class java.lang.Class
2009-03-03 16:22:11,533 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
FaultHandler Fault handler - setting ERROR_MESSAGE : Error invoking the
execute() method on POJO class : class java.lang.Class
2009-03-03 16:22:11,533 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
TRACE_LOGGER Fault handler - setting ERROR_DETAIL :
org.apache.synapse.SynapseException: Error invoking the execute() method on
POJO class : class java.lang.Class
at
org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:220)
at
org.apache.synapse.mediators.ext.POJOCommandMediator.mediate(POJOCommandMediator.java:163)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:58)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:125)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:158)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:253)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.synapse.mediators.ext.POJOCommandMediator.mediate(POJOCommandMediator.java:158)
... 10 more
Caused by: java.lang.NoClassDefFoundError:
com/sun/messaging/QueueConnectionFactory
at
jms_client.SampleUtilities.getQueueConnectionFactory(SampleUtilities.java:96)
at jms_client.RequestClass.sendRequest(RequestClass.java:90)
at jms_client.RequestClass.getRequest(RequestClass.java:76)
at mediate2.test.execute(test.java:40)
... 15 more
Caused by: java.lang.ClassNotFoundException:
com.sun.messaging.QueueConnectionFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 19 more
2009-03-03 16:22:11,533 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
FaultHandler Fault handler - setting ERROR_DETAIL :
org.apache.synapse.SynapseException: Error invoking the execute() method on
POJO class : class java.lang.Class
at
org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:220)
at
org.apache.synapse.mediators.ext.POJOCommandMediator.mediate(POJOCommandMediator.java:163)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:58)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:125)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:158)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:253)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.synapse.mediators.ext.POJOCommandMediator.mediate(POJOCommandMediator.java:158)
... 10 more
Caused by: java.lang.NoClassDefFoundError:
com/sun/messaging/QueueConnectionFactory
at
jms_client.SampleUtilities.getQueueConnectionFactory(SampleUtilities.java:96)
at jms_client.RequestClass.sendRequest(RequestClass.java:90)
at jms_client.RequestClass.getRequest(RequestClass.java:76)
at mediate2.test.execute(test.java:40)
... 15 more
Caused by: java.lang.ClassNotFoundException:
com.sun.messaging.QueueConnectionFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 19 more
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
TRACE_LOGGER Fault handler - setting ERROR_EXCEPTION :
org.apache.synapse.SynapseException: Error invoking the execute() method on
POJO class : class java.lang.Class
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
FaultHandler Fault handler - setting ERROR_EXCEPTION :
org.apache.synapse.SynapseException: Error invoking the execute() method on
POJO class : class java.lang.Class
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
TRACE_LOGGER Executing fault handler mediator : fault
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] WARN
MediatorFaultHandler Executing fault handler mediator : fault
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
TRACE_LOGGER Start : Sequence <fault>
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] DEBUG
SequenceMediator Start : Sequence <fault>
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
TRACE_LOGGER Sequence <SequenceMediator> :: mediate()
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] DEBUG
SequenceMediator Sequence <SequenceMediator> :: mediate()
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
TRACE_LOGGER Start : Log mediator
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] DEBUG
LogMediator Start : Log mediator
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
LogMediator To:
/soap/BusinessSchoolProxy.BusinessSchoolProxyHttpSoap11Endpoint, WSAction:
http://BusinessSchoolService/BusinessSchool/processProspectDetailsRequest,
SOAPAction:
http://BusinessSchoolService/BusinessSchool/processProspectDetailsRequest,
MessageID: urn:uuid:A1CEA2367B788497471236077531376, Direction: request,
MESSAGE = Executing default "fault" sequence, ERROR_CODE = 00000,
ERROR_MESSAGE = Error invoking the execute() method on POJO class : class
java.lang.Class, Envelope: <?xml version='1.0' encoding='utf-8'?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:processProspectDetails
xmlns:ns2="http://BusinessSchoolService/"><processstring><?xml
version="1.0" encoding="UTF-8" standalone="no"?>
<prospect>
<Name>fsdfafsds</Name>
<Age>345315</Age>
<Address>dfgdagd</Address>
<SSN>dfagdfgd</SSN>
<Program>Business</Program>
</prospect>
</processstring></ns2:processProspectDetails></S:Body></S:Envelope>
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
TRACE_LOGGER Log message : To:
/soap/BusinessSchoolProxy.BusinessSchoolProxyHttpSoap11Endpoint, WSAction:
http://BusinessSchoolService/BusinessSchool/processProspectDetailsRequest,
SOAPAction:
http://BusinessSchoolService/BusinessSchool/processProspectDetailsRequest,
MessageID: urn:uuid:A1CEA2367B788497471236077531376, Direction: request,
MESSAGE = Executing default "fault" sequence, ERROR_CODE = 00000,
ERROR_MESSAGE = Error invoking the execute() method on POJO class : class
java.lang.Class, Envelope: <?xml version='1.0' encoding='utf-8'?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:processProspectDetails
xmlns:ns2="http://BusinessSchoolService/"><processstring><?xml
version="1.0" encoding="UTF-8" standalone="no"?>
<prospect>
<Name>fsdfafsds</Name>
<Age>345315</Age>
<Address>dfgdagd</Address>
<SSN>dfagdfgd</SSN>
<Program>Business</Program>
</prospect>
</processstring></ns2:processProspectDetails></S:Body></S:Envelope>
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
TRACE_LOGGER End : Log mediator
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] DEBUG
LogMediator End : Log mediator
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
TRACE_LOGGER Start : Drop mediator
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] DEBUG
DropMediator Start : Drop mediator
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
TRACE_LOGGER End : Drop mediator
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] DEBUG
DropMediator End : Drop mediator
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] INFO
TRACE_LOGGER End : Sequence <fault>
2009-03-03 16:22:11,627 [10.10.10.67-wkstn67] [HttpServerWorker-2] DEBUG
SequenceMediator End : Sequence <fault>
------------------------------------------------------------------------------------------
What i am trying to do is to call this jms client using synapse.HOw to
resolve this error?
Any sample example of calling a independent jms client from synapse using
pojo or a class mediator will also be helpful.
Regards
Abhishek
</definitions>
Asankha C. Perera wrote:
>
> Hi Abhishek
>> I tried doing jms with synapse also,but caching was not happening.
> What do you mean caching?
>> So i creqated another application.Now is there any way I can call the new
>> Application.
>>
> This is not recommended.. but you can use the Class mediator and embed
> your client code if you desire
>
> cheers
> asankha
>
> --
> Asankha C. Perera
> AdroitLogic, http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
>
>
>
>
--
View this message in context: http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22306453.html
Sent from the Synapse - User mailing list archive at Nabble.com.
Re: Slightly OT: XML inside SOAP (RE: Invoking Synapse from Non Axis
2 Client)
Posted by Ruwan Linton <ru...@gmail.com>.
Hi Abhishek,
Do you have a getRequestId getter method returning the value of the field
RequestId in the command that you wrote? It has to have that getter through
with the POJOCommand mediator accesses the value through reflection.
Thanks,
Ruwan
On Tue, Mar 10, 2009 at 1:30 PM, agupta2311 <st...@gmail.com> wrote:
>
> HI
>
> I checked it properly and got to know that Pojo Command is not updating the
> context.What can be the cause of this??
>
> Thanks
> Abhishek
>
> Ruwan Linton wrote:
> >
> > Hi Abhishek,
> >
> > You should be using the following property to read the updated context
> > property;
> >
> > <property name="RequestId" context-name="id-var" action="ReadContext"/>
> >
> > Hope this helps, here the idea is you are reading a context property with
> > the name "id-var" into the "RequestId" field of the command impl.
> >
> > Thanks,
> > Ruwan
> >
> > On Mon, Mar 9, 2009 at 3:23 PM, agupta2311 <st...@gmail.com> wrote:
> >
> >>
> >> Hi Asankha
> >>
> >> I will take care from now onwards that i only attach files
> >> Hey i have written this pojo Command
> >> ----------------------------------------------------------------
> >> <pojoCommand
> name="dblookup.Main">
> >> <property
> >> name="processString"
> >> expression="//processstring"
> >> action="ReadMessage"/>
> >> <property name="id"
> >> context-name="id-var"
> >> action="UpdateContext"/>
> >> </pojoCommand>
> >> ----------------------------------------------------------------------
> >>
> >> The variable id takes its value from the class.
> >> Now i want to pass the value of id to another pojo command.and i m doing
> >> it
> >> like this
> >> ------------------------------------------------------------
> >> <property name="RequestId"
> >>
> >> expression="get-property('id-var')"
> >> action="ReadMessage"/>
> >> ---------------------------------------------------------------------
> >>
> >> But i am getting some error.So how to pass this value to another PoJo
> >> Command.
> >>
> >> Thanks and Regards
> >> Abhishek
> >>
> >> Asankha C. Perera wrote:
> >> >
> >> > Hi Abhishek
> >> >
> >> > Please only attach other files.. else the email becomes very messy and
> >> > unreadable :-(
> >> >> ERROR POJOCommandMediator Error invoking the execute() method on POJO
> >> >> class
> >> >
> >> >
> >> >> : class java.lang.Class
> >> >> java.lang.reflect.InvocationTargetException
> >> >> ...
> >> >> Caused by: java.lang.NoClassDefFoundError:
> >> >> com/sun/messaging/QueueConnectionFactory
> >> >>
> >> > Make sure your any JARs required by your JMS provider are copied to
> the
> >> > lib directory..
> >> >> What i am trying to do is to call this jms client using synapse.HOw
> to
> >> >> resolve this error?
> >> >> Any sample example of calling a independent jms client from synapse
> >> using
> >> >> pojo or a class mediator will also be helpful.
> >> >>
> >> > this is a plain old class not found.. nothing related to Synapse
> >> >
> >> > cheers
> >> > asankha
> >> >
> >> > --
> >> > Asankha C. Perera
> >> > AdroitLogic, http://adroitlogic.org
> >> >
> >> > http://esbmagic.blogspot.com
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22410020.html
> >> Sent from the Synapse - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Ruwan Linton
> > http://wso2.org - "Oxygenating the Web Services Platform"
> > http://ruwansblog.blogspot.com/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22429505.html
> Sent from the Synapse - User mailing list archive at Nabble.com.
>
>
--
Ruwan Linton
http://wso2.org - "Oxygenating the Web Services Platform"
http://ruwansblog.blogspot.com/
Re: Slightly OT: XML inside SOAP (RE: Invoking Synapse from Non
Axis 2 Client)
Posted by agupta2311 <st...@gmail.com>.
HI
I checked it properly and got to know that Pojo Command is not updating the
context.What can be the cause of this??
Thanks
Abhishek
Ruwan Linton wrote:
>
> Hi Abhishek,
>
> You should be using the following property to read the updated context
> property;
>
> <property name="RequestId" context-name="id-var" action="ReadContext"/>
>
> Hope this helps, here the idea is you are reading a context property with
> the name "id-var" into the "RequestId" field of the command impl.
>
> Thanks,
> Ruwan
>
> On Mon, Mar 9, 2009 at 3:23 PM, agupta2311 <st...@gmail.com> wrote:
>
>>
>> Hi Asankha
>>
>> I will take care from now onwards that i only attach files
>> Hey i have written this pojo Command
>> ----------------------------------------------------------------
>> <pojoCommand name="dblookup.Main">
>> <property
>> name="processString"
>> expression="//processstring"
>> action="ReadMessage"/>
>> <property name="id"
>> context-name="id-var"
>> action="UpdateContext"/>
>> </pojoCommand>
>> ----------------------------------------------------------------------
>>
>> The variable id takes its value from the class.
>> Now i want to pass the value of id to another pojo command.and i m doing
>> it
>> like this
>> ------------------------------------------------------------
>> <property name="RequestId"
>>
>> expression="get-property('id-var')"
>> action="ReadMessage"/>
>> ---------------------------------------------------------------------
>>
>> But i am getting some error.So how to pass this value to another PoJo
>> Command.
>>
>> Thanks and Regards
>> Abhishek
>>
>> Asankha C. Perera wrote:
>> >
>> > Hi Abhishek
>> >
>> > Please only attach other files.. else the email becomes very messy and
>> > unreadable :-(
>> >> ERROR POJOCommandMediator Error invoking the execute() method on POJO
>> >> class
>> >
>> >
>> >> : class java.lang.Class
>> >> java.lang.reflect.InvocationTargetException
>> >> ...
>> >> Caused by: java.lang.NoClassDefFoundError:
>> >> com/sun/messaging/QueueConnectionFactory
>> >>
>> > Make sure your any JARs required by your JMS provider are copied to the
>> > lib directory..
>> >> What i am trying to do is to call this jms client using synapse.HOw to
>> >> resolve this error?
>> >> Any sample example of calling a independent jms client from synapse
>> using
>> >> pojo or a class mediator will also be helpful.
>> >>
>> > this is a plain old class not found.. nothing related to Synapse
>> >
>> > cheers
>> > asankha
>> >
>> > --
>> > Asankha C. Perera
>> > AdroitLogic, http://adroitlogic.org
>> >
>> > http://esbmagic.blogspot.com
>> >
>> >
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22410020.html
>> Sent from the Synapse - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Ruwan Linton
> http://wso2.org - "Oxygenating the Web Services Platform"
> http://ruwansblog.blogspot.com/
>
>
--
View this message in context: http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22429505.html
Sent from the Synapse - User mailing list archive at Nabble.com.
Re: Slightly OT: XML inside SOAP (RE: Invoking Synapse from Non Axis
2 Client)
Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Abhishek
> Thanks for the solution.But I am getting value of requestid as 0.It is not
> able to get the value of id-var.My Request Id is in out sequence and id-var
> is updated in insequence.Can that make a difference?
>
No that cannot make a difference.. but you could try to log the id-var
as follows in the outsequence before the POJO mediator and see what you get
<log level="custom><property name="ID_VAR"
expression="get-property('id-var')"/></log>
cheers
asankha
--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org
http://esbmagic.blogspot.com
Re: Slightly OT: XML inside SOAP (RE: Invoking Synapse from Non
Axis 2 Client)
Posted by agupta2311 <st...@gmail.com>.
HI
Thanks for the solution.But I am getting value of requestid as 0.It is not
able to get the value of id-var.My Request Id is in out sequence and id-var
is updated in insequence.Can that make a difference?
Thanks and Regards
Abhishek
Ruwan Linton wrote:
>
> Hi Abhishek,
>
> You should be using the following property to read the updated context
> property;
>
> <property name="RequestId" context-name="id-var" action="ReadContext"/>
>
> Hope this helps, here the idea is you are reading a context property with
> the name "id-var" into the "RequestId" field of the command impl.
>
> Thanks,
> Ruwan
>
> On Mon, Mar 9, 2009 at 3:23 PM, agupta2311 <st...@gmail.com> wrote:
>
>>
>> Hi Asankha
>>
>> I will take care from now onwards that i only attach files
>> Hey i have written this pojo Command
>> ----------------------------------------------------------------
>> <pojoCommand name="dblookup.Main">
>> <property
>> name="processString"
>> expression="//processstring"
>> action="ReadMessage"/>
>> <property name="id"
>> context-name="id-var"
>> action="UpdateContext"/>
>> </pojoCommand>
>> ----------------------------------------------------------------------
>>
>> The variable id takes its value from the class.
>> Now i want to pass the value of id to another pojo command.and i m doing
>> it
>> like this
>> ------------------------------------------------------------
>> <property name="RequestId"
>>
>> expression="get-property('id-var')"
>> action="ReadMessage"/>
>> ---------------------------------------------------------------------
>>
>> But i am getting some error.So how to pass this value to another PoJo
>> Command.
>>
>> Thanks and Regards
>> Abhishek
>>
>> Asankha C. Perera wrote:
>> >
>> > Hi Abhishek
>> >
>> > Please only attach other files.. else the email becomes very messy and
>> > unreadable :-(
>> >> ERROR POJOCommandMediator Error invoking the execute() method on POJO
>> >> class
>> >
>> >
>> >> : class java.lang.Class
>> >> java.lang.reflect.InvocationTargetException
>> >> ...
>> >> Caused by: java.lang.NoClassDefFoundError:
>> >> com/sun/messaging/QueueConnectionFactory
>> >>
>> > Make sure your any JARs required by your JMS provider are copied to the
>> > lib directory..
>> >> What i am trying to do is to call this jms client using synapse.HOw to
>> >> resolve this error?
>> >> Any sample example of calling a independent jms client from synapse
>> using
>> >> pojo or a class mediator will also be helpful.
>> >>
>> > this is a plain old class not found.. nothing related to Synapse
>> >
>> > cheers
>> > asankha
>> >
>> > --
>> > Asankha C. Perera
>> > AdroitLogic, http://adroitlogic.org
>> >
>> > http://esbmagic.blogspot.com
>> >
>> >
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22410020.html
>> Sent from the Synapse - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Ruwan Linton
> http://wso2.org - "Oxygenating the Web Services Platform"
> http://ruwansblog.blogspot.com/
>
>
--
View this message in context: http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22428939.html
Sent from the Synapse - User mailing list archive at Nabble.com.
Re: Slightly OT: XML inside SOAP (RE: Invoking Synapse from Non Axis
2 Client)
Posted by Ruwan Linton <ru...@gmail.com>.
Hi Abhishek,
You should be using the following property to read the updated context
property;
<property name="RequestId" context-name="id-var" action="ReadContext"/>
Hope this helps, here the idea is you are reading a context property with
the name "id-var" into the "RequestId" field of the command impl.
Thanks,
Ruwan
On Mon, Mar 9, 2009 at 3:23 PM, agupta2311 <st...@gmail.com> wrote:
>
> Hi Asankha
>
> I will take care from now onwards that i only attach files
> Hey i have written this pojo Command
> ----------------------------------------------------------------
> <pojoCommand name="dblookup.Main">
> <property name="processString"
> expression="//processstring"
> action="ReadMessage"/>
> <property name="id"
> context-name="id-var"
> action="UpdateContext"/>
> </pojoCommand>
> ----------------------------------------------------------------------
>
> The variable id takes its value from the class.
> Now i want to pass the value of id to another pojo command.and i m doing it
> like this
> ------------------------------------------------------------
> <property name="RequestId"
> expression="get-property('id-var')"
> action="ReadMessage"/>
> ---------------------------------------------------------------------
>
> But i am getting some error.So how to pass this value to another PoJo
> Command.
>
> Thanks and Regards
> Abhishek
>
> Asankha C. Perera wrote:
> >
> > Hi Abhishek
> >
> > Please only attach other files.. else the email becomes very messy and
> > unreadable :-(
> >> ERROR POJOCommandMediator Error invoking the execute() method on POJO
> >> class
> >
> >
> >> : class java.lang.Class
> >> java.lang.reflect.InvocationTargetException
> >> ...
> >> Caused by: java.lang.NoClassDefFoundError:
> >> com/sun/messaging/QueueConnectionFactory
> >>
> > Make sure your any JARs required by your JMS provider are copied to the
> > lib directory..
> >> What i am trying to do is to call this jms client using synapse.HOw to
> >> resolve this error?
> >> Any sample example of calling a independent jms client from synapse
> using
> >> pojo or a class mediator will also be helpful.
> >>
> > this is a plain old class not found.. nothing related to Synapse
> >
> > cheers
> > asankha
> >
> > --
> > Asankha C. Perera
> > AdroitLogic, http://adroitlogic.org
> >
> > http://esbmagic.blogspot.com
> >
> >
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22410020.html
> Sent from the Synapse - User mailing list archive at Nabble.com.
>
>
--
Ruwan Linton
http://wso2.org - "Oxygenating the Web Services Platform"
http://ruwansblog.blogspot.com/
Re: Slightly OT: XML inside SOAP (RE: Invoking Synapse from Non
Axis 2 Client)
Posted by agupta2311 <st...@gmail.com>.
Hi Asankha
I will take care from now onwards that i only attach files
Hey i have written this pojo Command
----------------------------------------------------------------
<pojoCommand name="dblookup.Main">
<property name="processString"
expression="//processstring"
action="ReadMessage"/>
<property name="id" context-name="id-var"
action="UpdateContext"/>
</pojoCommand>
----------------------------------------------------------------------
The variable id takes its value from the class.
Now i want to pass the value of id to another pojo command.and i m doing it
like this
------------------------------------------------------------
<property name="RequestId"
expression="get-property('id-var')"
action="ReadMessage"/>
---------------------------------------------------------------------
But i am getting some error.So how to pass this value to another PoJo
Command.
Thanks and Regards
Abhishek
Asankha C. Perera wrote:
>
> Hi Abhishek
>
> Please only attach other files.. else the email becomes very messy and
> unreadable :-(
>> ERROR POJOCommandMediator Error invoking the execute() method on POJO
>> class
>
>
>> : class java.lang.Class
>> java.lang.reflect.InvocationTargetException
>> ...
>> Caused by: java.lang.NoClassDefFoundError:
>> com/sun/messaging/QueueConnectionFactory
>>
> Make sure your any JARs required by your JMS provider are copied to the
> lib directory..
>> What i am trying to do is to call this jms client using synapse.HOw to
>> resolve this error?
>> Any sample example of calling a independent jms client from synapse using
>> pojo or a class mediator will also be helpful.
>>
> this is a plain old class not found.. nothing related to Synapse
>
> cheers
> asankha
>
> --
> Asankha C. Perera
> AdroitLogic, http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
>
>
>
>
--
View this message in context: http://www.nabble.com/Invoking-Synapse-from-Non-Axis-2-Client-tp21970007p22410020.html
Sent from the Synapse - User mailing list archive at Nabble.com.
Re: Slightly OT: XML inside SOAP (RE: Invoking Synapse from Non Axis
2 Client)
Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Abhishek
Please only attach other files.. else the email becomes very messy and
unreadable :-(
> ERROR POJOCommandMediator Error invoking the execute() method on POJO class
> : class java.lang.Class
> java.lang.reflect.InvocationTargetException
> ...
> Caused by: java.lang.NoClassDefFoundError:
> com/sun/messaging/QueueConnectionFactory
>
Make sure your any JARs required by your JMS provider are copied to the
lib directory..
> What i am trying to do is to call this jms client using synapse.HOw to
> resolve this error?
> Any sample example of calling a independent jms client from synapse using
> pojo or a class mediator will also be helpful.
>
this is a plain old class not found.. nothing related to Synapse
cheers
asankha
--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org
http://esbmagic.blogspot.com