Skip to content

Commit 188f282

Browse files
committed
[SoapWsdl] Specify an empty message if the input is empty
1 parent 1b4e262 commit 188f282

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BeSimple/SoapWsdl/Dumper/Dumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ protected function addMethods()
189189
protected function addMessages(array $messages)
190190
{
191191
foreach ($messages as $message) {
192-
if ($message->isEmpty()) {
192+
if (preg_match('#Header$#', $message->getName()) && $message->isEmpty()) {
193193
continue;
194194
}
195195

@@ -285,7 +285,7 @@ protected function addPortOperation(Method $method)
285285
$operation->setAttribute('name', $method->getName());
286286

287287
foreach (array('input' => $method->getInput(), 'output' => $method->getOutput(), 'fault' => $method->getFault()) as $type => $message) {
288-
if ($message->isEmpty()) {
288+
if ('fault' === $type && $message->isEmpty()) {
289289
continue;
290290
}
291291

0 commit comments

Comments
 (0)