Note that there are some explanatory texts on larger screens.

plurals
  1. POAxis2 Webservice -> php
    text
    copied!<p>If I have understood Axis2 correct i can construct a WebService and then access it with any SOAP compatible client. </p> <p>I have a java class with a couple of methods that I have written in Eclipse, and then automatically constructed a service with the Axis2 plugin from WTP. </p> <p>This is the methods of my class. </p> <pre><code>public int test(int i){ return i+2; } public Car CarTest(int speed){ return new Car("Biltest", speed); } public CarFactoryAdapter getCarFactory(){ carFact.getCars().add(new Car("Bmw", 250)); carFact.getCars().add(new Car("seat", 350)); carFact.getCars().add(new Car("saab", 150)); carFact.getCars().add(new Car("volv", 50)); return new CarFactoryAdapter(carFact); } </code></pre> <p>The code seems to work when I try it with soapUI and the Axis2-web interface has recognized the methods of my service. But when Iam trying the methods that receives parameters with PHP´s built in soapClient i get a Unknown exception. The getCarFactory methods works at least as expected, but it seems kind of crippled if I can´t send parameters. </p> <p>Example of non working method invocation. </p> <pre><code>ini_set('soap.wsdl_cache_ttl',0); $client = new SoapClient("http://192.168.128.162:8080/ComplexWebService/services/CarService?wsdl", array('soap_version' =&gt; SOAP_1_2, 'trace' =&gt; 1)); $ar['i'] = (int)100; print_r($client-&gt;__soapCall("test",$ar)); </code></pre> <p>I need to make sure that the SOA framework i choose will be able to comunicate with many platforms, there will be clients in at least PHP and Java, but it would be good if it will work in for example .NET to. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload