Adaxes Web Interface HelpShow AllHide All

SOAP Message Samples

This article contains the samples of SOAP messages for the Adaxes SPML Provider.

Core Operations Samples

List of Targets
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <listTargetsRequest xmlns="urn:oasis:names:tc:SPML:2:0"/>
  </soap:Body>
</soap:Envelope>
       

Create a New User
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <addRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything" targetID="all domains">
      <containerID ID="OU=Unit,DC=company,DC=com" />
      <data>
        <attr name="cn" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>John Smith</value>
        </attr>
        <attr name="description" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>User created via Adaxes SPML provider.</value>
        </attr>
        <attr name="sAMAccountName" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>JohnS</value>
        </attr>
        <attr name="objectClass" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>user</value>
        </attr>
        <attr name="mail" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>jsmith@company.com</value>
        </attr>
        <attr name="otherHomePhone" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>12135555555</value>
          <value>12134444444</value>
        </attr>
      </data>
    </addRequest>
  </soap:Body>
</soap:Envelope>
    

Create a New Computer
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header/>
  <soap:Body>
   <addRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything" targetID="all domains">
     <containerID ID="OU=Unit,DC=company,DC=com" />
      <data>
        <attr name="cn" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>Computer</value>
        </attr>
        <attr name="description" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>Computer created via Adaxes SPML provider.</value>
        </attr>
        <attr name="sAMAccountName" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>Computer</value>
        </attr>
        <attr name="objectClass" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>computer</value>
        </attr>
      </data>
    </addRequest>
  </soap:Body>
</soap:Envelope>
          

Create a New Organization
          <?xml version="1.0" encoding="utf-8" ?>
          <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
            <soap:Header/>
            <soap:Body>
              <addRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything" targetID="all domains">
                <containerID ID="DC=company,DC=com" />
                <data>
                  <attr name="o" xmlns="urn:oasis:names:tc:DSML:2:0:core">
                    <value>Organization</value>
                  </attr>
                  <attr name="description" xmlns="urn:oasis:names:tc:DSML:2:0:core">
                    <value>Organization created via Adaxes SPML provider.</value>
                  </attr>
                  <attr name="objectClass" xmlns="urn:oasis:names:tc:DSML:2:0:core">
                    <value>organization</value>
                  </attr>
                </data>
              </addRequest>
            </soap:Body>
          </soap:Envelope>
        

Create a New Organizational Unit
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <addRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything" targetID="all domains">
      <containerID ID="DC=company,DC=com" />
      <data>
        <attr name="ou" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>Unit</value>
        </attr>
        <attr name="description" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>Organizational unit created via Adaxes SPML provider.</value>
        </attr>
        <attr name="objectClass" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>organizationalUnit</value>
        </attr>
      </data>
    </addRequest>
  </soap:Body>
</soap:Envelope>
        

Delete User
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <deleteRequest xmlns="urn:oasis:names:tc:SPML:2:0">
      <psoID ID="CN=John Smith,OU=Unit,DC=company,DC=com" targetID="all domains"/>
    </deleteRequest>
  </soap:Body>
</soap:Envelope>
        

Delete Computer
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <deleteRequest xmlns="urn:oasis:names:tc:SPML:2:0">
      <psoID ID="CN=Computer,OU=Unit,DC=company,DC=com" targetID="all domains"/>
    </deleteRequest>
  </soap:Body>
</soap:Envelope>
        

Delete Organization
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <deleteRequest xmlns="urn:oasis:names:tc:SPML:2:0" recursive="true">
      <psoID ID="O=Organization,DC=company,DC=com" targetID="all domains" />
    </deleteRequest>
  </soap:Body>
</soap:Envelope>
        

Delete Organizational Unit
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <deleteRequest xmlns="urn:oasis:names:tc:SPML:2:0" recursive="true">
      <psoID ID="OU=Unit,DC=company,DC=com" targetID="all domains"/>
    </deleteRequest>
  </soap:Body>
</soap:Envelope>
        

