# SOAP services

Lemonldap::NG provides 2 SOAP servers :

- the portal
- the manager (for internal use only)

## Portal SOAP services

SOAP functions are not accessible by network by default. SOAP functions are protected by Apache, you can change this in Apache portal configuration:

        # SOAP functions for sessions management (disabled by default)
        <Location /index.pl/adminSessions>
            Order deny,allow
            Allow from all
        </Location>

        # SOAP functions for sessions access (disabled by default)
        <Location /index.pl/sessions>
            Order deny,allow
            Allow from all
        </Location>

        # SOAP functions for configuration access (disabled by default)
        <Location /index.pl/config>
            Order deny,allow
            Allow from all
        </Location>

        # SOAP functions for notification insertion (disabled by default)
        <Location /index.pl/notification>
            Order deny,allow
            Allow from all
        </Location>

You can create a SOAP only portal by setting “soapOnly = 1” in lemonldap-ng.ini (section PORTAL)

- Read-only functions (index.pl/sessions or index.pl/adminSessions paths):
  - getCookies(user,password): authentication system. Returns cookie(s) name and values
  - getAttributes(cookieValue): get elements stored in session
  - isAuthorizedURI(cookieValue,url): check if user is granted to access to the function
  - getMenuApplications(cookieValue): return a list of authorizated applications (based on menu calculation)
- Read/Write functions (index.pl/adminSessions paths):
  - setAttributes(cookieValue,hashtable): update a session
  - newSession: create a session (return attributes)
  - deleteSession: delete a session
  - get_key_from_all_sessions: list all sessions and return asked keys
- Notification send function (index.pl/notification):
  - newNotification(xmlString): insert a notification for a user (see Notifications system for more)
- Notification delete function:
  - deleteNotification: delete notification(s) for a user (see Notifications system for more)

When you use SOAP sessions backend, it is recommended to use read-only URL (http://portal/index.pl/sessions). Write session path is needed only if you use a remote session explorer or a remote portal

## WSDL file

When portal is installed, a file named portal.wsdl is created. It can be upgraded using buildPortalWSDL script.