Error trying to generate service wsdl
I get the following error when trying to generate the wsdl from my php script. The same error is displayed when navigating to the service?wsdl url. I'm lost on what needs to be done to resolve this.
# php /usr/local/src/wso2-wsf-php-src-1.3.2/scripts/wsdl2php.php -s warnerfam_service.php
Warning: DOMDocument::load(): Start tag expected, '<' not found in /var/www/localhost/htdocs/warnerfam_service.php, line: 88 in /usr/local/src/wso2-wsf-php-src-1.3.2/scripts/wsdl2php/wsf_class_writer.php on line 229
WSDL could not be loaded.<?php
// define PHP functions that maps to WSDL operations
// define the operations map
$operations = array();
// create service in WSDL mode
$service = new WSService(array ("wsdl" =>"warnerfam_service.php",
"operations" => $operations));
// process client requests and reply
$service->reply();
?>
The URL is:
http://jasper.us/warnerfam_service.php?wsdl
The Page returns (line 88 is last line of PHP script):
XML Parsing Error: no element found
Location: http://jasper.us/warnerfam_service.php?wsdl
Line Number 88, Column 1:
The Server debug log contains:
[Mon Aug 25 12:18:51 2008] [debug] /usr/local/src/wso2-wsf-php-src-1.3.2/src/wsf.c(866) [wsf_service] setting operations
[Mon Aug 25 12:18:51 2008] [debug] /usr/local/src/wso2-wsf-php-src-1.3.2/src/wsf.c(881) [wsf_service] setting message operation parameters
[Mon Aug 25 12:18:51 2008] [debug] /usr/local/src/wso2-wsf-php-src-1.3.2/src/wsf.c(930) [wsf_service] request xop 0
[Mon Aug 25 12:18:51 2008] [debug] phase_resolver.c(123) Service name is : warnerfam_service.php
[Mon Aug 25 12:18:51 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Aug 25 12:18:51 2008] [debug] phase_resolver.c(375) Trying to add this handler AddressingInHandler to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
[Mon Aug 25 12:18:51 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Aug 25 12:18:51 2008] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Mon Aug 25 12:18:51 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Aug 25 12:18:51 2008] [debug] phase_resolver.c(259) Module name is:addressing
[Mon Aug 25 12:18:51 2008] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Mon Aug 25 12:18:51 2008] [info] wsf_wsdl.php
[Mon Aug 25 12:18:51 2008] [debug] /usr/local/src/wso2-wsf-php-src-1.3.2/src/wsf_wsdl.c(963) [wsf_wsdl]received data from scripts
[Mon Aug 25 12:18:51 2008] [debug] /usr/local/src/wso2-wsf-php-src-1.3.2/src/wsf.c(1360) raw post data not found
- Login or register to post comments
- Printer friendly version
- 338 reads











RE:Error trying to generate service wsdl
Hi,
wsdl2php script is for generating php clients and services using a wsdl file. If you want to generate the wsdl using the php service, you need to deploy your service in apache and type "<url to your service>?wsdl". Then you will get the wsdl on the browser.
1. Also you have not specified any operations in your operations map. Without operations defined, it is not possible to generate wsdl.
2. In case you have specifed the wsdl in the WSService constructor, will be loaded from the given location and displayed, In your case you are specifying "warnerfam_service.php" which is wrong.
Regards
Nandika