You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Arnaud MERGEY (JIRA)" <ji...@apache.org> on 2006/09/12 09:23:23 UTC
[jira] Commented: (WSCOMMONS-63) handle schema import with
namespace attribute when schemaLocation is not set
[ http://issues.apache.org/jira/browse/WSCOMMONS-63?page=comments#action_12434082 ]
Arnaud MERGEY commented on WSCOMMONS-63:
----------------------------------------
Hi, with wsdl like this,
<wsdl:definitions ..... xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" .......>
<wsdl:types>
<schema .....>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
...............
...............
<element name="codeTitre" nillable="true" type="soapenc:string"/>
soapenc:string is considered as an undefined type by XmlSchema.
I think this is an unexpected behavior and it should be fixed. XmlSchema should take soapenc:string definition in http://schemas.xmlsoap.org/soap/encoding schema (because this schema is imported).
> handle schema import with namespace attribute when schemaLocation is not set
> ----------------------------------------------------------------------------
>
> Key: WSCOMMONS-63
> URL: http://issues.apache.org/jira/browse/WSCOMMONS-63
> Project: WS-Commons
> Issue Type: Improvement
> Components: XmlSchema
> Reporter: Arnaud MERGEY
>
> XmlSchema should try to import schema with namespace attribute for example <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> I propose this patch:
> Index: org/apache/ws/commons/schema/SchemaBuilder.java
> ===================================================================
> retrieving revision 1.1
> diff -u -r1.1 SchemaBuilder.java
> --- org/apache/ws/commons/schema/SchemaBuilder.java 26 Jun 2006 15:10:16 -0000 1.1
> +++ org/apache/ws/commons/schema/SchemaBuilder.java 21 Jul 2006 14:10:21 -0000
> @@ -1721,6 +1721,31 @@
> schemaImport.schemaLocation);
> }
> }
> + else //XXX AM modification in order to support schema import
> + {
> + try
> + {
> + if(schema.getSourceURI()!=null) {
> + schemaImport.schema =
> + resolveXmlSchema(
> + schemaImport.namespace,
> + schemaImport.namespace,
> + schema.getSourceURI());
> + } else {
> + schemaImport.schema =
> + resolveXmlSchema(
> + schemaImport.namespace,
> + schemaImport.namespace);
> + }
> + }
> + catch (RuntimeException e)
> + {
> + if(!(e.getCause() instanceof XmlSchemaException))
> + {
> + throw e;
> + }
> + }
> + }
> return schemaImport;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org