Lookup User Attributes
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <lookupRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
      <psoID ID="CN=John Smith,OU=Unit,DC=company,DC=com" targetID="all domains"/>
    </lookupRequest>
  </soap:Body>
</soap:Envelope>
        

Lookup Computer Attributes
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <lookupRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
      <psoID ID="CN=Computer,OU=Unit,DC=company,DC=com" targetID="all domains"/>
    </lookupRequest>
  </soap:Body>
</soap:Envelope>
        

Lookup Organization Attributes
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <lookupRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
      <psoID ID="O=Organization,DC=company,DC=com" targetID="all domains"/>
    </lookupRequest>
  </soap:Body>
</soap:Envelope>
        

Lookup Organizational Unit Attributes
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <lookupRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
      <psoID ID="OU=Unit,DC=company,DC=com" targetID="all domains"/>
    </lookupRequest>
  </soap:Body>
</soap:Envelope>
        

Modify User Attributes
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <modifyRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
      <psoID ID="CN=John Smith,OU=Unit,DC=company,DC=com" targetID="all domains"/>
      <modification>
        <modification name="description" operation="replace" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>New description</value>
        </modification>
      </modification>
    </modifyRequest>
  </soap:Body>
</soap:Envelope>
        

Modify Computer Attributes
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <modifyRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
      <psoID ID="CN=Computer,OU=Unit,DC=company,DC=com" targetID="all domains"/>
      <modification>
        <modification name="description" operation="replace" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>New description</value>
        </modification>
      </modification>
    </modifyRequest>
  </soap:Body>
</soap:Envelope>
        

Modify Organization Attributes
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <modifyRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
      <psoID ID="O=Organization,DC=company,DC=com" targetID="all domains"/>
      <modification>
        <modification name="description" operation="replace" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>New description</value>
        </modification>
      </modification>
    </modifyRequest>
  </soap:Body>
</soap:Envelope>
        

Modify Organizational Unit Attributes
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <modifyRequest xmlns="urn:oasis:names:tc:SPML:2:0" returnData="everything">
      <psoID ID="OU=Unit,DC=company,DC=com" targetID="all domains"/>
      <modification>
        <modification name="description" operation="replace" xmlns="urn:oasis:names:tc:DSML:2:0:core">
          <value>New description</value>
        </modification>
      </modification>
    </modifyRequest>
  </soap:Body>
</soap:Envelope>
        

Password Capability Samples

Expire User Password
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <expirePasswordRequest xmlns="urn:oasis:names:tc:SPML:2:0:password">
      <psoID ID="CN=John Smith,OU=MyOU,DC=company,DC=com" targetID="all domains"/>
    </expirePasswordRequest>
  </soap:Body>
</soap:Envelope>
        

Set User Password
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <setPasswordRequest xmlns="urn:oasis:names:tc:SPML:2:0:password">
      <psoID ID="CN=John Smith,OU=MyOU,DC=company,DC=com" targetID="all domains"/>
      <password>qwerty12345</password>
    </setPasswordRequest>
  </soap:Body>
</soap:Envelope>
        

Suspend Capability Samples

Check Whether User is Active
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <activeRequest xmlns="urn:oasis:names:tc:SPML:2:0:suspend">
      <psoID ID="CN=John Smith,OU=MyOU,DC=company,DC=com"  targetID="all domains"/>
    </activeRequest>
  </soap:Body>
</soap:Envelope>
        

Resume User Account
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <resumeRequest xmlns="urn:oasis:names:tc:SPML:2:0:suspend">
      <psoID ID="CN=John Smith,OU=MyOU,DC=company,DC=com" targetID="all domains"/>
    </resumeRequest>
  </soap:Body>
</soap:Envelope>
        

Suspend User Account
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <suspendRequest xmlns="urn:oasis:names:tc:SPML:2:0:suspend">
      <psoID ID="CN=John Smith,OU=MyOU,DC=company,DC=com" targetID="all domains"/>
    </suspendRequest>
  </soap:Body>
</soap:Envelope>
        

See Also