Skip to content

Commit 33c96b0

Browse files
authored
Merge pull request #35 from veewee/force-known--schema-to-be-file
Force known schema to be a file instead of relatively resolving it from the base URI
2 parents ea80ce1 + 91f0203 commit 33c96b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Parser/Context/ParserContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
final class ParserContext
99
{
1010
/**
11-
* @param array<string, string> $knownSchemas - A dictionary of the xml namespace and a known XSD file.
11+
* @param array<string, string> $knownSchemas - A dictionary of the xml namespace and a locally known XSD file.
1212
*/
1313
public function __construct(
1414
public array $knownSchemas,

src/Parser/Definitions/SchemaParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function tryParse(Document $wsdl, ParserContext $context): Schema
3333
// Since WSDLs don't require the soap specific schema's to be imported.
3434
$globalSchema = $reader->getGlobalSchema();
3535
foreach ($context->knownSchemas as $namespace => $location) {
36-
$reader->addKnownNamespaceSchemaLocation($namespace, $location);
36+
$reader->addKnownNamespaceSchemaLocation($namespace, 'file://'.$location);
3737
$globalSchema->addSchema(
3838
$reader->readNode(Document::fromXmlFile($location)->locate(document_element()), $namespace)
3939
);

0 commit comments

Comments
 (0)