SCS-CBU-CED-IAM / AIS

Swisscom All-in Signing Service: Sample Scripts
Apache License 2.0
9 stars 7 forks source link

OptionalInputs can not be set when using directly the WSDL file #12

Closed FreddyKaiser closed 9 years ago

FreddyKaiser commented 10 years ago

When using the aisService.wsdlover PHP SoapClient the OptionalInputs are not taken in consideration

See implementation at https://github.com/FreddyKaiser/_dev_/tree/master/php-ais Params passed to the `__soapCall($request, array('parameters' => $params));``

        $request = 'Sign';
        $params = array(
            'SignRequest' => array(
                'RequestID' => $this->__createTransID(),
                'Profile' => 'http://ais.swisscom.ch/1.0',
                'OptionalInputs' => array(
                    'ClaimedIdentity' => array(
                        'Name' => $this->customerID
                    ),
                    'SignatureType' => 'urn:ietf:rfc:3369',
                    'AddTimestamp' => array('Type' => 'urn:ietf:rfc:3161'),
                    'AddRevocationInformation' => array('Type' => 'BOTH')
                ),
                'InputDocuments' => array(
                    'DocumentHash' => array(
                        'DigestMethod' => array('Algorithm' => $digestMethod),
                        'DigestValue' => $digestValue
                     )
                )
            )
        );
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:oasis:names:tc:dss:1.0:core:schema" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" xmlns:ns3="http://service.ais.swisscom.com/">
  <env:Body>
    <ns3:sign>
      <ns1:SignRequest RequestID="AIS.PHP.41144.5262" Profile="http://ais.swisscom.ch/1.0">
        <ns1:OptionalInputs/>
        <ns1:InputDocuments>
          <ns1:DocumentHash>
            <ns2:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ns2:DigestValue>QkZCLzFZUnNQb00wVnZRYU4vRzNZMWRRUHRWYkljQUR0ODRZb1JOT012cz0=</ns2:DigestValue>
          </ns1:DocumentHash>
        </ns1:InputDocuments>
      </ns1:SignRequest>
    </ns3:sign>
  </env:Body>
</env:Envelope>
phaupt commented 10 years ago

AIS WSDL content is maintained by the supplier and reported in GIT 3546.