title: Jax Ws with PHP client that always send Null parm
body: <p>I created a JaxWs service. User is trying to call it with PHP client, the only parm is a string. When I use Eclipse Web service browser (tester) it was fine. When the user tries with PHP I recieve a null parm in the method. I haven't done any customizing to wsdl or code. Thanks in advance for any pointers...</p>
  
  <p>Method</p>
  
  <pre><code>    @WebService(endpointInterface = "my.endpoint.class")
      public class ExternalReportsImpl implements ExternalReports {
  private org.w3c.dom.Document doc;
  @Resource
  private WebServiceContext context;
  private enum Types {
      tfbData, tfbRate, tfbSupport, tfbMakes, tfbVin, tfbSave, tfbRetrieve;
  }
  @Override
  
  public String getReports(String xmlSource){
      XmlHelper xh;
      SupportTables support =  new SupportTables();
      Connection con = null;  
      Policy policy  = null;
      String schema  = "";
      String ret     = "";
      ServletContext servletContext = (ServletContext)   context.getMessageContext().get(MessageContext.SERVLET_CONTEXT);
      try {
          xh = new XmlHelper();
          doc = xh.loadDoc(xmlSource);
               }
  </code></pre>
  
  <p>WSDL Snippet</p>
  
  <pre><code>&lt;message name="getReports"&gt;&lt;part name="parameters" element="tns:getReports"/&gt;&lt;/message&gt;&lt;message name="getReportsResponse"&gt;&lt;part name="parameters" element="tns:getReportsResponse"/&gt;&lt;/message&gt;&lt;portType name="ExternalReports"&gt;&lt;operation name="getReports"&gt;&lt;input wsam:Action="http://my.class/ExternalReports/getReportsRequest" message="tns:getReports"/&gt;&lt;output wsam:Action="http://my.class/ExternalReports/getReportsResponse" message="tns:getReportsResponse"/&gt;&lt;/operation&gt;&lt;/portType&gt;
  </code></pre>
  
  <p></p>
  
  <p>PHP CLIENT</p>
  
  <pre><code>   error_reporting(E_ALL);
  
  
      $url = 'http://my.endpoint/ExternalReportsWebService?wsdl';
  
      $client = new SoapClient($url);
  
      class getReports {
    function __construct($arg0) {
      $this-&gt;getReports = $arg0;
  }
      }
  
     class getReportsResponse {
  function __construct($arg0='') {
      $this-&gt;getReportsResponse = $arg0;
  }
       }
  
       //$GR = new getReports(file_get_contents("test/test.xml") );
       $GR = new getReports("test") );
       $GRR = new getReportsResponse();
  
        $report = new SoapVar( $GR  , SOAP_ENC_OBJECT, 'getReports', $url);
        $response = new SoapVar( $GRR  , SOAP_ENC_OBJECT, 'getReportsResponse', $url);
  
        echo nl2br(htmlspecialchars(print_r($client-&gt;getReports($report, $response), true)));
  </code></pre>
  
  <p>Add this code to PHP CLIENT</p>
  
  <pre><code>     echo "&lt;br&gt; LAST REQUEST &lt;br&gt;"  ;
       echo $client-&gt;__getLastRequest();
       echo " &lt;br&gt; Functions &lt;br&gt;"  ;
       echo $client-&gt;__getFunctions();
       echo " &lt;br&gt; Types &lt;br&gt;"  ;
       echo $client-&gt;__getTypes();
       echo "&lt;br&gt; Request headers &lt;br&gt;"  ;
       echo $client-&gt;__getLastRequestHeaders();
  </code></pre>
  
  <p>CLIENT TRACE RESULTS</p>
  
  <pre><code>    LAST REQUEST
          TEST
      Functions
         Array
      Types
         Array
      Request headers
         POST /myApp/ExternalReportsWebService HTTP/1.1 Host: localhost:8080          Connection: Keep-Alive User-Agent: PHP-SOAP/5.3.14 Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 531 
  </code></pre>