title: Calling a Java web service created using Axis from PHP code
body: <p>Im trying to call a Java web service created using Axis from PHP code.The webservice is hosted on my LAN. I am able to call the web service successfully using SoapUI. I have the PHP Soap Extension installed.
  However,im not sure whether my PHP code is correct. Below is my PHP code.</p>
  
  <pre><code>&lt;?php
   $client = new SoapClient('http://machinename/axis/services/Compiere?wsdl');
   $params = array('in0'=&gt; '124','in1'=&gt;'1');
   $result = $client-&gt;__SoapCall('createOrder',array($params));
   print $result-&gt;createOrderReturn;
  ?&gt;
  </code></pre>
  
  <p>The WSDL is as follows :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;wsdl:definitions targetNamespace="http://compservice.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://compservice.com" xmlns:intf="http://compservice.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;!--WSDL created by Apache Axis version: 1.4
  Built on Apr 22, 2006 (06:55:48 PDT)--&gt;
  
     &lt;wsdl:message name="createOrderRequest"&gt;
  
        &lt;wsdl:part name="in0" type="xsd:int"/&gt;
  
        &lt;wsdl:part name="in1" type="xsd:int"/&gt;
  
     &lt;/wsdl:message&gt;
  
     &lt;wsdl:message name="createOrderResponse"&gt;
  
        &lt;wsdl:part name="createOrderReturn" type="xsd:string"/&gt;
  
     &lt;/wsdl:message&gt;
  
     &lt;wsdl:portType name="OrderServiceInt"&gt;
  
        &lt;wsdl:operation name="createOrder" parameterOrder="in0 in1"&gt;
  
           &lt;wsdl:input message="impl:createOrderRequest" name="createOrderRequest"/&gt;
  
           &lt;wsdl:output message="impl:createOrderResponse" name="createOrderResponse"/&gt;
  
        &lt;/wsdl:operation&gt;
  
     &lt;/wsdl:portType&gt;
  
     &lt;wsdl:binding name="CompiereSoapBinding" type="impl:OrderServiceInt"&gt;
  
        &lt;wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
  
        &lt;wsdl:operation name="createOrder"&gt;
  
           &lt;wsdlsoap:operation soapAction=""/&gt;
  
           &lt;wsdl:input name="createOrderRequest"&gt;
  
              &lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://compservice.com" use="encoded"/&gt;
  
           &lt;/wsdl:input&gt;
  
           &lt;wsdl:output name="createOrderResponse"&gt;
  
              &lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://compservice.com" use="encoded"/&gt;
  
           &lt;/wsdl:output&gt;
  
        &lt;/wsdl:operation&gt;
  
     &lt;/wsdl:binding&gt;
  
     &lt;wsdl:service name="OrderServiceIntService"&gt;
  
        &lt;wsdl:port binding="impl:CompiereSoapBinding" name="Compiere"&gt;
  
           &lt;wsdlsoap:address location="http://nuca232/axis/services/Compiere"/&gt;
  
        &lt;/wsdl:port&gt;
  
     &lt;/wsdl:service&gt;
  
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>Is my PHP code correct ?</p>
  
  <p>Please help.
  Thank You.</p>