You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Laleh T." <lt...@yahoo.com> on 2006/05/04 22:20:29 UTC

Empty URI throws MalformedURIException

Hi,

We use Axis 1.1 in our project. In this specific case I do not think the
version of Axis we use makes any difference  because the API (as java doc
mentions) is limiting.
I found the following paragragh in this document:

RFC 2396 <http://www.ietf.org/rfc/rfc2396.txt> . Uniform Resource
Identifiers (URI): Generic Syntax. T. Berners-Lee, R. Fielding, L. Masinter.
August 1998.
	http://www.ietf.org/rfc/rfc2396.txt

"A URI reference that does not contain a URI is a reference to the current
document. In other words, an empty URI reference within a document is
interpreted as a reference to the start of that document, and a reference
containing only a fragment identifier is a reference to the identified
fragment of that document."
This means that a URI object should be able to handle empty string. But when
my document contains an empty URI like this

 <Reference URI="">  .... </Reference>

I get this exception while axis tries to deserialize the document after
receiving it in a remote call:

org.apache.axis.types.URI$MalformedURIException: Cannot initialize URI with
empty parameters.
(this is a part of the details of
java.lang.reflect.InvocationTargetException)

It seems that the above spec explicitly says that empty URI is accepted but
Axis can not handle it. (By looking at java doc for
org.apache.axis.types.URI, it seems that this class can not handle empty
URI).  Do you look at this as a bug or a feature. In case this is a feature,
does anyone have a work around that could help me?

Thank you,
Laleh T.

--
View this message in context: http://www.nabble.com/Empty-URI-throws-MalformedURIException-t1559765.html#a4236681
Sent from the Axis - User forum at Nabble.com.