blib/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm untested

filter: Statementstmt 0.0% 0 / 232 Branchbran 0.0% 0 / 60 Conditioncond 0.0% 0 / 15 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 28 Podpod 0.0% 0 / 19 totaltotal 0.0% 0 / 354 CC 28 SCAR 27.9
CC
28
Cov
0%
init
30.0
getCookies
30.0
getAttributes
30.0
CRAP 16.3
1 # Session server plugin for SOAP call
2 #
3 # This plugin adds the following entry points:
4 # * POST /sessions , methods: getCookies getAttributes isAuthorizedURI
5 # * POST /adminSessions, methods: getAttributes setAttributes isAuthorizedURI
6 # newSession deleteSession getCipheredToken
7 # get_key_from_all_sessions
8 # * POST /config , methods: getConfig lastCfg
9 #
10 # There is no conflict with REST server, they can be used together
11  
12 package Lemonldap::NG::Portal::Plugins::SOAPServer;
13  
14 use strict;
15 use Mouse;
16 use Lemonldap::NG::Portal::Main::Constants qw(
17 PE_OK
18 PE_FORMEMPTY
19 URIRE
20 );
21  
22 our $VERSION = '2.19.0';
23  
24 extends qw(
25 Lemonldap::NG::Portal::Main::Plugin
26 Lemonldap::NG::Common::Conf::AccessLib
27 );
28  
29 has server => ( is => 'rw' );
30 has configStorage => (
31 is => 'ro',
32 lazy => 1,
33 default => sub {
34 $_[0]->{p}->HANDLER->localConfig->{configStorage};
35 }
36 );
37 has exportedAttr => (
38 is => 'rw',
39 lazy => 1,
40 default => sub {
41 my $conf = $_[0]->{conf};
42 if ( $conf->{exportedAttr} and $conf->{exportedAttr} !~ /^\s*\+/ ) {
43 return [ split /\s+/, $conf->{exportedAttr} ];
44 }
45 else {
46 my @attributes = (
47 'authenticationLevel', 'groups',
48 'ipAddr', '_startTime',
49 '_utime', '_lastSeen',
50 '_session_id', '_session_kind',
51 );
52 if ( my $exportedAttr = $conf->{exportedAttr} ) {
53 $exportedAttr =~ s/^\s*\+\s+//;
54 @attributes = ( @attributes, split( /\s+/, $exportedAttr ) );
55  
56 # Convert @attributes into hash to remove duplicates
57 my %attributes = map( { $_ => 1 } @attributes );
58 return '[' . join( ',', keys %attributes ) . ']';
59 }
60  
61 # Convert @attributes into hash to remove duplicates
62 my %attributes = map( { $_ => 1 } @attributes );
63 %attributes = (
64 %attributes,
65 %{ $conf->{exportedVars} },
66 %{ $conf->{macros} },
67 );
68  
69 return [ sort keys %attributes ];
70 }
71 }
72 );
73  
74 ########
75 # WSDL #
76 ########
77  
78 has wsdl => (
79 is => 'ro',
80 lazy => 1,
81 default => sub {
82 my ($self) = @_;
83 my @cookies = ( $self->conf->{cookieName} );
84 push @cookies, $self->conf->{cookieName} . 'http'
85 if ( $self->conf->{securedCookie} >= 2 );
86 my $cookieList = join "\n",
87 map { "<element name='$_' type='xsd:string'></element>" } @cookies;
88  
89 my $attrList = join "\n", map {
90 "<element name='$_' type='xsd:string' nillable='true'></element>"
91 } @{ $self->exportedAttr };
92 my $resp = join( '', <DATA> );
93 close DATA;
94 $resp =~ s/\$cookieList/$cookieList/g;
95 $resp =~ s/\$attrList/$attrList/g;
96 $resp =~ s/\$portal/$self->p->buildUrl/ge;
97 return [
98 200,
99 [
100 'Content-Type' => 'application/wsdl+xml',
101 'Content-Length' => length($resp)
102 ],
103 [$resp]
104 ];
105 }
106 );
107  
108 # INITIALIZATION
109  
110 sub init {
111 my ($self) = @_;
112 eval {
113 require Lemonldap::NG::Common::PSGI::SOAPServer;
114 require Lemonldap::NG::Common::PSGI::SOAPService;
115 };
116 if ($@) {
117 $self->error($@);
118 return 0;
119 }
120 $self->server( Lemonldap::NG::Common::PSGI::SOAPServer->new );
121 if ( $self->conf->{soapSessionServer} ) {
122 $self->addUnauthRoute(
123 sessions => { '*' => 'unauthSessions' },
124 ['POST']
125 )
126  
127 ->addUnauthRoute(
128 adminSessions => 'unauthAdminSessions',
129 ['POST']
130 )
131  
132 ->addAuthRoute(
133 sessions => { '*' => 'badSoapRequest' },
134 ['POST']
135 )
136  
137 ->addAuthRoute(
138 adminSessions => { '*' => 'badSoapRequest' },
139 ['POST']
140 );
141 }
142 if ( $self->conf->{soapConfigServer} ) {
143 $self->addUnauthRoute( config => { '*' => 'config' }, ['POST'] )
144 ->addAuthRoute( config => { '*' => 'badSoapRequest' }, ['POST'] );
145 }
146 if ( $self->conf->{wsdlServer} ) {
147 $self->addUnauthRoute( 'portal.wsdl' => 'getWsdl', ['GET'] )
148 ->addAuthRoute( 'portal.wsdl' => 'getWsdl', ['GET'] );
149 }
150  
151 return 1;
152 }
153  
154 # SOAP DISPATCHERS
155 sub unauthSessions {
156 my ( $self, $req ) = @_;
157 return $self->dispatch_to( $req,
158 qw(error getCookies getAttributes isAuthorizedURI getMenuApplications)
159 );
160 }
161  
162 sub unauthAdminSessions {
163 my ( $self, $req ) = @_;
164 return $self->dispatch_to(
165 $req,
166 qw(getCookies getAttributes isAuthorizedURI getMenuApplications
167 newSession setAttributes deleteSession getCipheredToken
168 get_key_from_all_sessions)
169 );
170 }
171  
172 sub config {
173 my ( $self, $req ) = @_;
174 return $self->dispatch_to( $req, qw(getConfig lastCfg) );
175 }
176  
177 sub badSoapRequest {
178 my ( $self, $req ) = @_;
179 return $self->p->sendError( $req, 'Bad request', 400 );
180 }
181  
182 # Private dispatcher
183 sub dispatch_to {
184 my ( $self, $req, @functions ) = @_;
185 unless ( $req->env->{HTTP_SOAPACTION} ) {
186 return $self->p->sendError( $req, 'SOAP requests only', 400 );
187 }
188 return $self->server->dispatch_to(
189 Lemonldap::NG::Common::PSGI::SOAPService->new(
190 $self, $req, @functions
191 )
192 )->handle($req);
193 }
194  
195 # RESPONSE METHODS
196  
197 # Called in SOAP context, returns cookies in an array.
198 # This subroutine works only for portals working with user and password
199  
200 sub getWsdl {
201 return $_[0]->wsdl;
202 }
203  
204 sub error {
205 my ( $self, $no, $lang ) = @_;
206 return "Error $no";
207 }
208  
209 =begin WSDL
210  
211 _IN user $string User name
212 _IN password $string Password
213 _RETURN $getCookiesResponse Response
214  
215 =end WSDL
216  
217 =cut
218  
219 sub getCookies {
220 my ( $self, $req, $user, $password, $sessionid ) = @_;
221 $self->logger->debug("SOAP authentication request for $user");
222  
223 $req->{user} = $user;
224 $req->data->{password} = $password;
225 if ($sessionid) {
226 $req->{id} = $sessionid;
227 $req->{force} = 1;
228 }
229  
230 $req->{error} = PE_OK;
231  
232 # User and password are required
233 unless ( $req->{user} && $req->data->{password} ) {
234 $req->{error} = PE_FORMEMPTY;
235 }
236  
237 # Launch process
238 else {
239 $req->steps( [
240 qw(getUser authenticate setAuthSessionInfo),
241 @{ $self->p->betweenAuthAndData },
242 $self->p->sessionData,
243 @{ $self->p->afterData },
244 $self->p->validSession,
245 @{ $self->p->endAuth },
246 ]
247 );
248 $req->{error} = $self->p->process($req);
249 $self->logger->debug(
250 "SOAP authentication result for $user: code $req->{error}");
251 $self->p->updateSession($req);
252 }
253 my @tmp = ();
254 push @tmp, SOAP::Data->name( errorCode => $req->{error} );
255 my @cookies = ();
256 unless ( $req->{error} ) {
257 for ( my $i = 0 ; $i < @{ $req->respHeaders } ; $i += 2 ) {
258 if ( $req->respHeaders->[$i] eq 'Set-Cookie' ) {
259 my ( $k, $v ) =
260 ( $req->respHeaders->[ $i + 1 ] =~ /^(\w+)\s*=\s*([^;]*)/ );
261 push @cookies, SOAP::Data->name( $k, $v )->type("string");
262 }
263 }
264 }
265 push @tmp, SOAP::Data->name( cookies => \SOAP::Data->value(@cookies) );
266 my $res = SOAP::Data->name( session => \SOAP::Data->value(@tmp) );
267  
268 #TODO: updateStatus
269 #$self->p->updateStatus($req);
270 return $res;
271 }
272  
273 # Return attributes of the session identified by $id.
274 # @param $id Cookie value
275  
276 =begin WSDL
277  
278 _IN id $string Cookie value
279 _RETURN $getAttributesResponse Response
280  
281 =end WSDL
282  
283 =cut
284  
285 sub getAttributes {
286 my ( $self, $req, $id ) = @_;
287 die 'id is required' unless ($id);
288  
289 my $session =
290 $self->p->getApacheSession( $id, kind => '', hashStore => 0, );
291  
292 my @tmp = ();
293 unless ($session) {
294 $self->userLogger->notice(
295 "SOAP attributes request: session $id not found");
296 push @tmp, SOAP::Data->name( error => 1 )->type('int');
297 }
298 else {
299 my $wtt = $session->data->{ $self->conf->{whatToTrace} };
300 $self->userLogger->info(
301 "SOAP attributes request for " . ( $wtt ? $wtt : $id ) );
302 push @tmp, SOAP::Data->name( error => 0 )->type('int');
303 push @tmp,
304 SOAP::Data->name(
305 attributes => _buildSoapHash(
306 $session->data,
307 ( (
308 $session->{_session_kind}
309 and $session->{_session_kind} eq 'SSO'
310 )
311 ? ( @{ $self->exportedAttr } )
312 : ()
313 )
314 )
315 );
316 }
317 my $res = SOAP::Data->name( session => \SOAP::Data->value(@tmp) );
318 return $res;
319 }
320  
321 # Update data in the session referenced by $id
322 # @param $id Id of the session
323 # @param $args data to store
324  
325 =begin WSDL
326  
327 _IN id $string Cookie value
328 _RETURN $setAttributesResponse Response
329  
330 =end WSDL
331  
332 =cut
333  
334 sub setAttributes {
335 my ( $self, $req, $id, $args ) = @_;
336 die 'id is required' unless ($id);
337  
338 my $infos = {};
339 %$infos = %$args;
340  
341 my $session =
342 $self->p->getApacheSession( $id, info => $infos, hashStore => 0 );
343  
344 unless ($session) {
345 $self->logger->warn("Session $id does not exists ($@)");
346 return 0;
347 }
348  
349 $self->logger->debug("SOAP request to update session $id");
350  
351 return 1;
352 }
353  
354 # Return Lemonldap::NG configuration. Warning, this is not a well formed
355 # SOAP::Data object so it can be difficult to read by other languages than
356 # Perl. It's not really a problem since this function is written to be read by
357 # Lemonldap::NG components and is not designed to be shared.
358  
359 sub getConfig {
360 my ( $self, $req, $id ) = @_;
361 my $conf = $self->confAcc->getConf( { raw => 1, cfgNum => $id } )
362 or die("No configuration available");
363 return $conf;
364 }
365  
366 # SOAP method that return the last configuration number.
367 # Call Lemonldap::NG::Common::Conf::lastCfg().
368  
369 sub lastCfg {
370 my $self = shift;
371 return $self->confAcc->lastCfg;
372 }
373  
374 # Store a new session.
375  
376 sub newSession {
377 my ( $self, $req, $args ) = @_;
378  
379 $args ||= {};
380 my $infos = {};
381 %$infos = %$args;
382 $infos->{_utime} = time();
383  
384 my $session = $self->p->getApacheSession( undef, info => $infos );
385  
386 unless ($session) {
387 $self->logger->error("Unable to create session");
388 return 0;
389 }
390  
391 $self->logger->debug(
392 "SOAP request create a new session (" . $session->id . ")" );
393  
394 return SOAP::Data->name( attributes => _buildSoapHash( $session->data ) );
395 }
396  
397 # Deletes an existing session
398  
399 sub deleteSession {
400 my ( $self, $req, $id ) = @_;
401 die('id parameter is required') unless ($id);
402  
403 my $session = $self->p->getApacheSession( $id, kind => '' );
404  
405 return 0 unless ($session);
406  
407 $self->logger->debug("SOAP request to delete session $id");
408  
409 return $self->p->_deleteSession( $req, $session );
410 }
411  
412 # Returns key from all sessions
413  
414 sub getCipheredToken {
415 my ( $self, $req ) = @_;
416 require Lemonldap::NG::Portal::Lib::OneTimeToken;
417 return $self->conf->{cipher}->encrypt(
418 Lemonldap::NG::Portal::Lib::OneTimeToken->new(
419 { p => $self->p, conf => $self->conf, timeout => 5 }
420 )->createToken()
421 );
422 }
423  
424 sub get_key_from_all_sessions {
425 my $self = shift;
426 my $req = shift;
427 my $token = shift;
428  
429 # Verify that token is valid (must be unciphered by client)
430 require Lemonldap::NG::Portal::Lib::OneTimeToken;
431 unless (
432 Lemonldap::NG::Portal::Lib::OneTimeToken->new(
433 { p => $self->p, conf => $self->conf }
434 )->getToken($token)
435 )
436 {
437 die SOAP::Fault->faultcode('Server.Custom')->faultstring('Bad token');
438 }
439 my $moduleOptions = $self->conf->{globalStorageOptions} || {};
440 $moduleOptions->{backend} = $self->conf->{globalStorage};
441 require Lemonldap::NG::Common::Apache::Session;
442  
443 no strict 'refs';
444 return Lemonldap::NG::Common::Apache::Session->get_key_from_all_sessions(
445 $moduleOptions, @_ );
446 }
447  
448 # Check user's authorization for uri.
449 # @param $id Id of the session
450 # @param $uri URL string
451  
452 =begin WSDL
453  
454 _IN id $string Cookie value
455 _IN uri $string URI to test
456 _RETURN $isAuthorizedURIResponse Response
457  
458 =end WSDL
459  
460 =cut
461  
462 sub isAuthorizedURI {
463 my ( $self, $req, $id, $url ) = @_;
464 die 'id is required' unless ($id);
465 die 'uri is required' unless ($url);
466 my ( $host, $uri );
467 if ( $url =~ URIRE ) {
468 ( $host, $uri ) = ( $1, $2 );
469 }
470 else {
471 die 'Bad uri';
472 }
473  
474 # Get user session.
475 my $session = $self->p->getApacheSession($id);
476  
477 unless ($session) {
478 $self->logger->warn("Session $id does not exists");
479 return 0;
480 }
481  
482 $req->{sessionInfo} = $session->data;
483 my $r =
484 $self->p->HANDLER->grant( $req, $req->{sessionInfo}, $uri, undef, $host );
485  
486 return $r;
487 }
488  
489 # @param $id Id of the session
490  
491 #######################
492 # Private subroutines #
493 #######################
494  
495 ##@fn private SOAP::Data _buildSoapHash()
496 # Serialize a hashref into SOAP::Data. Types are fixed to "string".
497 # @return SOAP::Data serialized data
498 sub _buildSoapHash {
499 my ( $h, @keys ) = @_;
500 my @tmp = ();
501 @keys = keys %$h unless (@keys);
502 foreach (@keys) {
503 if ( ref( $h->{$_} ) eq 'ARRAY' ) {
504 push @tmp, SOAP::Data->name( $_, @{ $h->{$_} } );
505 }
506 elsif ( ref( $h->{$_} ) ) {
507 push @tmp, SOAP::Data->name( $_ => _buildSoapHash( $h->{$_} ) );
508 }
509 else {
510 push @tmp, SOAP::Data->name( $_, $h->{$_} )->type('string')
511 if ( defined( $h->{$_} ) );
512 }
513 }
514 return \SOAP::Data->value(@tmp);
515 }
516  
517 1;
518  
519 __DATA__
520 <?xml version="1.0" encoding="UTF-8"?>
521  
522 <wsdl:definitions
523 targetNamespace="urn:Lemonldap/NG/Common/PSGI/SOAPService"
524 xmlns:impl="urn:Lemonldap/NG/Common/PSGI/SOAPService"
525 xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
526 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
527 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
528 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
529 xmlns:tns1="urn:Lemonldap/NG/Common/PSGI/SOAPService">
530  
531 <!-- types definitions -->
532  
533 <wsdl:types>
534 <schema targetNamespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" xmlns="http://www.w3.org/2001/XMLSchema">
535 <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
536  
537 <complexType name="CookiesSequence">
538 <sequence>
539 $cookieList
540 </sequence>
541 </complexType>
542 <complexType name="AttributesSequence">
543 <sequence>
544 $attrList
545 </sequence>
546 </complexType>
547 <complexType name="GetCookieResponse">
548 <sequence>
549 <element name="errorCode" type="xsd:int"></element>
550 <element name="cookies" minOccurs="0" type="tns1:CookiesSequence"></element>
551 </sequence>
552 </complexType>
553 <complexType name="GetAttributesResponse">
554 <sequence>
555 <element name="error" type="xsd:int"></element>
556 <element name="attributes" type="tns1:AttributesSequence"></element>
557 </sequence>
558 </complexType>
559  
560 </schema>
561 </wsdl:types>
562  
563 <!-- sessions service -->
564  
565 <wsdl:message name="errorRequest">
566 <wsdl:part name="code" type="xsd:int" />
567 <wsdl:part name="lang" type="xsd:string" />
568 </wsdl:message>
569 <wsdl:message name="errorResponse">
570 <wsdl:part name="result" type="xsd:string" />
571 </wsdl:message>
572  
573 <wsdl:message name="getCookiesRequest">
574 <wsdl:part name="user" type="xsd:string" />
575 <wsdl:part name="password" type="xsd:string" />
576 </wsdl:message>
577 <wsdl:message name="getCookiesResponse">
578 <wsdl:part name="session" type="tns1:GetCookieResponse" />
579 </wsdl:message>
580  
581 <wsdl:message name="getAttributesRequest">
582 <wsdl:part name="id" type="xsd:string" />
583 </wsdl:message>
584 <wsdl:message name="getAttributesResponse">
585 <wsdl:part name="session" type="tns1:GetAttributesResponse" />
586 </wsdl:message>
587  
588 <wsdl:message name="isAuthorizedURIRequest">
589 <wsdl:part name="id" type="xsd:string" />
590 <wsdl:part name="uri" type="xsd:string" />
591 </wsdl:message>
592 <wsdl:message name="isAuthorizedURIResponse">
593 <wsdl:part name="result" type="xsd:int" />
594 </wsdl:message>
595  
596 <wsdl:message name="getMenuApplicationsRequest">
597 <wsdl:part name="id" type="xsd:string" />
598 </wsdl:message>
599 <wsdl:message name="getMenuApplicationsResponse">
600 <wsdl:part name="result" type="xsd:anyType" />
601 </wsdl:message>
602  
603 <wsdl:portType name="sessionsPortType">
604 <wsdl:operation name="error" parameterOrder="code lang">
605 <wsdl:input message="impl:errorRequest" name="errorRequest" />
606 <wsdl:output message="impl:errorResponse" name="errorResponse" />
607 </wsdl:operation>
608 <wsdl:operation name="getCookies" parameterOrder="user password">
609 <wsdl:input message="impl:getCookiesRequest" name="getCookiesRequest" />
610 <wsdl:output message="impl:getCookiesResponse" name="getCookiesResponse" />
611 </wsdl:operation>
612 <wsdl:operation name="getAttributes" parameterOrder="id">
613 <wsdl:input message="impl:getAttributesRequest" name="getAttributesRequest" />
614 <wsdl:output message="impl:getAttributesResponse" name="getAttributesResponse" />
615 </wsdl:operation>
616 <wsdl:operation name="isAuthorizedURI" parameterOrder="id uri">
617 <wsdl:input message="impl:isAuthorizedURIRequest" name="isAuthorizedURIRequest" />
618 <wsdl:output message="impl:isAuthorizedURIResponse" name="isAuthorizedURIResponse" />
619 </wsdl:operation>
620 <wsdl:operation name="getMenuApplications" parameterOrder="id">
621 <wsdl:input message="impl:getMenuApplicationsRequest" name="getMenuApplicationsRequest" />
622 <wsdl:output message="impl:getMenuApplicationsResponse" name="getMenuApplicationsResponse" />
623 </wsdl:operation>
624 </wsdl:portType>
625  
626 <wsdl:binding name="sessionsBinding" type="impl:sessionsPortType">
627 <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
628 <wsdl:operation name="error">
629 <wsdlsoap:operation soapAction="" />
630 <wsdl:input name="errorRequest">
631 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
632 </wsdl:input>
633 <wsdl:output name="errorResponse">
634 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
635 </wsdl:output>
636 </wsdl:operation>
637 <wsdl:operation name="getCookies">
638 <wsdlsoap:operation soapAction="" />
639 <wsdl:input name="getCookiesRequest">
640 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
641 </wsdl:input>
642 <wsdl:output name="getCookiesResponse">
643 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
644 </wsdl:output>
645 </wsdl:operation>
646 <wsdl:operation name="getAttributes">
647 <wsdlsoap:operation soapAction="" />
648 <wsdl:input name="getAttributesRequest">
649 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
650 </wsdl:input>
651 <wsdl:output name="getAttributesResponse">
652 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
653 </wsdl:output>
654 </wsdl:operation>
655 <wsdl:operation name="isAuthorizedURI">
656 <wsdlsoap:operation soapAction="" />
657 <wsdl:input name="isAuthorizedURIRequest">
658 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
659 </wsdl:input>
660 <wsdl:output name="isAuthorizedURIResponse">
661 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
662 </wsdl:output>
663 </wsdl:operation>
664 <wsdl:operation name="getMenuApplications">
665 <wsdlsoap:operation soapAction="" />
666 <wsdl:input name="getMenuApplicationsRequest">
667 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
668 </wsdl:input>
669 <wsdl:output name="getMenuApplicationsResponse">
670 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
671 </wsdl:output>
672 </wsdl:operation>
673  
674 </wsdl:binding>
675  
676 <wsdl:service name="sessionsService">
677 <wsdl:port binding="impl:sessionsBinding" name="sessionsPort">
678 <wsdlsoap:address location="$portal/sessions" />
679 </wsdl:port>
680 </wsdl:service>
681  
682 <!-- end sessions service -->
683  
684 <!-- notification service -->
685  
686 <wsdl:message name="newNotificationRequest">
687 <wsdl:part name="notification" type="xsd:string" />
688 </wsdl:message>
689 <wsdl:message name="newNotificationResponse">
690 <wsdl:part name="result" type="xsd:int" />
691 </wsdl:message>
692 <wsdl:message name="deleteNotificationRequest">
693 <wsdl:part name="uid" type="xsd:string" />
694 <wsdl:part name="myref" type="xsd:string" />
695 </wsdl:message>
696 <wsdl:message name="deleteNotificationResponse">
697 <wsdl:part name="result" type="xsd:int" />
698 </wsdl:message>
699  
700 <wsdl:portType name="notificationPortType">
701 <wsdl:operation name="newNotification" parameterOrder="notification">
702 <wsdl:input message="impl:newNotificationRequest" name="newNotificationRequest" />
703 <wsdl:output message="impl:newNotificationResponse" name="newNotificationResponse" />
704 </wsdl:operation>
705 <wsdl:operation name="deleteNotification" parameterOrder="uid myref">
706 <wsdl:input message="impl:deleteNotificationRequest" name="deleteNotificationRequest" />
707 <wsdl:output message="impl:deleteNotificationResponse" name="deleteNotificationResponse" />
708 </wsdl:operation>
709 </wsdl:portType>
710  
711 <wsdl:binding name="notificationBinding" type="impl:notificationPortType">
712 <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
713 <wsdl:operation name="newNotification">
714 <wsdlsoap:operation soapAction="" />
715 <wsdl:input name="newNotificationRequest">
716 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
717 </wsdl:input>
718 <wsdl:output name="newNotificationResponse">
719 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
720 </wsdl:output>
721 </wsdl:operation>
722 <wsdl:operation name="deleteNotification">
723 <wsdlsoap:operation soapAction="" />
724 <wsdl:input name="deleteNotificationRequest">
725 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
726 </wsdl:input>
727 <wsdl:output name="deleteNotificationResponse">
728 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Lemonldap/NG/Common/PSGI/SOAPService" use="encoded" />
729 </wsdl:output>
730 </wsdl:operation>
731 </wsdl:binding>
732  
733 <wsdl:service name="notificationService">
734 <wsdl:port binding="impl:notificationBinding" name="notificationPort">
735 <wsdlsoap:address location="$portal/notifications" />
736 </wsdl:port>
737 </wsdl:service>
738  
739 <!-- end notification service -->
740  
741 </wsdl:definitions>