You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Thomas Baier <th...@gmx.net> on 2010/01/06 09:09:52 UTC
"Localname" of attribute value
Hi,
when using "anyType" as a parameter, type information about the value
passed is included as an attribute, e.g. in the soap message
<pData xsi:type="xsd:double">3.1415</pData>
I can get the type attribute using axiom_element_get_attribute(), but
the attribute's value is "xsd:double". How can I get the localname
"double" (without simple string parsing). Is there any utility function
to split a qname into namespace and localname? I have read through the
qname functions, but I don't know how to add the context (as I don't
really know that the namespace prefix is xsd). The namespace information
is somewhere (before or after) in the SOAP message.
E.g. an alternative for specification is
<pData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:int" mlns:xs="http://www.w3.org/2001/XMLSchema">100</pData>
Or would the suggested solution be to just ignore the prefix and assume
that the namespace prefix of a type attribute is just ok?
Best,
Thomas
Re: "Localname" of attribute value
Posted by Damitha Kumarage <da...@wso2.com>.
Thomas Baier wrote:
> Damitha Kumarage schrieb:
>
>> Thomas Baier wrote:
>>
>>> Hi,
>>>
>>> when using "anyType" as a parameter, type information about the value
>>> passed is included as an attribute, e.g. in the soap message
>>>
>>> <pData xsi:type="xsd:double">3.1415</pData>
>>>
>>> I can get the type attribute using axiom_element_get_attribute(), but
>>> the attribute's value is "xsd:double". How can I get the localname
>>> "double" (without simple string parsing). Is there any utility function
>>> to split a qname into namespace and localname?
>>>
>> AFAIK no
>>
>
> What is the recommended way to find out the concrete data type of the
> values for anyType?
>
There is a jira related to this [1]. Fixing this involve solving this
problem
Thanks,
Damitha
[1] https://issues.apache.org/jira/browse/AXIS2C-1396
> Best,
> Thomas
>
>
>
--
__________________________________________________________________
Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/
blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________
Re: "Localname" of attribute value
Posted by Thomas Baier <th...@gmx.net>.
Damitha Kumarage schrieb:
> Thomas Baier wrote:
>> Hi,
>>
>> when using "anyType" as a parameter, type information about the value
>> passed is included as an attribute, e.g. in the soap message
>>
>> <pData xsi:type="xsd:double">3.1415</pData>
>>
>> I can get the type attribute using axiom_element_get_attribute(), but
>> the attribute's value is "xsd:double". How can I get the localname
>> "double" (without simple string parsing). Is there any utility function
>> to split a qname into namespace and localname?
> AFAIK no
What is the recommended way to find out the concrete data type of the
values for anyType?
Best,
Thomas
Re: "Localname" of attribute value
Posted by Damitha Kumarage <da...@wso2.com>.
Thomas Baier wrote:
> Hi,
>
> when using "anyType" as a parameter, type information about the value
> passed is included as an attribute, e.g. in the soap message
>
> <pData xsi:type="xsd:double">3.1415</pData>
>
> I can get the type attribute using axiom_element_get_attribute(), but
> the attribute's value is "xsd:double". How can I get the localname
> "double" (without simple string parsing). Is there any utility function
> to split a qname into namespace and localname?
AFAIK no
> I have read through the
> qname functions, but I don't know how to add the context (as I don't
> really know that the namespace prefix is xsd). The namespace information
> is somewhere (before or after) in the SOAP message.
>
> E.g. an alternative for specification is
>
> <pData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="xs:int" mlns:xs="http://www.w3.org/2001/XMLSchema">100</pData>
>
> Or would the suggested solution be to just ignore the prefix and assume
> that the namespace prefix of a type attribute is just ok?
>
> Best,
> Thomas
>
>
>
--
__________________________________________________________________
Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/
blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________