0

I know php webservice SOAP,json,rest etc, but I am new for java webservice. Now I want to get php client to java webservice. What is the best way to do this?

0

2 Answers 2

4

There is nothing new in it. Just create SoapClient with java web services WSDL URL and call it's method:

<?php
try{
    $proxy = new SoapClient("javaWsdlUrl?wsdl");
    $result = $proxy->javaWSMethod(array("arg0"=>"1234","arg1"=>"5678"));
    print_r($result);
} catch (Exception $e) {
    echo $e->getMessage ();
}
?>

Other things will be same like generating stubs, getting method names,...

Sign up to request clarification or add additional context in comments.

Comments

0

When you connnect to a public webservice like Amazon, you dont (necesserly) know what language is used to create the webservice (server side) . So you will connect to your java webservice the same way you connect to a php or any other webservice.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.