Drew
Drew

Reputation: 1777

What is the default Soap Version for SoapServer in PHP?

I have a question from a client, asking if our Soap server is expecting Soap v1.1 or v1.2.

The only configuration in the SoapServer constructor is the WSDL

$server = new SoapServer(__CONFIG_PATH_WSDL_DISK);

If no option for 'soap_version' is specified in the the SoapServer constructor , what is the default version, or will it handle both?

Drew J. Sonne.

Upvotes: 2

Views: 7719

Answers (2)

Wilhelm Murdoch
Wilhelm Murdoch

Reputation: 1816

To answer the second half of your question, yes, it supports both:

https://www.php.net/manual/en/intro.soap.php

Upvotes: 2

VoodooChild
VoodooChild

Reputation: 9784

A simple way is to check for Content-Type header during the transaction.

SOAP 1.1 uses text/xml SOAP 1.2 uses application/soap

from this link

Upvotes: 3

Related Questions