Search in sources :

Example 1 with SOAPBody

use of org.openecard.ws.soap.SOAPBody in project open-ecard by ecsec.

the class JAXBMarshaller method add2soap.

@Override
public synchronized SOAPMessage add2soap(Document content) throws SOAPException {
    SOAPMessage msg = soapFactory.createMessage();
    SOAPBody body = msg.getSOAPBody();
    body.addDocument(content);
    return msg;
}
Also used : SOAPBody(org.openecard.ws.soap.SOAPBody) SOAPMessage(org.openecard.ws.soap.SOAPMessage)

Example 2 with SOAPBody

use of org.openecard.ws.soap.SOAPBody in project open-ecard by ecsec.

the class MarshalTest method testConversion.

@Test
public void testConversion() throws Exception {
    JAXBMarshaller m = new JAXBMarshaller();
    Document doc = m.str2doc(xmlStr);
    org.openecard.ws.soap.SOAPMessage msg = m.doc2soap(doc);
    SOAPBody body = msg.getSOAPBody();
    Node result = body.getChildElements().get(0);
    // System.out.println(m.doc2str(result));
    Object o = m.unmarshal(result);
    doc = m.marshal(o);
    assertNotNull(doc);
// System.out.println(m.doc2str(doc));
}
Also used : SOAPBody(org.openecard.ws.soap.SOAPBody) Node(org.w3c.dom.Node) SOAPMessage(org.openecard.ws.soap.SOAPMessage) Document(org.w3c.dom.Document) Test(org.testng.annotations.Test)

Example 3 with SOAPBody

use of org.openecard.ws.soap.SOAPBody in project open-ecard by ecsec.

the class AndroidMarshaller method add2soap.

@Override
public SOAPMessage add2soap(Document content) throws SOAPException {
    SOAPMessage msg = soapFactory.createMessage();
    SOAPBody body = msg.getSOAPBody();
    body.addDocument(content);
    return msg;
}
Also used : SOAPBody(org.openecard.ws.soap.SOAPBody) SOAPMessage(org.openecard.ws.soap.SOAPMessage)

Aggregations

SOAPBody (org.openecard.ws.soap.SOAPBody)3 SOAPMessage (org.openecard.ws.soap.SOAPMessage)3 Test (org.testng.annotations.Test)1 Document (org.w3c.dom.Document)1 Node (org.w3c.dom.Node)1