> For the complete documentation index, see [llms.txt](https://docs.uaepass.ae/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uaepass.ae/feature-guides/signature-integration-guide/digital-signature-single-document/verification-api-integration/integration-web-service-details.md).

# Web Service Details

## SOAP Gateway Endpoint

| Endpoint   | URL                                                 |
| ---------- | --------------------------------------------------- |
| Staging    | `https://stg-id.uaepass.ae/trustedx-gw/SoapGateway` |
| Production | `https://id.uaepass.ae/trustedx-gw/SoapGateway`     |

## Transport Headers to invoke SOAP Service

`HEAD` `https://stg-id.uaepass.ae/trustedx-gw/SoapGateway`

#### Headers

| Name         | Type   | Description                                             |
| ------------ | ------ | ------------------------------------------------------- |
| TwsAuthN     | string | urn:safelayer:tws:policies:authentication:oauth:clients |
| SOAPAction   | string | Verify                                                  |
| Content-Type | string | text/xml                                                |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

### Request

Below here is the SOAP template with place holder inside braces to be provided as per entity configuration and requirements:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xm 
lns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/X MLSchema-instance">
    <soapenv:Header>
        <wsse:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next " soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/0 1/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken> 
                <wsse:Username>{Client ID as shared to SP}</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis- 200401-wss-username-token-profile-1.0#PasswordText">{Client Secret as shared t o SP} </wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
        <VerifyRequest Profile="urn:safelayer:tws:dss:1.0:profiles:pdf:1.0:verif y" RequestID="{Random request ID for reference}" xmlns="http://www.docs.oasis- open.org/dss/2004/06/oasis-dss-1.0-core-schema-wd-27.xsd">
            <OptionalInputs>
                <ns1:ReturnSignerIdentity binary="true" xmlns:ns1="http://www.safe layer.com/TWS"/>
            </OptionalInputs>
            <InputDocuments>
                <Document> 
                    <Base64Data MimeType="application/pdf">
                        {Base64 encoded signed PDF document}
                    </Base64Data>
                </Document>
            </InputDocuments>
        </VerifyRequest>
    </soapenv:Body>
</soapenv:Envelope>
```

### Sample Request/Response (with Sample Data)

The integration team can try below request in any SOAP service testing tool (e.g. SOAPUI, PostMan etc.) by replacing the username password as provided by UAEPASS onboarding team.&#x20;

<mark style="color:green;">`POST`</mark> `stg-id.uaepass.ae/trustedx-gw/SoapGateway`

HTTP/1.1

#### Headers

| Name         | Type   | Description                                             |
| ------------ | ------ | ------------------------------------------------------- |
| TwsAuthN     | string | urn:safelayer:tws:policies:authentication:oauth:clients |
| SOAPAction   | string | Verify                                                  |
| Content-Type | string | text/xml                                                |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

### Request Sample

```xml
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/X MLSchema-instance">    <soapenv:Header>
        <wsse:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next " soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/0 1/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken> 
                <wsse:Username>XXXXXXX</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis- 200401-wss-username-token-profile-1.0#PasswordText">XXXXXXXX</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
        <VerifyRequest Profile="urn:safelayer:tws:dss:1.0:profiles:pdf:1.0:verif y" RequestID="9f116d3821d805702aaa" xmlns="http://www.docs.oasis-open.org/dss/ 2004/06/oasis-dss-1.0-core-schema-wd-27.xsd">
            <OptionalInputs>
            <ns1:ReturnSignerIdentity binary="true" xmlns:ns1="http://www.safelay er.com/TWS"/>
            </OptionalInputs>
            <InputDocuments>
                <Document>
                    <Base64Data MimeType="application/pdf">
                        {Base64 encoded signed PDF document}
                    </Base64Data>
                </Document>
            </InputDocuments>
        </VerifyRequest>
    </soapenv:Body>
</soapenv:Envelope>  
            
                                
```

### Response Sample

```xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <dss:VerifyResponse xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xm lns:css="http://www.safelayer.com/TWS" xmlns:dss="http://www.docs.oasis-open.o rg/dss/2004/06/oasis-dss-1.0-core-schema-wd-27.xsd" xmlns:xades="http://uri.et si.org/01903/v1.2.2#" Profile="urn:safelayer:tws:dss:1.0:profiles:pdf:1.0:veri fy" RequestID="9f116d3821d805702aaa" >
            <dss:Result>
                <dss:ResultMajor>urn:oasis:names:tc:dss:1.0:resultmajor:Succes s</dss:ResultMajor>
                <dss:ResultMinor>urn:oasis:names:tc:dss:1.0:resultminor:ValidS ignature_OnAllDocuments</dss:ResultMinor>
            </dss:Result>
            <dss:OptionalOutputs>
                <dss:SigningTime ThirdPartyTimestamp="false">2018-11-21T08:39: 45Z</dss:SigningTime>
                <dss:SignerIdentity Format="urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName">CN=Alexandros Monastiriotis + OID.2.5.4.5=#130F373834 313938353430343039313738, OU=UAE PASS, O=UAE Government, L=Dubai, C=AE</dss:SignerIdentity>
                <css:TrustInfo TrustLabel="" TrustLevel="0"/>
                <css:TrustInfoSummary TrustLevel="0"/>
                <css:VerifyingPolicy xmlns:css="http://www.safelayer.com/TWS">
                    <css:Identifier Qualifier="OIDAsURN">urn:uae:tws:verificat ion:policy:digitalid</css:Identifier>
                </css:VerifyingPolicy>
                <css:ValidationPolicy xmlns:css="http://www.safelayer.com/TWS">
                    <css:Identifier Qualifier="OIDAsURN">urn:uae:tws:validation:policy:digitalid</css:Identifier>
                </css:ValidationPolicy>
                <css:PdfFieldLabel>sign_091f1423</css:PdfFieldLabel>
                <css:NumberPdfSignatures>1</css:NumberPdfSignatures>
            </dss:OptionalOutputs>
        </dss:VerifyResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.uaepass.ae/feature-guides/signature-integration-guide/digital-signature-single-document/verification-api-integration/integration-web-service-details.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
