You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Bhushan Khanal <bh...@wrq.com> on 2002/07/20 00:46:42 UTC

More on QName problem

Hello again,

Here are some more information that I found on the problem that I have been
having with QName and their local names.  Please look at the following
function inside class ParameterSerializer.

public Bean unmarshall(String inScopeEncStyle, QName elementType, Node src,
                         XMLJavaMappingRegistry xjmr, SOAPContext ctx)
    throws IllegalArgumentException
  {
    Element paramEl = (Element)src; 
    String name = paramEl.getTagName(); <<----
    Bean bean = null;
	.
	.
	.
   }

The method getTagName() returns the name of the tag with the name space
alias. Shouldn't you be extracting the name using getLocalName() instead? I
am  surprised that this has not been a problem for others. Am I missing
anything?

Happy Friday!

Bhushan Khanal
WRQ, Inc. 
206.217.7636
bhushank@wrq.com

WRQ has 21 years of experience providing integration software and services
for host-intensive environments. To learn more about our Reflection and
Verastream products, visit http://www.wrq.com/products/.




Re: More on QName problem

Posted by Scott Nichol <sn...@scottnichol.com>.
I would guess it has not been a problem because "name" is only used in the
interop extension branch.  Specifically, for parameters with xsi:type
specified or with an href attribute, the code does not rely on "name" in any
way.  Most SOAP implementations provide xsi:type for parameters.  The most
notable exception is Microsoft, which chose to rely on WSDL for typing.  The
"name" variable is used in the branch of code added to attempt to interop
with implementations from Microsoft (and others?) that do not provide
xsi:type.  I presume that Apache SOAP users have only exercised this code to
interop with Microsoft, which does not qualify parameters with namespaces.

I agree that this code should use the local name.  I am curious, however,
what SOAP implementation you are using that has namespace qualifiers on the
parameter elements.

Scott Nichol

----- Original Message -----
From: "Bhushan Khanal" <bh...@wrq.com>
To: <so...@xml.apache.org>
Sent: Friday, July 19, 2002 6:46 PM
Subject: More on QName problem


> Hello again,
>
> Here are some more information that I found on the problem that I have
been
> having with QName and their local names.  Please look at the following
> function inside class ParameterSerializer.
>
> public Bean unmarshall(String inScopeEncStyle, QName elementType, Node
src,
>                          XMLJavaMappingRegistry xjmr, SOAPContext ctx)
>     throws IllegalArgumentException
>   {
>     Element paramEl = (Element)src;
>     String name = paramEl.getTagName(); <<----
>     Bean bean = null;
> .
> .
> .
>    }
>
> The method getTagName() returns the name of the tag with the name space
> alias. Shouldn't you be extracting the name using getLocalName() instead?
I
> am  surprised that this has not been a problem for others. Am I missing
> anything?
>
> Happy Friday!
>
> Bhushan Khanal
> WRQ, Inc.
> 206.217.7636
> bhushank@wrq.com
>
> WRQ has 21 years of experience providing integration software and services
> for host-intensive environments. To learn more about our Reflection and
> Verastream products, visit http://www.wrq.com/products/.
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>


Re: More on QName problem

Posted by Scott Nichol <sn...@scottnichol.com>.
I would guess it has not been a problem because "name" is only used in the
interop extension branch.  Specifically, for parameters with xsi:type
specified or with an href attribute, the code does not rely on "name" in any
way.  Most SOAP implementations provide xsi:type for parameters.  The most
notable exception is Microsoft, which chose to rely on WSDL for typing.  The
"name" variable is used in the branch of code added to attempt to interop
with implementations from Microsoft (and others?) that do not provide
xsi:type.  I presume that Apache SOAP users have only exercised this code to
interop with Microsoft, which does not qualify parameters with namespaces.

I agree that this code should use the local name.  I am curious, however,
what SOAP implementation you are using that has namespace qualifiers on the
parameter elements.

Scott Nichol

----- Original Message -----
From: "Bhushan Khanal" <bh...@wrq.com>
To: <so...@xml.apache.org>
Sent: Friday, July 19, 2002 6:46 PM
Subject: More on QName problem


> Hello again,
>
> Here are some more information that I found on the problem that I have
been
> having with QName and their local names.  Please look at the following
> function inside class ParameterSerializer.
>
> public Bean unmarshall(String inScopeEncStyle, QName elementType, Node
src,
>                          XMLJavaMappingRegistry xjmr, SOAPContext ctx)
>     throws IllegalArgumentException
>   {
>     Element paramEl = (Element)src;
>     String name = paramEl.getTagName(); <<----
>     Bean bean = null;
> .
> .
> .
>    }
>
> The method getTagName() returns the name of the tag with the name space
> alias. Shouldn't you be extracting the name using getLocalName() instead?
I
> am  surprised that this has not been a problem for others. Am I missing
> anything?
>
> Happy Friday!
>
> Bhushan Khanal
> WRQ, Inc.
> 206.217.7636
> bhushank@wrq.com
>
> WRQ has 21 years of experience providing integration software and services
> for host-intensive environments. To learn more about our Reflection and
> Verastream products, visit http://www.wrq.com/products/.
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>