Req #16645 [Opn->Ver]: "application/soap+xml" Transport Media Type Support

From: Date: Sun, 27 Sep 2009 05:23:38 +0000
Subject: Req #16645 [Opn->Ver]: "application/soap+xml" Transport Media Type Support
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-1737@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=16645&edit=1 ID: 16645 Updated by: daniel.oconnor@gmail.com Reported By: Hartmut dot Wilhelms at arcor dot de Summary: "application/soap+xml" Transport Media Type Support -Status: Open +Status: Verified Type: Feature/Change Request Package: SOAP Operating System: Debian Package Version: 0.12.0 PHP Version: 5.2.5 Roadmap Versions: New Comment: -Status: Open +Status: Verified That's a pity. Soap 1.1 is happy with text/xml http://www.w3.org/TR/2000/NOTE-SOAP-20000508/ Soap 1.2 is application/soap+xml http://www.w3.org/TR/2007/REC-soap12-part2-20070427/ Bad oracle, making life difficult! Previous Comments: ------------------------------------------------------------------------ [2009-09-25 17:57:11] mauz Description: ------------ The Oracle-Application-Server-10g/10.1.3.1.0 does not understand the "Content-Type: text/xml ..." and always throws an VersionMismatch Error. This Error disappeared, when I set this to "Content-Type: application/soap+xml ..." as specified in Appendix A of the SOAP Version 1.2 Part 2 Specification. I Propose a new Option for call with the Name 'media_type', which specifies the String after Content-Type and before charset within the HTTP Header. This could be realized by the following lines of code within Transport/HTTP.php (about line 449): if (isset($options['media_type'])) { $this->headers['Content-Type'] = $options['media_type']."; charset=$this->encoding"; } else { $this->headers['Content-Type'] = "text/xml; charset=$this->encoding"; } Test script: --------------- $client =& new SOAP_Client(<url>); $opts = array ( 'trace' => true, 'media_type' => 'application/soap+xml', .... ); $res = $client->call (<method>, <values>, $opts); Expected result: ---------------- POST /path HTTP/1.0 User-Agent: PEAR-SOAP 0.12.0-beta Host: vsrv25.domain.de Content-Type: application/soap+xml; charset=UTF-8 Content-Length: 372 SOAPAction: "http://service.domain.de//method" Connection: close Actual result: -------------- POST /path HTTP/1.0 User-Agent: PEAR-SOAP 0.12.0-beta Host: vsrv25.domain.de Content-Type: text/xml; charset=UTF-8 Content-Length: 372 SOAPAction: "http://service.domain.de//method" Connection: close ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=16645&edit=1

« previous php.pear.bugs (#1737) next »