How do I publish an xml message? : BEA Weblogic



How do I publish an xml message? : BEA Weblogic..

Answer / Nipun Kumar Gupta

To publish an XML message in WebLogic, you can use JAXB to convert the XML into a Java object, then create a MessageProducer and set the content of the message using the setObjectProperty method.n```javanMessageProducer producer = session.createProducer(queue); Message message = producer.createMessage(); // create an empty message Object xmlObject = JAXBContext.newInstance("package.name").createUnmarshaller().unmarshal(new StringReader("<message>content</message>")); message.setObjectProperty("Content", xmlObject); producer.send(message); // send the XML messagen```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Weblogic Interview Questions

What are tuning jvm parameters?

1 Answers  


What are the disadvantages of node manager?

1 Answers  


Write a program of web logic server to get the connection pool attribute?

1 Answers  


How many weblogic servers can I have on a multi-cpu machine?

1 Answers  


Can an mdb be a message producer or both a producer and consumer? : BEA Weblogic

1 Answers  


Why do I get an exception when trying to find a connection factory? : BEA Weblogic

1 Answers  


what are configuration classes in weblogic

2 Answers   Motorola,


What is thread stack size? What is the default thread stack size in windows? Which memory space does thread stack get allocated from?

1 Answers  


What are the toolbar elements.

1 Answers  


When should I use the -nostage option?

1 Answers  


What is SSL in weblogic ?

1 Answers  


What are the differences between a web logic server and a web server?

1 Answers  


Categories