Hello All, Thanks for all the suggestions and quick responses. I have also experienced the delays good that a JIRA ticket is open now. I have not come around to using 1.2 code from the repo. I will do so now and give my feedback.
Thanks, Altaf -----Original Message----- From: Konradi, Philipp (CT) [mailto:[EMAIL PROTECTED] Sent: 17 April 2008 23:48 To: tuscany-user@ws.apache.org Subject: Re: FW: JMS Binding - XML message - Message Format problems!! > It seems to be a SDO issue. It tries to open HTTP connection for some > URLs while it parses the XML into SDO. Would you please open a JIRA > against tuscany-sdo-impl to track it? Thanks Raymond for the fast reply. I'll open an jira. BTW: I use SDO 1.0 Would SDO 1.1 help? Does it work with SCA 1.1? Philipp -----Ursprüngliche Nachricht----- Von: Raymond Feng [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 17. April 2008 20:05 An: tuscany-user@ws.apache.org Betreff: Re: FW: JMS Binding - XML message - Message Format problems!! It seems to be a SDO issue. It tries to open HTTP connection for some URLs while it parses the XML into SDO. Would you please open a JIRA against tuscany-sdo-impl to track it? Thanks, Raymond -------------------------------------------------- From: "Konradi, Philipp (CT)" <[EMAIL PROTECTED]> Sent: Thursday, April 17, 2008 10:46 AM To: <tuscany-user@ws.apache.org> Subject: Re: FW: JMS Binding - XML message - Message Format problems!! > Hi, > > after I've switched from JMS messages containing Objects to XML > (migrated from Tuscany 1.0.1 to 1.1) my application needs around 7 sec > to call my service. > Before it reacted instantly. > > I've debugged into to see where the problem is and saw that receiving > of the JMS message works still instantly but the processing takes > pretty long. > Below in the stack trace one can see that a new http connection is > opened > (???) and I guess that's responsible for the delay. > > Any explanation for this behaviour? What am I doing wrong? > > The service's method I'm calling has an argument of complex type. > > Thanks, > Philipp > > Daemon Thread [ActiveMQ Session Task] (Suspended) > PlainSocketImpl.socketConnect(InetAddress, int, int) line: not > available [native method] PlainSocketImpl.doConnect(InetAddress, int, > int) line: 333 PlainSocketImpl.connectToAddress(InetAddress, int, int) > line: 195 PlainSocketImpl.connect(SocketAddress, int) line: 182 > Socket.connect(SocketAddress, int) line: 519 > Socket.connect(SocketAddress) line: 469 > HttpClient(NetworkClient).doConnect(String, int) line: 157 > HttpClient.openServer(String, int) line: 394 > HttpClient.openServer() line: 529 > HttpClient.<init>(URL, Proxy, int) line: 233 HttpClient.New(URL, > Proxy, int, boolean) line: 306 HttpClient.New(URL, Proxy, int) line: > 323 HttpURLConnection.getNewHttpClient(URL, Proxy, int) line: 788 > HttpURLConnection.plainConnect() line: 729 > HttpURLConnection.connect() line: 654 > HttpURLConnection.getInputStream() line: 977 > URIConverterImpl.createURLInputStream(URI) line: 566 > URIConverterImpl.createInputStream(URI) line: 453 > SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).getPackageFor > URI(String) > line: 2294 > SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).getFactoryFor > Prefix(String) > line: 2188 > SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).createObjectB > yType(String, > String, boolean) line: 1145 > SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).createTopObje > ct(String, > String) line: 1247 > SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).processElemen > t(String, > String, String) line: 883 > SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).startElement( > String, > String, String) line: 866 > SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).startElement( > String, > String, String, Attributes) line: 627 > SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(String, > String, String, Attributes) line: 401 > StAX2SAXAdapter.handleStartElement(XMLStreamReader, ContentHandler) line: > 162 > StAX2SAXAdapter.parse(XMLStreamReader, ContentHandler) line: 111 > SDOXMLResourceImpl$SDOXMLLoadImpl$1.run() line: 472 > AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not > available [native method] > SDOXMLResourceImpl$SDOXMLLoadImpl.load(XMLResource, XMLStreamReader, > Map) > line: 470 > SDOXMLResourceImpl.load(XMLStreamReader, Map) line: 598 > XMLDocumentImpl.load(XMLStreamReader, Map) line: 248 > XMLStreamHelperImpl.loadDocument(XMLStreamReader, Map) line: 136 > XMLStreamHelperImpl.loadObject(XMLStreamReader, Map) line: 98 > XMLStreamHelperImpl.loadObject(XMLStreamReader) line: 102 > XMLStreamReader2DataObject.transform(XMLStreamReader, > TransformationContext) line: 49 > XMLStreamReader2DataObject.transform(Object, TransformationContext) line: > 34 > DefaultTransformerExtensionPoint$LazyPullTransformer.transform(Object, > TransformationContext) line: 199 > MediatorImpl.mediate(Object, DataType, DataType, Map<String,Object>) line: > 73 > Input2InputTransformer.transform(Object[], TransformationContext) line: > 179 > Input2InputTransformer.transform(Object, TransformationContext) line: > 43 MediatorImpl.mediate(Object, DataType, DataType, Map<String,Object>) line: > 73 > DataTransformationInterceptor.transform(Object, DataType, DataType, > boolean) line: 175 > DataTransformationInterceptor.invoke(Message) line: 72 > RuntimeWireInvoker.invoke(InvocationChain, Message, RuntimeWire) line: > 113 RuntimeWireInvoker.invoke(RuntimeWire, Operation, Message) line: > 88 RuntimeWireInvoker.invoke(Operation, Message) line: 82 > RuntimeWireImpl.invoke(Operation, Object[]) line: 122 > JMSBindingListener.invokeService(Message) line: 108 > JMSBindingListener.onMessage(Message) line: 62 > ActiveMQMessageConsumer.dispatch(MessageDispatch) line: 854 > ActiveMQSessionExecutor.dispatch(MessageDispatch) line: 99 > ActiveMQSessionExecutor.iterate() line: 166 > PooledTaskRunner.runTask() line: 117 > PooledTaskRunner.access$100(PooledTaskRunner) line: 26 > PooledTaskRunner$1.run() line: 44 > ThreadPoolExecutor$Worker.runTask(Runnable) line: 665 > ThreadPoolExecutor$Worker.run() line: 690 > Thread.run() line: 619 > > > > -----Ursprüngliche Nachricht----- > Von: Konradi, Philipp (CT) [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 17. April 2008 17:22 > An: tuscany-user@ws.apache.org > Betreff: Re: FW: JMS Binding - XML message - Message Format problems!! > > Hi, > > I've actually tried it just with XML-Text and Object messages, but I > like the idea to have plain text message, which I guess get mapped to > a single String argument on the method. > >> Can you try this out on the trunk code to see if it does the type of >> thing you need? > Just from looking at the sample it's exactly what I have needed, a > flag to declare the type of messages. > I'll try to test it in the next days whether it would work for me. > >> Or what release of Tuscany are you using if you need it back ported >> to give it a try and provide feedback? > I'm not working on the trunk and use Tuscany 1.1 and will migrate to > 1.2 soon. > Would it work if I use the jms binding jar from nightly build together > with 1.2 distro? > > Thanks, > Philipp > > -----Ursprüngliche Nachricht----- > Von: ant elder [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 17. April 2008 12:04 > An: tuscany-user@ws.apache.org > Betreff: Re: FW: JMS Binding - XML message - Message Format problems!! > > On Wed, Apr 16, 2008 at 10:50 AM, ant elder <[EMAIL PROTECTED]> wrote: > >> >> >> On Tue, Apr 15, 2008 at 8:32 PM, Altaf Muneer <[EMAIL PROTECTED]> wrote: >> >> > Hi, >> > >> > I hava deployed a* Java SCA service* and I am trying to use the* >> > JMS >> > binding* that tuscany provides. >> > I have used a small java program to post a message to an activemq >> > queue. >> > I use the the JMS binding on the Java SCA service side to listen >> > for messages. >> > When I used an "*ObjectMessage*" to post the message to the queue >> > it worked fine with tuscany's* 1.0.1 release*. >> > But when I migrated to the 1.1 release of tuscany I started getting >> > runtime exceptions because the* 1.1 release* accepts only* XML >> > messages*. >> > >> > I therefore used a "*TextMessage*" object and formatted an xml >> > message string and posted this to the queue. >> > >> > This calls the appropriate method. But after calling the method it >> > throws the following runtime exceptions. >> > >> > Exception while processing message:* >> > >> > java.lang.ClassCastException*:*org.apache.tuscany.sca.binding.jms.i >> > mpl.JMSBindingException >> > * >> > >> > *java.lang.ClassCastException*:* >> > org.apache.tuscany.sca.binding.jms.impl.JMSBindingException* >> > at >> > >> > org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessorImpl >> > .createXMLJMSMessage( >> > *JMSMessageProcessorImpl.java:140*) >> > >> > at >> > >> > org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessorImpl >> > .insertPayloadIntoJMSMessage( >> > *JMSMessageProcessorImpl.java:85*) >> > >> > at >> > >> > org.apache.tuscany.sca.binding.jms.provider.JMSBindingListener.send >> > Reply(* >> > JMSBindingListener.java:125*) >> > at >> > >> > org.apache.tuscany.sca.binding.jms.provider.JMSBindingListener.send >> > FaultReply( >> > *JMSBindingListener.java:152*) >> > at >> > >> > org.apache.tuscany.sca.binding.jms.provider.JMSBindingListener.onMe >> > ssage(* >> > JMSBindingListener.java:65*) >> > at org.apache.activemq.ActiveMQMessageConsumer.dispatch(* >> > ActiveMQMessageConsumer.java:854*) >> > at org.apache.activemq.ActiveMQSessionExecutor.dispatch(* >> > ActiveMQSessionExecutor.java:99*) >> > at org.apache.activemq.ActiveMQSessionExecutor.iterate(* >> > ActiveMQSessionExecutor.java:166*) >> > at org.apache.activemq.thread.PooledTaskRunner.runTask(* >> > PooledTaskRunner.java:117*) >> > at org.apache.activemq.thread.PooledTaskRunner.access$100(* >> > PooledTaskRunner.java:26*) >> > at org.apache.activemq.thread.PooledTaskRunner$1.run(* >> > PooledTaskRunner.java:44*) >> > at >> > >> > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$W >> > orker.runTask( >> > *ThreadPoolExecutor.java:665*) >> > >> > at >> > >> > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$W >> > orker.run( >> > *ThreadPoolExecutor.java:690*) >> > at java.lang.Thread.run(Unknown Source) >> > >> > >> > It is a little strange because it throws an exception after calling >> > the right method. >> > >> > The xml message I sent had the following structure. >> > >> > <soapenv:Envelope >> > xmlns:q0="http://namespace1" >> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >> > xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> > <soapenv:Header> >> > </soapenv:Header> >> > <soapenv:Body> >> > <q0:methodname> >> > <q0:argname> >> > <q0:id>myId</q0:id> >> > <q0:name>myName</q0:name> >> > </q0:argname> >> > </q0:methodname> >> > </soapenv:Body> >> > </soapenv:Envelope> >> > >> > I am not sure what the problem here is. I think it might have to do >> > with the message format. >> > >> > Also the method that is called does not have a return argument >> > (that is it has a void return type). Is that a problem? >> > >> > Is there a kindred soul who can help me here :) ? >> > Any help would be greatly appreciated. >> > >> > Cheers, >> > Altaf >> > >> >> There's two problems here, one is how to use other message types >> beside JMS Text messages containing XML, and the other is the >> ClassCastException you're seeing after the service method has been >> invoked when there's a void return type. I think the 2nd of those has >> been fixed in the trunk code and >> 1.2 release which is just about to become available. The other >> problem of how to use other message types is harder because the SCA >> specs only define how to do JMS text messages containing XML, and so >> far we haven't come up with a good flexible Tuscany specific way to >> provide that function. I shall have a go now at implementing >> something so its at least possible, but feel free to post any >> suggestions... >> >> ...ant >> >> > I've committed some changes in r648997 for a start of supporting > either XML Text messages, plain Text messages, or Object messages. > There's an example of using those in the JMS itests , > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/itest/jms/ > src/main/resources/nonSCAclient/service.composite > . > > Can you try this out on the trunk code to see if it does the type of > thing you need? Or what release of Tuscany are you using if you need > it back ported to give it a try and provide feedback? > > ...ant > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Important notice:This e-mail and any attachment thereto contains corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank You. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]