Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Soap enc schema #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Command/Generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
namespace GoetasWebservices\SoapServices\SoapClient\Command;

use GoetasWebservices\SoapServices\SoapClient\Builder\SoapContainerBuilder;
use GoetasWebservices\XML\XSDReader\SchemaReader;
use GoetasWebservices\Xsd\XsdToPhp\AbstractConverter;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -42,6 +44,12 @@ protected function execute(InputInterface $input, OutputInterface $output)

$wsdlMetadata = $debugContainer->getParameter('goetas_webservices.soap_client.config')['metadata'];

/**
* @var $schemaReader SchemaReader
*/
$schemaReader = $debugContainer->get('goetas_webservices.xsd2php.schema_reader');
$schemaReader->addKnownSchemaLocation('http://schemas.xmlsoap.org/soap/encoding/', __DIR__ .'/../Resources/schemas/soap-enc.xsd');

$schemas = [];
$portTypes = [];
$wsdlReader = $debugContainer->get('goetas_webservices.wsdl2php.wsdl_reader');
Expand Down
1 change: 1 addition & 0 deletions src/DependencyInjection/SoapClientExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function load(array $configs, ContainerBuilder $container)
$converter->addMethodCall('addAliasMapType', [$xml, $type, self::sanitizePhp($php)]);
}
}
$converter->addMethodCall('addAliasMapType', ['http://schemas.xmlsoap.org/soap/encoding/', '*', 'mixed']);
}


Expand Down
13 changes: 10 additions & 3 deletions src/Metadata/Generator/MetadataGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,18 @@ protected function generateOperation(Operation $soapOperation, Service $service)
'version' => $service->getVersion(),
'name' => $soapOperation->getOperation()->getName(),
'method' => Inflector::camelize($soapOperation->getOperation()->getName()),
'input' => $this->generateInOut($soapOperation, $soapOperation->getInput(), $soapOperation->getOperation()->getPortTypeOperation()->getInput(), 'Input', $service),
'output' => $this->generateInOut($soapOperation, $soapOperation->getOutput(), $soapOperation->getOperation()->getPortTypeOperation()->getOutput(), 'Output', $service),
'fault' => []
'fault' => [],
'input' => false,
'output' => false,
];

if ($soapOperation->getInput()) {
$operation['input'] = $this->generateInOut($soapOperation, $soapOperation->getInput(), $soapOperation->getOperation()->getPortTypeOperation()->getInput(), 'Input', $service);
}
if ($soapOperation->getOutput()) {
$operation['output'] = $this->generateInOut($soapOperation, $soapOperation->getOutput(), $soapOperation->getOperation()->getPortTypeOperation()->getOutput(), 'Output', $service);
}

/**
* @var $fault \GoetasWebservices\XML\SOAPReader\Soap\Fault
*/
Expand Down
Loading