Skip to content

Commit

Permalink
[SoapBundle] Fixed service definition with factory
Browse files Browse the repository at this point in the history
  • Loading branch information
francisbesset committed Jun 1, 2015
1 parent 2974a4f commit 855e382
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ private function createClient($client, ContainerBuilder $container)
$definition = new DefinitionDecorator('besimple.soap.client');
$container->setDefinition(sprintf('besimple.soap.client.%s', $client), $definition);

$definition->setFactoryService(sprintf('besimple.soap.client.builder.%s', $client));
$definition->setFactory(array(
new Reference(sprintf('besimple.soap.client.builder.%s', $client)),
'build'
));
}

private function createWebServiceContext(array $config, ContainerBuilder $container)
Expand Down
4 changes: 3 additions & 1 deletion src/BeSimple/SoapBundle/Resources/config/client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
<argument type="service" id="besimple.soap.cache" /> <!-- hack to load besimple cache configuration -->
</service>

<service id="besimple.soap.client" factory-service="besimple.soap.client.builder" factory-method="build" class="%besimple.soap.client.builder.class%" abstract="true" />
<service id="besimple.soap.client" class="%besimple.soap.client.builder.class%" abstract="true">
<factory class="besimple.soap.client.builder" method="build" />
</service>

<service id="besimple.soap.classmap" class="%besimple.soap.classmap.class%" abstract="true" />
</services>
Expand Down

0 comments on commit 855e382

Please sign in to comment.