code: public static SOAPMessage send(String endpoint, SOAPMessage data) throws SOAPException{
          SOAPConnection soapConnection = null;
          try{
              SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
              soapConnection = soapConnectionFactory.createConnection();
  
              SOAPMessage soapResponse = soapConnection.call(data, endpoint);
  
              if(LOG.isTraceEnabled()){
                  LOG.trace("Sending soap to endpoint succeed\n" +
                          "                Endpoint: "+endpoint+"\n" +
                          "                SOAP: \n"+(data!=null?SOAPHelper.toString(data):null)+"\n" +
                          "                SOAP Response: \n"+(soapResponse!=null?SOAPHelper.toString(soapResponse):null));
              }else if(LOG.isDebugEnabled()){
                  LOG.trace("Sending soap to endpoint succeed\n" +
                          "                        Endpoint: "+endpoint);
              }
  
              return soapResponse;
          } catch (SOAPException e) {
              if(LOG.isTraceEnabled()){
                  LOG.trace("Sending soap to endpoint error: "+e.getClass().getName()+": "+e.getMessage()+"\n" +
                          "                Endpoint: "+endpoint+"\n" +
                          "                SOAP: \n"+(data!=null?SOAPHelper.toString(data):null)+"",e);
              }else if(LOG.isDebugEnabled()){
                  LOG.debug("Sending soap to endpoint error: "+e.getClass().getName()+": "+e.getMessage()+"\n" +
                          "                Endpoint: "+endpoint,e);
              }
              throw e;
          } finally {
              try{
                  if(soapConnection!=null)
                      soapConnection.close();
              }catch (Throwable e){}
          }
      }
docs: Send message
  
  @param endpoint service address
  @param data
  @return