Replaced webservice.* service name by besimple.soap.*

This commit is contained in:
Francis Besset 2011-07-18 22:59:20 +02:00
parent 055bb8a96c
commit c13a96131b
6 changed files with 48 additions and 48 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
phpunit.xml phpunit.xml
vendor vendor
*.swp

View File

@ -163,10 +163,10 @@ class SoapWebServiceController extends ContainerAware
private function getWebServiceContext($webservice) private function getWebServiceContext($webservice)
{ {
if(!$this->container->has('webservice.context.'.$webservice)) if(!$this->container->has('besimple.soap.context.'.$webservice))
{ {
throw new NotFoundHttpException(sprintf('No webservice with name "%s" found.', $webservice)); throw new NotFoundHttpException(sprintf('No webservice with name "%s" found.', $webservice));
} }
return $this->container->get('webservice.context.'.$webservice); return $this->container->get('besimple.soap.context.'.$webservice);
} }
} }

View File

@ -27,7 +27,7 @@ class BeSimpleSoapExtension extends Extension
{ {
private $contextArguments; private $contextArguments;
// maps config options to service suffix' // maps config options to service suffix
private $bindingConfigToServiceSuffixMap = array('rpc-literal' => '.rpcliteral', 'document-wrapped' => '.documentwrapped'); private $bindingConfigToServiceSuffixMap = array('rpc-literal' => '.rpcliteral', 'document-wrapped' => '.documentwrapped');
public function load(array $configs, ContainerBuilder $container) public function load(array $configs, ContainerBuilder $container)
@ -55,13 +55,13 @@ class BeSimpleSoapExtension extends Extension
if (null === $this->contextArguments) { if (null === $this->contextArguments) {
$this->contextArguments = $container $this->contextArguments = $container
->getDefinition('webservice.context') ->getDefinition('besimple.soap.context')
->getArguments() ->getArguments()
; ;
} }
$contextId = 'webservice.context.'.$config['name']; $contextId = 'besimple.soap.context.'.$config['name'];
$context = $container->setDefinition($contextId, $definition = new DefinitionDecorator('webservice.context')); $context = $container->setDefinition($contextId, $definition = new DefinitionDecorator('besimple.soap.context'));
$arguments = array(); $arguments = array();
foreach($this->contextArguments as $i => $argument) { foreach($this->contextArguments as $i => $argument) {

View File

@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
/** /**
* Adds tagged webservice.definition.loader services to ebservice.definition.resolver service * Adds tagged besimple.soap.definition.loader services to ebservice.definition.resolver service
* *
* @author Francis Besset <francis.besset@gmail.com> * @author Francis Besset <francis.besset@gmail.com>
*/ */
@ -23,13 +23,13 @@ class WebServiceResolverPass implements CompilerPassInterface
{ {
public function process(ContainerBuilder $container) public function process(ContainerBuilder $container)
{ {
if (false === $container->hasDefinition('webservice.definition.loader.resolver')) { if (false === $container->hasDefinition('besimple.soap.definition.loader.resolver')) {
return; return;
} }
$definition = $container->getDefinition('webservice.definition.loader.resolver'); $definition = $container->getDefinition('besimple.soap.definition.loader.resolver');
foreach ($container->findTaggedServiceIds('webservice.definition.loader') as $id => $attributes) { foreach ($container->findTaggedServiceIds('besimple.soap.definition.loader') as $id => $attributes) {
$definition->addMethodCall('addLoader', array(new Reference($id))); $definition->addMethodCall('addLoader', array(new Reference($id)));
} }
} }

View File

@ -5,28 +5,28 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters> <parameters>
<parameter key="webservice.definition.loader.resolver.class">Symfony\Component\Config\Loader\LoaderResolver</parameter> <parameter key="besimple.soap.definition.loader.resolver.class">Symfony\Component\Config\Loader\LoaderResolver</parameter>
<parameter key="webservice.definition.loader.class">Symfony\Component\Config\Loader\DelegatingLoader</parameter> <parameter key="besimple.soap.definition.loader.class">Symfony\Component\Config\Loader\DelegatingLoader</parameter>
<parameter key="webservice.definition.loader.annot_dir.class">BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationDirectoryLoader</parameter> <parameter key="besimple.soap.definition.loader.annot_dir.class">BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationDirectoryLoader</parameter>
<parameter key="webservice.definition.loader.annot_file.class">BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationFileLoader</parameter> <parameter key="besimple.soap.definition.loader.annot_file.class">BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationFileLoader</parameter>
<parameter key="webservice.definition.loader.annot_class.class">BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationClassLoader</parameter> <parameter key="besimple.soap.definition.loader.annot_class.class">BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationClassLoader</parameter>
</parameters> </parameters>
<services> <services>
<service id="webservice.definition.loader.resolver" class="%webservice.definition.loader.resolver.class%" public="false" /> <service id="besimple.soap.definition.loader.resolver" class="%besimple.soap.definition.loader.resolver.class%" public="false" />
<service id="webservice.definition.loader" class="%webservice.definition.loader.class%"> <service id="besimple.soap.definition.loader" class="%besimple.soap.definition.loader.class%">
<argument type="service" id="webservice.definition.loader.resolver" /> <argument type="service" id="besimple.soap.definition.loader.resolver" />
</service> </service>
<service id="webservice.definition.loader.annot_file" class="%webservice.definition.loader.annot_file.class%" public="false"> <service id="besimple.soap.definition.loader.annot_file" class="%besimple.soap.definition.loader.annot_file.class%" public="false">
<tag name="webservice.definition.loader" /> <tag name="besimple.soap.definition.loader" />
<argument type="service" id="file_locator" /> <argument type="service" id="file_locator" />
<argument type="service" id="webservice.definition.loader.annot_class" /> <argument type="service" id="besimple.soap.definition.loader.annot_class" />
</service> </service>
<service id="webservice.definition.loader.annot_class" class="%webservice.definition.loader.annot_class.class%" public="false"> <service id="besimple.soap.definition.loader.annot_class" class="%besimple.soap.definition.loader.annot_class.class%" public="false">
<tag name="webservice.definition.loader" /> <tag name="besimple.soap.definition.loader" />
<argument type="service" id="annotation_reader" /> <argument type="service" id="annotation_reader" />
</service> </service>
</services> </services>

View File

@ -4,45 +4,44 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters> <parameters>
<parameter key="webservice.controller.class">BeSimple\SoapBundle\Controller\SoapWebServiceController</parameter> <parameter key="besimple.soap.context.class">BeSimple\SoapBundle\WebServiceContext</parameter>
<parameter key="webservice.context.class">BeSimple\SoapBundle\WebServiceContext</parameter> <parameter key="besimple.soap.cache_dir">%kernel.cache_dir%/webservice</parameter>
<parameter key="webservice.cache_dir">%kernel.cache_dir%/webservice</parameter> <parameter key="besimple.soap.binder.request.rpcliteral.class">BeSimple\SoapBundle\ServiceBinding\RpcLiteralRequestMessageBinder</parameter>
<parameter key="webservice.binder.request.rpcliteral.class">BeSimple\SoapBundle\ServiceBinding\RpcLiteralRequestMessageBinder</parameter> <parameter key="besimple.soap.binder.response.rpcliteral.class">BeSimple\SoapBundle\ServiceBinding\RpcLiteralResponseMessageBinder</parameter>
<parameter key="webservice.binder.response.rpcliteral.class">BeSimple\SoapBundle\ServiceBinding\RpcLiteralResponseMessageBinder</parameter> <parameter key="besimple.soap.binder.request.documentwrapped.class">BeSimple\SoapBundle\ServiceBinding\DocumentLiteralWrappedRequestMessageBinder</parameter>
<parameter key="webservice.binder.request.documentwrapped.class">BeSimple\SoapBundle\ServiceBinding\DocumentLiteralWrappedRequestMessageBinder</parameter> <parameter key="besimple.soap.binder.response.documentwrapped.class">BeSimple\SoapBundle\ServiceBinding\DocumentLiteralWrappedResponseMessageBinder</parameter>
<parameter key="webservice.binder.response.documentwrapped.class">BeSimple\SoapBundle\ServiceBinding\DocumentLiteralWrappedResponseMessageBinder</parameter> <parameter key="besimple.soap.definition.dumper.wsdl.rpcliteral.class">BeSimple\SoapBundle\ServiceDefinition\Dumper\WsdlDumper</parameter>
<parameter key="webservice.definition.dumper.wsdl.rpcliteral.class">BeSimple\SoapBundle\ServiceDefinition\Dumper\WsdlDumper</parameter> <parameter key="besimple.soap.converter.repository.class">BeSimple\SoapBundle\Converter\ConverterRepository</parameter>
<parameter key="webservice.converter.repository.class">BeSimple\SoapBundle\Converter\ConverterRepository</parameter> <parameter key="besimple.soap.type.repository.class">BeSimple\SoapBundle\Converter\TypeRepository</parameter>
<parameter key="webservice.type.repository.class">BeSimple\SoapBundle\Converter\TypeRepository</parameter>
</parameters> </parameters>
<services> <services>
<service id="webservice.context" class="%webservice.context.class%" abstract="true"> <service id="besimple.soap.context" class="%besimple.soap.context.class%" abstract="true">
<argument type="service" id="webservice.definition.loader"/> <argument type="service" id="besimple.soap.definition.loader"/>
<argument type="service" id="webservice.definition.dumper.wsdl"/> <argument type="service" id="besimple.soap.definition.dumper.wsdl"/>
<argument type="service" id="webservice.binder.request"/> <argument type="service" id="besimple.soap.binder.request"/>
<argument type="service" id="webservice.binder.response"/> <argument type="service" id="besimple.soap.binder.response"/>
<argument type="service" id="webservice.type.repository"/> <argument type="service" id="besimple.soap.type.repository"/>
<argument type="service" id="webservice.converter.repository"/> <argument type="service" id="besimple.soap.converter.repository"/>
<argument type="collection"> <argument type="collection">
<argument key="cache_dir">%webservice.cache_dir%</argument> <argument key="cache_dir">%besimple.soap.cache_dir%</argument>
<argument key="debug">%kernel.debug%</argument> <argument key="debug">%kernel.debug%</argument>
</argument> </argument>
</service> </service>
<service id="webservice.binder.request.rpcliteral" class="%webservice.binder.request.rpcliteral.class%" /> <service id="besimple.soap.binder.request.rpcliteral" class="%besimple.soap.binder.request.rpcliteral.class%" />
<service id="webservice.binder.response.rpcliteral" class="%webservice.binder.response.rpcliteral.class%" /> <service id="besimple.soap.binder.response.rpcliteral" class="%besimple.soap.binder.response.rpcliteral.class%" />
<service id="webservice.binder.request.documentwrapped" class="%webservice.binder.request.documentwrapped.class%" /> <service id="besimple.soap.binder.request.documentwrapped" class="%besimple.soap.binder.request.documentwrapped.class%" />
<service id="webservice.binder.response.documentwrapped" class="%webservice.binder.response.documentwrapped.class%" /> <service id="besimple.soap.binder.response.documentwrapped" class="%besimple.soap.binder.response.documentwrapped.class%" />
<service id="webservice.definition.dumper.wsdl.rpcliteral" class="%webservice.definition.dumper.wsdl.rpcliteral.class%" /> <service id="besimple.soap.definition.dumper.wsdl.rpcliteral" class="%besimple.soap.definition.dumper.wsdl.rpcliteral.class%" />
<service id="webservice.converter.repository" class="%webservice.converter.repository.class%" /> <service id="besimple.soap.converter.repository" class="%besimple.soap.converter.repository.class%" />
<service id="webservice.type.repository" class="%webservice.type.repository.class%"> <service id="besimple.soap.type.repository" class="%besimple.soap.type.repository.class%">
<call method="addXmlNamespace"> <call method="addXmlNamespace">
<argument>xsd</argument> <argument>xsd</argument>
<argument>http://www.w3.org/2001/XMLSchema</argument> <argument>http://www.w3.org/2001/XMLSchema</argument>