[
https://issues.apache.org/jira/browse/TUSCANY-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506691
]
Pete Robbins commented on TUSCANY-1362:
---------------------------------------
I think you need to leave this method asis as it handles <include> as well as
<import>
I would look at startInclude (line 572) and put logic in above line 587:
if (import)
{
if (namespace in already imported list)
return;
else
add namespace to imported list;
}
That should do the trick!
> Incorrect operation of code that checks whether schema is loaded before going
> out on the net to retrieve it.
> -------------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-1362
> URL: https://issues.apache.org/jira/browse/TUSCANY-1362
> Project: Tuscany
> Issue Type: Bug
> Components: C++ SDO
> Affects Versions: Java-SDO-M2
> Environment: All
> Reporter: Simon Laws
> Priority: Minor
>
> There is code in SDOSchemeSAX2Parse.cpp that decideds whether to go ahead and
> parse the referenced file
> SDOSchemaSAX2Parser* ParserErrorSetter::parseIfNot(const void*
> location, bool loadImportNamespace, const void* base)
> {
> xmlChar*const absoluteUri = xmlBuildURI((xmlChar*)location,
> (xmlChar*)base);
> if (! absoluteUri)
> SDO_THROW_EXCEPTION("parseIfNot", SDOFileNotFoundException,
> (char*)location);
> LocationParserMap::iterator iter =
> parsedLocations.find(absoluteUri);
> if (parsedLocations.end() == iter)
> {
> SDOSchemaSAX2Parser*const schemaParser = new
> SDOSchemaSAX2Parser(*new SchemaInfo(), this, loadImportNamespace);
> try {
> if (0 ==
> schemaParser->parse((char*)absoluteUri))
> *** return parsedLocations[ absoluteUri ] =
> schemaParser;
> }
> catch (SDORuntimeException e)
> {}
> schemaParser->free(absoluteUri);
> return 0;
> }
> xmlFree(absoluteUri);
> return iter->second;
> }
> Note the line marked ***. This adds the current URL being parse to the
> parsedLocations list for future reference. The issue is that, in the case
> where no schemaLocation is provided and loadImportNamespace is true, this
> will not work if the schema was orginally loaded from the file system, for
> example
> /mydir/schema1.xsd - parsedLocation = "file:///mydir/schema1.xsd
> targetNamespace="http://schemas.xmlsoap.org/wsdl/"
> /mydir/schema2.xsd
> <xs:import namespace = "http://schemas.xmlsoap.org/wsdl/" /> - doesn't hit
> parsedLocation as it not the same URL as was originally used to load schema1
> A solution is to store both the provided location and the target namsepace in
> parsedLocation
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]