Tuesday Dec 16, 2008

Use DSML plugin in DSEE 6.3

  • Create a instance
#dsadm create /var//tmp/pat/instances/ds1
  • Start it
#dsadm start /var//tmp/pat/instances/ds1
  • Enable dsml plugin

#dsconf set-server-prop -p 1389 dsml-enabled:on

Directory Server must be restarted for changes to take effect.

  • Configure non secure dsml port
#dsconf set-server-prop -p 1389 dsml-port:1234
Directory Server must be restarted for changes to take effect.
  • Restart the instance
#dsadm start /var//tmp/pat/instances/ds1
  • Create a DSML request, for example request.dsml containing:

POST /dsml HTTP/1.1
Content-Length: 1038  !! this value must be the exact lenght of the blue portion below
HOST: stratoid
SOAPAction: ""
Content-Type: text/xml
Connection: close

<?xml version='1.0' encoding='UTF-8'?>
<soap-env:Envelope
   xmlns:xsd='http://www.w3.org/2001/XMLSchema'
   xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
   xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/'>
   <soap-env:Body>
      <batchRequest
        xmlns='urn:oasis:names:tc:DSML:2:0:core'
        requestID='Batch of search requests'>
        <searchRequest
            dn=""
            requestID="search on Root DSE"
            scope="baseObject"
            derefAliases="neverDerefAliases"
            typesOnly="false">
            <filter>
               <present name="objectClass"/>
            </filter>
            <attributes>
               <attribute name="namingContexts"/>
               <attribute name="supportedLDAPversion"/>
               <attribute name="vendorName"/>
               <attribute name="vendorVersion"/>
               <attribute name="supportedSASLMechanisms"/>
            </attributes>
        </searchRequest>
      </batchRequest>
   </soap-env:Body>
</soap-env:Envelope>

  • Then submit the request.html file using a tool sucjh as netcat
#netcat <your_host_name> 1234 < request.dsml
The returned SOAP message is : 

HTTP/1.1 200 OK
Cache-control: no-cache
Connection: close
Date: Tue, 16 Dec 2008 15:55:07 GMT
Accept-Ranges: none
Server: Sun-Java(tm)-System-Directory/6.3
Content-Type: text/xml; charset="utf-8"
Content-Length: 1141

<?xml version='1.0' encoding='UTF-8' ?>
<soap-env:Envelope
   xmlns:xsd='http://www.w3.org/2001/XMLSchema'
   xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
   xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/'
   >
<soap-env:Body>
<batchResponse
   xmlns:xsd='http://www.w3.org/2001/XMLSchema'
   xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
   xmlns='urn:oasis:names:tc:DSML:2:0:core'
   requestID='Batch of search requests'
   >
   <searchResponse requestID='search on Root DSE'>
   <searchResultEntry>
      <attr name='supportedLDAPVersion'>
      <value>2</value>
      <value>3</value>
      </attr>
      <attr name='vendorName'>
      <value>Sun Microsystems, Inc.</value>
      </attr>
      <attr name='vendorVersion'>
      <value>Sun-Java(tm)-System-Directory/6.3</value>
      </attr>
      <attr name='supportedSASLMechanisms'>
      <value>EXTERNAL</value>
      <value>DIGEST-MD5</value>
      </attr>
   </searchResultEntry>
   <searchResultDone>
      <resultCode code='0' descr='success'/>
   </searchResultDone>
   </searchResponse>
</batchResponse>
</soap-env:Body>
</soap-env:Envelope>

About

Patrice Duc-Jacquet

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today