简体   繁体   中英

PHP SOAP Client for Java Web Service

I have built a wsdl using Java's web services and an running it on localhost(wamp). I am trying to create a PHP SoapClient for the wsdl but it says 'Extra content at the end of the document'. But when I try to run the service using a Java Client or a .NEt Client it runs the wsdl.

I've tried searching it on the net but still couldn't find the problem. Please help.

Here's how I am creating the SoapClient:

$client = new SoapClient('http://localhost/path/to/ServiceSever?wsdl', array('trace' => 1));

I've also tried to run it by creating a SoapServer and then create a client from it:

$server = new SoapServer('http://localhost/path/to/ServiceSever?wsdl');
$server->addFunction('getinfos');
$server->handle();

I use this to create the soapClient call in PHP given a runnning wsdl http://sourceforge.net/projects/wsdl2php/

and here you can find the documentation http://www.urdalen.no/wsdl2php/manual.php

give it a try

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM