[
http://issues.apache.org/jira/browse/AXIS-1868?page=comments#action_61088 ]
Guillaume Sauthier commented on AXIS-1868:
------------------------------------------
Yes you're right.
What are the other solutions ?
If we use reflection, the inner value field will be an Object, not an URI !
So the client of this URIHolder class will be forced to cast the holder.value.
URIHolder with reflection should looks like :
public class URIHolder implements Holder {
public Object value;
private static Class uriClass;
static {
uriClass = Class.forName("java.net.URI");
}
public URIHolder(Object uri) {
if (uriClass == null) {
throw RuntimeException("URIHolder is not usable in JDK 1.3 !");
}
if(!uriClass.isAssignableFrom(uri.getClass())) {
throw RuntimeException("value is not a java.net.URI");
}
value = uri;
}
}
> missing Holder for java.net.URI
> -------------------------------
>
> Key: AXIS-1868
> URL: http://issues.apache.org/jira/browse/AXIS-1868
> Project: Axis
> Type: Bug
> Components: WSDL processing
> Versions: 1.2RC3
> Environment: JOnAS 4.4
> Reporter: Guillaume Sauthier
> Attachments: axis-uri-holder-patch.txt, axis-uri-holder-patch2.txt
>
> I think JAX-RPC 1.1 is not clear :
> xsd:anyURI -> java.net.URI is optionnal but there is no Holder for URI(
> should be 'javax.xml.rpc.holders.URIHolder')
> The problem is revealed when you compile classes generated with wsdl2java
> using TM version="1.3". We see imports on java.net.holders.URIHolder. But
> this class is never generated (because we don't generate either the
> corresponding java Bean).
--
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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira