Skip to content

Instantly share code, notes, and snippets.

@bogomolov-dev
Created April 7, 2014 06:55
Show Gist options
  • Save bogomolov-dev/10015809 to your computer and use it in GitHub Desktop.
Save bogomolov-dev/10015809 to your computer and use it in GitHub Desktop.
Symfony2 BeSimpleSoapBundle verwenden - http://www.starstormdesign.de/?p=489
be_simple_soap:
cache:
type: none # The cache type can be: none, disk (default value), memory, disk_memory.
lifetime: 0 # The lifetime in seconds of a WSDL file in the cache (86400 is the default value by PHP).
limit: 5 # The limit is the maximum number of in-memory cached WSDL files (5 is the default value by PHP).
clients:
blz_service:
wsdl: http://www.thomas-bayer.com/axis2/services/BLZService?wsdl
classmap:
getBankResponseType: "Ssd\\SoapExampleBundle\\GetBankResponseType"
detailsType: "Ssd\\SoapExampleBundle\\DetailsType"
"require": {
[...]
"besimple/soap": "0.2.*"
}
<?php
namespace Ssd\SoapExampleBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
/**
* @Route("/bank")
*/
class BankController extends BaseController
{
/**
* @Route("/{blz}")
*/
public function bankAction($blz)
{
$client = $this->get('besimple.soap.client.blz_service');
$bank = new \stdClass();
$bank->blz = '20190003';
var_dump($client->getBank($bank));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment