-
Feb 27th, 2013, 03:47 AM
#1
create complete Soap XML from @RootElement
How to generate complete Soap XML from @RootElement object with spring util?
-
Mar 5th, 2013, 02:08 AM
#2
I have the following code but it does not generate the soap header and envelop. Any tips?
// Create the Marshaller, so that we can generate the request SOAP Body XMl
JAXBContext jc= JAXBContext.newInstance(PaymentCode.class);
Marshaller m=jc.createMarshaller();
// Creating the Request Object
PaymentCode paymentCode=new PaymentCode();
paymentCode.setPaymentCode(999);
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
StringWriter wr=new StringWriter();
// Marshalling the object to the writer
m.marshal(paymentCode, wr);
System.out.println(wr.toString());
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules