Hi Dims,
It seemed like a reasonable fix at the time, plus I was reusing the fix
that currently applies to ?wsdl for this same problem. Your solution is
probably better though and should be applied to ?xsd and ?wsdl. I will
apply this change to both.
Cheers
Brian DePradine
Web Services Development
IBM Hursley
External +44 (0) 1962 816319 Internal 246319
If you can't find the time to do it right the first time, where will you
find the time to do it again?
Davanum Srinivas <[EMAIL PROTECTED]> wrote on 11/02/2008 11:43:45:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Brian,
>
> Why are we special casing just http? would this work better?
>
> if (attributeValue.indexOf("://")!=-1){
> attribute.setNodeValue(this.name + "?xsd=" +
attributeValue);
> }
>
> thanks,
> dims
>
> [EMAIL PROTECTED] wrote:
> | Author: pradine
> | Date: Mon Feb 11 03:32:34 2008
> | New Revision: 620464
> |
> | URL: http://svn.apache.org/viewvc?rev=620464&view=rev
> | Log:
> | Fix for AXIS2-3503.
> |
> | Modified:
> |
>
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.
> java
> |
> | Modified:
>
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.
> java
> | URL:
> http://svn.apache.
>
org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.
> java?rev=620464&r1=620463&r2=620464&view=diff
> |
>
==============================================================================
> | ---
>
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.
> java (original)
> | +++
>
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.
> java Mon Feb 11 03:32:34 2008
> | @@ -39,7 +39,6 @@
> | import java.util.Iterator;
> | import java.util.List;
> | import java.util.Map;
> | -import java.util.Set;
> | import java.util.Vector;
> |
> | import javax.wsdl.Definition;
> | @@ -1087,7 +1086,9 @@
> | attribute = nodeMap.item(i);
> | if (attribute.getNodeName().equals("schemaLocation")) {
> | attributeValue = attribute.getNodeValue();
> | - attribute.setNodeValue(this.name + "?xsd=" +
> attributeValue);
> | + if (!attributeValue.startsWith("http")) {
> | + attribute.setNodeValue(this.name + "?xsd=" +
> attributeValue);
> | + }
> | }
> | }
> | }
> | @@ -2323,15 +2324,17 @@
> | Hashtable importedScheams,
> | Hashtable
> sourceURIToNewLocationMap) {
> | if (s != null) {
> | -
> | - String newscheamlocation = customSchemaNamePrefix == null
?
> | - //use the default mode
> | - (getName() + "?xsd=" +
> getScheamLocationWithDot(sourceURIToNewLocationMap, s)) :
> | - //custom prefix is present - add the custom
prefix
> | - (customSchemaNamePrefix +
> getScheamLocationWithDot(sourceURIToNewLocationMap, s));
> | String schemaLocation =
xmlSchemaExternal.getSchemaLocation();
> | - xmlSchemaExternal.setSchemaLocation(newscheamlocation);
> | - importedScheams.put(schemaLocation, newscheamlocation);
> | +
> | + if (!schemaLocation.startsWith("http")) {
> | + String newscheamlocation = customSchemaNamePrefix==
null ?
> | + //use the default mode
> | + (getName() + "?xsd=" +
> getScheamLocationWithDot(sourceURIToNewLocationMap, s)) :
> | + //custom prefix is present - add the
> custom prefix
> | + (customSchemaNamePrefix +
> getScheamLocationWithDot(sourceURIToNewLocationMap, s));
> | + xmlSchemaExternal.setSchemaLocation(newscheamlocation);
> | + importedScheams.put(schemaLocation,
newscheamlocation);
> | + }
> | }
> | }
> |
> |
> |
> |
> | ---------------------------------------------------------------------
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
> |
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Cygwin)
>
> iD8DBQFHsDTxgNg6eWEDv1kRAkApAKDmSQde7Of/CGouRvFttoXjDYLlqACfRQJK
> h19aWV8tdRiqT0gxNNkKp6A=
> =kpTQ
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU