Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 7906 invoked from network); 11 Nov 2008 10:43:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Nov 2008 10:43:21 -0000 Received: (qmail 13555 invoked by uid 500); 11 Nov 2008 10:43:27 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 13530 invoked by uid 500); 11 Nov 2008 10:43:26 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 13519 invoked by uid 99); 11 Nov 2008 10:43:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 02:43:26 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 10:42:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Kzqhq-0003mh-N8 for users@activemq.apache.org; Tue, 11 Nov 2008 02:42:46 -0800 Message-ID: <20437036.post@talk.nabble.com> Date: Tue, 11 Nov 2008 02:42:46 -0800 (PST) From: manish_goyal To: users@activemq.apache.org Subject: Unmarshlling SOAP message to JAVA object MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: manishkumar_goyal@infosys.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, I have send a JAVA Object to JMS after converting it to the SOAP message. Using following code:- MessageFactory mf = MessageFactory.newInstance(); /* * Create a SOAP message object.*/ SOAPMessage soapMessage = mf.createMessage(); soapMessage.setProperty(javax.xml.soap.SOAPMessage.CHARACTER_SET_ENCODING, "UTF-8"); SOAPPart soapPart = soapMessage.getSOAPPart(); SOAPEnvelope envelope = soapPart.getEnvelope(); envelope.setEncodingStyle("http://schemas.xmlsoap.org/soap/encoding/"); SOAPBody soapBody = (SOAPBody)envelope.getBody(); JAXBContext jc1 = JAXBContext.newInstance( "com.cvs.eph.test" ); Marshaller marshaller = jc1.createMarshaller(); marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE ); marshaller.marshal( client, System.out ); marshaller.marshal( client,soapBody); soapMessage.saveChanges(); soapMessage.writeTo(System.out); Message m = MessageTransformer.SOAPMessageIntoJMSMessage(soapMessage, session ); producer.send(m); Now in my consumer Java Application which is listening to JMS queue, I need to convert this SOAP message to JAVA object. Please give the pointers to convert back to JAVA objcet. Thanks. Regards, Manish -- View this message in context: http://www.nabble.com/Unmarshlling-SOAP-message-to-JAVA-object-tp20437036p20437036.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.