Skip to main content

JAX to PHP - parameters problem

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-02-07

Hi guys!
This is my first post here, and I really need some help. I have created a simple SAX-WS in Eclipse which has one method that takes in a string and returns a "hello + string", it looks like this:
package hello;
import javax.jws.WebService;
@WebService(endpointInterface = "hello.Greeting")
public class GreetingImp implements Greeting {
public String sayHello(String name) {
return "Hello" + name;
I use then Endpoint.publish("http://localhost:8080/WS/Greeting",new GreetingImp()); to publish WS. I downloaded soapUI to test if WS is working and it did. So next step was to try out a PHP client. I did it like this:
$client = new SoapClient('http://localhost:8080/WS/Greeting?wsdl');
When I try this out I get result from function but parameter is set to null ("Hello null"). I have played a bit with the code and soapUI and it seams like parameters are not sent to JAX. Does anyone know what might be the problem? Is it JAX?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-02-07

Nevermind, figured out myself :)
Problem was that my parameter had a strange name, arg0. I found out this when I did
I got output:
array(2) { [0]=> string(33) "struct sayHello { string arg0; }" [1]=> string(43) "struct sayHelloResponse { string return; }" }
so I have changed my function call to:
and it worked :)