List of usage examples for javax.xml.soap SOAPConnection get
public SOAPMessage get(Object to) throws SOAPException
From source file:org.apache.axis2.saaj.SOAPConnectionTest.java
public void testGet() { if (isNetworkedResourceAvailable("http://java.sun.com/index.html")) { try {//w ww .ja va 2 s. c om SOAPConnectionFactory sf = new SOAPConnectionFactoryImpl(); SOAPConnection con = sf.createConnection(); //Create a valid non webservice endpoint for invoking HTTP-GET URL urlEndpoint = new URL("http", "java.sun.com", 80, "/index.html"); //invoking HTTP-GET with a valid non webservice endpoint should throw a SOAPException SOAPMessage reply = con.get(urlEndpoint); } catch (Exception e) { assertTrue(e instanceof SOAPException); } } else { //If resource is not available online, do a mock test assertTrue(true); } }