Apache crashes while interpreting WSDL for Webservice (UsingAddressing)

richter.s.eplan.de's picture
Hello! I'm trying to create a webservice using WSDL mode. Unfortunately the Apache webserver completely crashes on accessing the webservice the first time because of some Policy issues. Hello! I'm trying to create a webservice using WSDL mode. Unfortunately the Apache webserver completely crashes on accessing the webservice the first time because of some Policy issues. My WSDL contains a policy with the following element: wsas:UsingAddressing xmlns:wsas="http://www.w3.org/2006/02/addressing/wsdl" At accessing the webservice the complete Apache webserver crashes. In my wsf-server logfile I found the following messages: [Tue Dec 01 15:29:40 2009] [error] ..\..\neethi\src\assertion_builder.c(492) [neethi] Unknown Assertion UsingAddressing with namespace http://www.w3.org/2006/05/addressing/wsdl [Tue Dec 01 15:29:40 2009] [error] ..\..\neethi\src\engine.c(571) [neethi] Assertion creation failed from element. [Tue Dec 01 15:29:40 2009] [error] ..\..\neethi\src\engine.c(134) [neethi] All creation failed [Tue Dec 01 15:29:40 2009] [error] ..\..\neethi\src\engine.c(490) [neethi] All creation failed from element. [Tue Dec 01 15:29:40 2009] [error] ..\..\neethi\src\engine.c(181) [neethi] Exactlyone creation failed. [Tue Dec 01 15:29:40 2009] [error] ..\..\neethi\src\engine.c(518) [neethi] Exactlyone creation failed from element. [Tue Dec 01 15:29:40 2009] [error] ..\..\neethi\src\engine.c(278) [neethi] Policy creation failed. When I remove the "UsingAddressing" declaration then the startup of the webservice works fine, but the operations will not be found. The webservice also works fine when I remove all occurences of policies in the WSDL file. But at the end of the day we will need policies in our WSDL for security purposes and we will need WSDL mode for creating webservices. I also tried to assign a policy.xml beside my WSDL document at creating the WSService object - but this file was ignored. Does anyone has a hint? Any work-around? I need urgend help. Thanks, Stefan
AttachmentSize
Messages.wsdl25.01 KB
razvan.musca.yahoo.com's picture

I have that issue also! Did

I have that issue also! Did you found any solution about that ? Or any work-around ? Best Regards, Razvan.
lgassman.getsense.com.ar's picture

Could you solve this problem?

Could you solve this problem? How?
alex.henriet.gmail.com's picture

Hi, I'm encountering a

Hi, I'm encountering a similar problem .. cat /tmp/wsf_php_client.log [Thu Jul 28 14:25:33 2011] [error] assertion_builder.c(510) [neethi] Unknown Assertion UsingAddressing with namespace http://www.w3.org/2006/05/addressing/wsdl [Thu Jul 28 14:25:33 2011] [error] engine.c(548) [neethi] Assertion creation failed from element. [Thu Jul 28 14:25:33 2011] [error] engine.c(145) [neethi] All creation failed [Thu Jul 28 14:25:33 2011] [error] engine.c(473) [neethi] All creation failed from element. [Thu Jul 28 14:25:33 2011] [error] engine.c(190) [neethi] Exactlyone creation failed. [Thu Jul 28 14:25:33 2011] [error] engine.c(496) [neethi] Exactlyone creation failed from element. [Thu Jul 28 14:25:33 2011] [error] engine.c(285) [neethi] Policy creation failed. [Thu Jul 28 14:25:33 2011] [warning] msg_ctx.c(1384) RampartClientConfiguration not set in message context [Thu Jul 28 14:25:33 2011] [error] rampart_out_handler.c(130) [rampart]Security header building failed. [Thu Jul 28 14:25:33 2011] [error] phase.c(224) Handler RampartOutHandler invoke failed within phase Security [Thu Jul 28 14:25:33 2011] [error] engine.c(657) Invoking phase Security failed [Thu Jul 28 14:25:33 2011] [error] /home/alex/wso2-wsf-php-src-2.1.0/src/wsf_wsdl.c(1226) [wsf_wsdl] Response envelope not found Here is how the PHP Code looks like : <?php set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . DIRECTORY_SEPARATOR . 'scripts'); $serverCert = ws_get_cert_from_file("server_cert.cert"); $clientCert = ws_get_cert_from_file("client_cert2.cert"); $clientPk = ws_get_key_from_file("client_cert2.pem"); $secToken = new WSSecurityToken( array( 'privateKey' => $clientPk, 'certificate' => $clientCert, 'receiverCertificate' => $serverCert, 'ttl' => 300 ) ); $clientOptions = array( 'wsdl' => 'replaced_before_posting_on_the_forum_wsdl_url_here', 'securityToken' => $secToken, 'useSOAP' => '1.1', 'useWSA' => true, 'useMTOM' => false ); $client = new WSClient($clientOptions); $proxy = $client->getProxy(); try { $return = $proxy->SayHello( array( 'Name' => 'John Doe' ) ); } catch(Exception $e) { die('Exception : ' . $e->getMessage() . PHP_EOL); } echo 'Result : ' . PHP_EOL; var_dump($return); Any idea ?
nandika's picture

Re

WSDL Mode in the current release seems to be broken for new versions of php. Try using the xml,in out mode for critical scenarios. Regards Nandika
pixelchutes's picture

WSDL Mode fix for PHP 5.3?

nandika, do you happen to know what might be the cause behind the issues on PHP 5.3.x and WSDL mode? Is it something that is currently being looked into and may soon be fixed?
lsopko.3di.it's picture

I found crash point

Hi, I was debuging a bit. Win7 + ZendServer CE + PHP 5.3.8 NTS + WSO/PHP 2.1.0(compiled NTS for VC9.0) It crash on any 'require_once() in php scripts called from wsf_c if it is changed to 'require()' it stop crash :) strange, I have no time to compile PHP in debug mode for look at real crash casue, but I hope it help you. crash file : wsf_wsdl.php function: wsf_extract_wsdl_info() just first require_once('dynamic_invocation/wsf_wsdl_consts.php') crash php-cgi.exe after change to: require('dynamic_invocation/wsf_wsdl_consts.php') it go over :) it is a bit tricky to set breakpoints in, but if you add scripts dir to some PHP project in eclise, it'll debug it well, but strting.php must be in the same dir like wsf_wsdl.php (it seems, there is some problem in path handling too) It seems, execution of PHP script from PHP extension have som bugs in. its pitty cause I can't use WSO in my project .... regards Laco.
lsopko.3di.it's picture

Other problem

After fix of require_once(), I found that there are no options passed to WSDL discovery process. I have SOAP server protected by login and password, and I use proxy as well (to chceck my packets). And during debug I found that to routines for WSDL check and load wsf.dll extension is not passing any option except wsdl url. this is my peace of PHP code: $client = new WSClient( array( 'wsdl' => 'http://localhost:9090/3diwsPXML/services/eXtraWay?wsdl', 'useMTOM' => true, 'responseXOP' => true, 'proxyHost' => 'localhost', 'proxyPort' => '7777', 'httpAuthUsername' => 'admin', 'httpAuthPassword' => 'admin' ) ); try{ $proxy = $client->getProxy(); }catch(Exception $e){ echo $e->getMessage(); } Am I doing somthing wrong? Laco. P.S. Just one other thing. There is problem with your site. I can't log in with my credentials. All time I have to ask to change password. Then I go in Profile I set Password. And after LogOff there is again my credentials unrecognised. So all time, only way how to access your site is just to ask for password change.
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)