PHP Classes
elePHPant
Icontem

PHP MTOM SOAP Server: Read binary files sent in SOAP requests using MTOM

Recommend this page to a friend!
  Info   View files Documentation   View files View files (24)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-02-07 (4 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 417 This week: 1All time: 6,278 This week: 434Up
Version License PHP version Categories
mtop-soap-server 1.0.5BSD License5.0PHP 5, Files and Folders, Web services
Description Author

This package can read binary files sent in SOAP requests using MTOM (Message Transmission Optimization Mechanism).

It can detect binary files encoded more efficiently for transmission using the SOAP MTOM recommendation and decode the attached binary data for regular SOAP server handling.

This package is somewhat inspired in the BeSimple SOAP server package.

Innovation Award
PHP Programming Innovation award nominee
November 2014
Number 9


Prize: One downloadable copy of CodeLobster Professional
Some Web service APIs take as parameters files that may contain binary data.

Web services based on the SOAP protocol send data encapsulated in XML containers. This makes binary data be encoded, so it does not contain bytes that would not be allowed in XML documents.

Encoding binary data inside XML documents would take much more data to be transmitted in the SOAP requests.

The MTOM W3C recommendation defines how binary data can be transmitted as a binary attachment. This way it avoids the size overhead and the loss in speed of the data transmission.

This package extends the PHP SOAP server class to be able to decode binary data attachments sent in a SOAP request.

Manuel Lemos
Name: Cleidson Dias do ... is available for providing paid consulting. Contact Cleidson Dias do ... .
Classes: 1 package by
Country: Brazil Brazil
Age: 39
All time rank: 3373262 in Brazil Brazil
Week rank: 379 Up22 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 1x

Details
MTOM Server Soap
==============

Some Web service APIs take as parameters files that may contain binary data.

The MTOM W3C recommendation defines how binary data can be transmitted as a binary attachment. This way it avoids the size overhead and the loss in speed of the data transmission.

SwA is a W3C Note. It was submitted as a proposal, but it was not adopted by the W3C. Instead, MTOM is the W3C Recommendation for handling binary data in SOAP messages. With the release of SOAP 1.2 additionally the note SOAP 1.2 Attachment Feature was published.

This package extends the PHP SOAP server class to be able to decode binary data attachments sent in a SOAP request using MTOM (Message Transmission Optimization Mechanism) or SwA (Soap With Attachments) and can detect binary files encoded more efficiently for transmission and decode the attached binary data for regular SOAP server handling.

This package is somewhat inspired in the BeSimple SOAP server package.

To use and very simple, just follow the steps below

1 - Copy the implementation to a subfolder in your project called serversoap

2 - On page you want to use the implementation of MTOM do the imports and necessary uses as:
```
require_once 'seisoap/SEISOAPServer.php';
require_once 'serversoap/implements/helper/SEISOAPhelper.php';

use SERVERSOAP\SEISOAPServer;
use SERVERSOAP\implement\helper\SEISOAPhelper;
```

3 - Create the object you want to use as follows

if you want to use MTOM
```
$servidorSoap = new SEISOAPServer ( "some.wsdl", array (
'encoding'=>'ISO-8859-1',
'attachment_type' => SEISOAPhelper::ATTACHMENTS_TYPE_MTOM
) );
$servidorSoap->setClass ( "some" );
```
if you want to use the SwA
```
$servidorSoap = new SEISOAPServer ( "some.wsdl", array (
'encoding'=>'ISO-8859-1',
'attachment_type' => SEISOAPhelper::ATTACHMENTS_TYPE_SWA
) );
$servidorSoap->setClass ( "some" );
```

And finally call the object as an example below
```
// Only process if accessed via POST
if ($_SERVER['REQUEST_METHOD']=='POST') {	
$servidorSoap->handle($HTTP_RAW_POST_DATA);
}
```
  Files folder image Files  
File Role Description
Files folder imageabstracts (5 directories)
Files folder imageimplements (5 directories)
Files folder imageinterfaces (2 directories)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Plain text file SERVERSoap.php Class Class source

  Files folder image Files  /  abstracts  
File Role Description
Files folder imageconverter (1 file)
Files folder imagecore (1 file)
Files folder imagefilter (1 file)
Files folder imagemessage (1 file)
Files folder imagemime (1 directory)

  Files folder image Files  /  abstracts  /  converter  
File Role Description
  Plain text file TypeConverter.php Class Class source

  Files folder image Files  /  abstracts  /  core  
File Role Description
  Plain text file AbstractSOAPCore.php Class Class source

  Files folder image Files  /  abstracts  /  filter  
File Role Description
  Plain text file Filter.php Class Class source

  Files folder image Files  /  abstracts  /  message  
File Role Description
  Plain text file SoapMessage.php Class Class source

  Files folder image Files  /  abstracts  /  mime  
File Role Description
Files folder imagepart (1 file)

  Files folder image Files  /  abstracts  /  mime  /  part  
File Role Description
  Plain text file Part.php Class Class source

  Files folder image Files  /  implements  
File Role Description
Files folder imageconverter (2 files)
Files folder imagecore (3 files)
Files folder imagefilter (3 files)
Files folder imagehelper (1 file)
Files folder imagemime (2 directories)

  Files folder image Files  /  implements  /  converter  
File Role Description
  Plain text file MtomTypeConverter.php Class Class source
  Plain text file SwaTypeConverter.php Class Class source

  Files folder image Files  /  implements  /  core  
File Role Description
  Plain text file SOAPCore.php Class Class source
  Plain text file SoapRequest.php Class Class source
  Plain text file SoapResponse.php Class Class source

  Files folder image Files  /  implements  /  filter  
File Role Description
  Plain text file FilterHelper.php Class Class source
  Plain text file MimeFilter.php Class Class source
  Plain text file XmlMimeFilter.php Class Class source

  Files folder image Files  /  implements  /  helper  
File Role Description
  Plain text file SEISOAPhelper.php Class Class source

  Files folder image Files  /  implements  /  mime  
File Role Description
Files folder imageparser (1 file)
Files folder imagepart (2 files)

  Files folder image Files  /  implements  /  mime  /  parser  
File Role Description
  Plain text file MimeParser.php Class Class source

  Files folder image Files  /  implements  /  mime  /  part  
File Role Description
  Plain text file MimePart.php Class Class source
  Plain text file MultiPart.php Class Class source

  Files folder image Files  /  interfaces  
File Role Description
Files folder imageconverter (2 files)
Files folder imagefilter (2 files)

  Files folder image Files  /  interfaces  /  converter  
File Role Description
  Plain text file SoapConverterInterface.php Class Class source
  Plain text file TypeConverterInterface.php Class Class source

  Files folder image Files  /  interfaces  /  filter  
File Role Description
  Plain text file SoapRequestFilter.php Class Class source
  Plain text file SoapResponseFilter.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:417
This week:1
All time:6,278
This week:434Up