Skip to content

Commit

Permalink
Merge pull request #35 from veewee/force-known--schema-to-be-file
Browse files Browse the repository at this point in the history
Force known schema to be a file instead of relatively resolving it from the base URI
  • Loading branch information
veewee authored Jul 26, 2024
2 parents ea80ce1 + 91f0203 commit 33c96b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Parser/Context/ParserContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
final class ParserContext
{
/**
* @param array<string, string> $knownSchemas - A dictionary of the xml namespace and a known XSD file.
* @param array<string, string> $knownSchemas - A dictionary of the xml namespace and a locally known XSD file.
*/
public function __construct(
public array $knownSchemas,
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/Definitions/SchemaParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function tryParse(Document $wsdl, ParserContext $context): Schema
// Since WSDLs don't require the soap specific schema's to be imported.
$globalSchema = $reader->getGlobalSchema();
foreach ($context->knownSchemas as $namespace => $location) {
$reader->addKnownNamespaceSchemaLocation($namespace, $location);
$reader->addKnownNamespaceSchemaLocation($namespace, 'file://'.$location);
$globalSchema->addSchema(
$reader->readNode(Document::fromXmlFile($location)->locate(document_element()), $namespace)
);
Expand Down

0 comments on commit 33c96b0

Please sign in to comment.