
org.codehaus.xfire.xmpp.SoapEnvelopePacket Maven / Gradle / Ivy
The newest version!
package org.codehaus.xfire.xmpp;
import org.jdom.Document;
import org.jdom.output.XMLOutputter;
import org.jivesoftware.smack.packet.IQ;
/**
* @author Dan Diephouse
*/
public class SoapEnvelopePacket
extends IQ
{
private String body;
private Document doc;
private final static XMLOutputter outputter = new XMLOutputter();
public SoapEnvelopePacket(String body)
{
this.body = body;
}
public SoapEnvelopePacket(Document doc)
{
this.doc = doc;
}
public String getChildElementXML()
{
if (body != null)
{
return body;
}
else if (doc != null)
{
return outputter.outputString(doc);
}
else
{
throw new RuntimeException("Body can not be null!");
}
}
public Document getDocument()
{
return doc;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy