org.vizzini.util.xml
Class XMLTransporter

java.lang.Object
  extended by org.vizzini.util.xml.XMLTransporter

public class XMLTransporter
extends Object

Provides convenience methods to send XML documents.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
static XMLTransporter getInstance()
          Return the singleton instance.
 String sendXml(String urlStr, String xmlMessage, boolean isResponseExpected)
          Send the given XML message to the given URL.
 String sendXml(URL url, String xmlMessage, boolean isResponseExpected)
          Send the given XML message to the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static XMLTransporter getInstance()
Return the singleton instance.

Since:
v0.3

sendXml

public String sendXml(String urlStr,
                      String xmlMessage,
                      boolean isResponseExpected)
               throws MalformedURLException,
                      IOException
Send the given XML message to the given URL.

Parameters:
urlStr - Destination URL as a String.
xmlMessage - XML message.
isResponseExpected - Flag indicating if a response is expected.
Returns:
the response string, or null if no response is expected.
Throws:
IOException
MalformedURLException
Since:
v0.3

sendXml

public String sendXml(URL url,
                      String xmlMessage,
                      boolean isResponseExpected)
               throws IOException
Send the given XML message to the given URL.

Parameters:
url - Destination URL.
xmlMessage - XML message.
isResponseExpected - Flag indicating if a response is expected.
Returns:
the response string, or null if no response is expected.
Throws:
IOException
Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02