title: How to run commands through a SoapClient in JAVA
body: <p>What would be the equivalent of this short php code in java?</p>
  
  <pre><code>$client = new SoapClient(NULL,
    array(
      "location" =&gt; "http://hostname:port/')",
      "uri" =&gt; "urn:String",
      "style" =&gt; SOAP_RPC,
      'login' =&gt; "soapuser",
      'password' =&gt; "soappass",
    )
  );
  
  
  $command = "This command will be sent to SOAP";
  try {
    $result = $client-&gt;executeCommand(new SoapParam($command, "command"));
    return true;
  }
  catch (Exception $e)  {
    return false;
  }
  </code></pre>
  
  <p>is it possible to achieve the same result with a short java class ?</p>