StateFull WebService

santos.luis.87's picture
Anyone know how to implement a client to communicate with a Jax-ws Statefull Webservice? Jax-ws Webservice use ws-addressing to maintain the state. I'm trying to achieve something like this http://www.javapassion.com/handsonlabs/wsglassfish/ but whit a wso2php client. Can someone help?
nandika's picture

Re: StateFull Web Service

If you have a service endpoint which provide you with the wsdl, you can start implementing the client by code generating using wsdl2php tool and then filling out the necessary sections. -- Nandika
santos.luis.87's picture

thanks. I have no problem to

thanks. I have no problem to communicate with the service. When i send my request, using wsdl mode, i got this answer, "This is a stateful web service and {http://jax-ws.dev.java.net/xml/ns/}objectId header is required.".   I have tried to send resquest to service using WSMessage but the server send nothing back. /* $header1 = new WSHeader(array( "ns" => "http://stkws/",                                    "name" => "objectId",                                    "data" => $objid,                    "mustUnderstand" => false)); */   $clientcat = new  WSClient(array ("to"=>"http://127.0.0.1:8080/strickerws/ambientesService","wsdl"=>"ambientesService.wsdl"));    $requestPayloadString = <<<XML <ns1:setLanguage xmlns:ns1="http://stkws/ambientes"> <langcode>es_ES</langcode> </ns1:setLanguage> XML; $msg = new WSMessage($requestPayloadString ,     array( "to" => "http://127.0.0.1:8080/strickerws/ambientesService",         "action"=>"http://stkws/ambientes/setLanguageRequest")); $response=$clientcat->request($msg);   wsf_php_client.log : [Wed Oct 22 18:06:20 2008] [debug] http_transport_sender.c(798) using axis2 native http sender. [Wed Oct 22 18:06:20 2008] [debug] http_sender.c(416) msg_ctx_id:urn:uuid:bf786442-a05b-1dd1-26ff-0018f3f4a88b [Wed Oct 22 18:06:20 2008] [error] http_sender.c(1419) Error occurred in transport [Wed Oct 22 18:06:20 2008] [error] engine.c(179) Transport sender invoke failed [Wed Oct 22 18:06:20 2008] [error] /home/lsantos/Desktop/wso2-wsf-php-src-2.0.0/src/wsf_client.c(1649) [WSF/PHP] Response Payload NULL( Error number and code) => : 74 :: Error occurred in transport Glassfish server log [#|2008-10-22T18:30:52.038+0100|SEVERE|sun-appserver9.1|com.sun.xml.ws.transport.http.HttpAdapter|_ThreadID=14;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=d07752f6-27e6-4997-a936-adb19475d55d;|Unsupported Content-Type: application/soap+xml;charset=UTF-8;action="http://stkws/ambientes/setLanguageRequest" Supported ones are: [text/xml] com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml;charset=UTF-8;action="http://stkws/ambientes/setLanguageRequest" Supported ones are: [text/xml]    
nandika's picture

change your soap version to soap 1.1

change your soap version to soap 1.1 nandika
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)