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 Atanacio Reyes <ar...@yahoo.com> on 2007/11/23 00:54:55 UTC
new line \n is interpreted as AXIOM_TEXT
Hello:
If a message like bellow is send to axis2 server, all '\n' (new line) are interpreted as AXIOM_TEXT node. I think this is wrong.
<param1>50</param1>
<param2>20</param2>
</ns1:add>
example:
<param1>50</param1> is AXIOM_ELEMENT AXIOM_TEXT AXIOM_TEXT
<param1>20</param1> is AXIOM_ELEMENT AXIOM_TEXT AXIOM_TEXT
____________________________________________________________________________________
Get easy, one-click access to your favorites.
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Reading attribute on a complex element
Posted by Sunil Pandit <sp...@csc.com>.
Never mind . I was not doing
axiom_document_build_all(document,env);
It works as expected now.
Thanks
Sunil Pandit
R&D , CSC FSG Austin
(512)2755792
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA
Registered in USA No: C-489-59
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sunil
Pandit/FSG/CSC@CS
C To
"Apache AXIS C User List"
11/27/2007 11:19 <ax...@ws.apache.org>
AM cc
"Apache AXIS C User List"
<ax...@ws.apache.org>
Please respond to Subject
"Apache AXIS C Re: Reading attribute on a complex
User List" element
<axis-c-user@ws.a
pache.org>
Dimuthu
Thanks for your response. I modified your code to test with my xml .
However the axiom_document_get_root_element
call returns the root element without any children's .
Attached is a log and xml file (See attached file: test.c).
Any idea ?
(See attached file: alltest.log)(See attached file: VPMSRequest.xml)
Thanks
Sunil Pandit
R&D , CSC FSG Austin
(512)2755792
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA
Registered in USA No: C-489-59
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"Dimuthu Gamage"
<dimuthuc@gmail.c
om> To
"Apache AXIS C User List"
11/27/2007 01:21 <ax...@ws.apache.org>
AM cc
Subject
Please respond to Re: Reading attribute on a complex
"Apache AXIS C element
User List"
<axis-c-user@ws.a
pache.org>
Hi,
I checked your code and the xml. And it worked. Check the attachments.
I think your problem is the firstNode is not the one you think (<Command>).
If you have spaces in the xml, the axiom think they are text_node, And
currently the code gen is not handling that situation, I have to check
whether it s a bug or not.
If it is the case, just add following lines to get rid of the text_nodes,
while(axiom_node_get_node_type(first_node, env) != AXIOM_ELEMENT)
{
first_node = axiom_node_get_next_sibling(first_node, env);
}
And if you found the generated code is not working, please let the axis2-c
list know that issue, And hope you are updated with the tool from
http://people.apache.org/dist/axis2/nightly/
Thanks
Dimuthu
On Nov 27, 2007 11:33 AM, Sunil Pandit <sp...@csc.com> wrote:
Can someone guide me on how to read the attribute value on an element ?
I have a web service that takes a complex element with an attribute. The
deserialization code generated by WSDL2C is not able to read this
attribute.
So I modified the code and none of the method including
axiom_element_get_all_attributes returns the attributes.
The axiom_element_get_all_attributes returns NULL.
When I log the string form of the node passed to deserialize method , I
can
see all the sub elements and the attribute . Here is the code
Any help is sincerely appreciated.
parent_element = axiom_node_get_data_element(first_node, env);
qname = axutil_qname_create_from_string(env,"Sequence");
if(qname != NULL)
{
parent_attri = axiom_element_get_attribute(parent_element,
env,
qname);
}
if(parent_attri == NULL)
{
attributes =
axiom_element_get_all_attributes(parent_element,env);
}
Here is the string form of node passed to the deserialize method
Mon Nov 26 23:32:54 2007] [info] CommandType : String form of Element is
<Command Sequence="1">
<Type>loadsession</Type>
<Parameter>C:\VPMS\workspace\Federated
Perf\Federated\Models\DADVDOCS_Master\DADVDOCS\DULDOCS_test_cases.VPM</Parameter>
</Command>
Regards
Sunil Pandit
R&D , CSC FSG Austin
(512)2755792
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245,
USA
Registered in USA No: C-489-59
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
[attachment "Makefile" deleted by Sunil Pandit/FSG/CSC] [attachment
"test.c" deleted by Sunil Pandit/FSG/CSC] [attachment "test.xml" deleted by
Sunil Pandit/FSG/CSC]
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org[attachment
"test.c" deleted by Sunil Pandit/FSG/CSC] [attachment "alltest.log" deleted
by Sunil Pandit/FSG/CSC] [attachment "VPMSRequest.xml" deleted by Sunil
Pandit/FSG/CSC]
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Reading attribute on a complex element
Posted by Sunil Pandit <sp...@csc.com>.
Dimuthu
Thanks for your response. I modified your code to test with my xml .
However the axiom_document_get_root_element
call returns the root element without any children's .
Attached is a log and xml file (See attached file: test.c).
Any idea ?
(See attached file: alltest.log)(See attached file: VPMSRequest.xml)
Thanks
Sunil Pandit
R&D , CSC FSG Austin
(512)2755792
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA
Registered in USA No: C-489-59
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"Dimuthu Gamage"
<dimuthuc@gmail.c
om> To
"Apache AXIS C User List"
11/27/2007 01:21 <ax...@ws.apache.org>
AM cc
Subject
Please respond to Re: Reading attribute on a complex
"Apache AXIS C element
User List"
<axis-c-user@ws.a
pache.org>
Hi,
I checked your code and the xml. And it worked. Check the attachments.
I think your problem is the firstNode is not the one you think (<Command>).
If you have spaces in the xml, the axiom think they are text_node, And
currently the code gen is not handling that situation, I have to check
whether it s a bug or not.
If it is the case, just add following lines to get rid of the text_nodes,
while(axiom_node_get_node_type(first_node, env) != AXIOM_ELEMENT)
{
first_node = axiom_node_get_next_sibling(first_node, env);
}
And if you found the generated code is not working, please let the axis2-c
list know that issue, And hope you are updated with the tool from
http://people.apache.org/dist/axis2/nightly/
Thanks
Dimuthu
On Nov 27, 2007 11:33 AM, Sunil Pandit <sp...@csc.com> wrote:
Can someone guide me on how to read the attribute value on an element ?
I have a web service that takes a complex element with an attribute. The
deserialization code generated by WSDL2C is not able to read this
attribute.
So I modified the code and none of the method including
axiom_element_get_all_attributes returns the attributes.
The axiom_element_get_all_attributes returns NULL.
When I log the string form of the node passed to deserialize method , I
can
see all the sub elements and the attribute . Here is the code
Any help is sincerely appreciated.
parent_element = axiom_node_get_data_element(first_node, env);
qname = axutil_qname_create_from_string(env,"Sequence");
if(qname != NULL)
{
parent_attri = axiom_element_get_attribute(parent_element,
env,
qname);
}
if(parent_attri == NULL)
{
attributes =
axiom_element_get_all_attributes(parent_element,env);
}
Here is the string form of node passed to the deserialize method
Mon Nov 26 23:32:54 2007] [info] CommandType : String form of Element is
<Command Sequence="1">
<Type>loadsession</Type>
<Parameter>C:\VPMS\workspace\Federated
Perf\Federated\Models\DADVDOCS_Master\DADVDOCS\DULDOCS_test_cases.VPM</Parameter>
</Command>
Regards
Sunil Pandit
R&D , CSC FSG Austin
(512)2755792
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245,
USA
Registered in USA No: C-489-59
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
[attachment "Makefile" deleted by Sunil Pandit/FSG/CSC] [attachment
"test.c" deleted by Sunil Pandit/FSG/CSC] [attachment "test.xml" deleted by
Sunil Pandit/FSG/CSC]
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Reading attribute on a complex element
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi,
I checked your code and the xml. And it worked. Check the attachments.
I think your problem is the firstNode is not the one you think (<Command>).
If you have spaces in the xml, the axiom think they are text_node, And
currently the code gen is not handling that situation, I have to check
whether it s a bug or not.
If it is the case, just add following lines to get rid of the text_nodes,
while(axiom_node_get_node_type(first_node, env) != AXIOM_ELEMENT)
{
first_node = axiom_node_get_next_sibling(first_node, env);
}
And if you found the generated code is not working, please let the axis2-c
list know that issue, And hope you are updated with the tool from
http://people.apache.org/dist/axis2/nightly/
Thanks
Dimuthu
On Nov 27, 2007 11:33 AM, Sunil Pandit <sp...@csc.com> wrote:
> Can someone guide me on how to read the attribute value on an element ?
>
> I have a web service that takes a complex element with an attribute. The
> deserialization code generated by WSDL2C is not able to read this
> attribute.
> So I modified the code and none of the method including
> axiom_element_get_all_attributes returns the attributes.
> The axiom_element_get_all_attributes returns NULL.
>
> When I log the string form of the node passed to deserialize method , I
> can
> see all the sub elements and the attribute . Here is the code
>
> Any help is sincerely appreciated.
>
> parent_element = axiom_node_get_data_element(first_node, env);
> qname = axutil_qname_create_from_string(env,"Sequence");
> if(qname != NULL)
> {
> parent_attri = axiom_element_get_attribute(parent_element, env,
> qname);
> }
>
> if(parent_attri == NULL)
> {
> attributes =
> axiom_element_get_all_attributes(parent_element,env);
> }
>
> Here is the string form of node passed to the deserialize method
>
> Mon Nov 26 23:32:54 2007] [info] CommandType : String form of Element is
> <Command Sequence="1">
> <Type>loadsession</Type>
> <Parameter>C:\VPMS\workspace\Federated
>
> Perf\Federated\Models\DADVDOCS_Master\DADVDOCS\DULDOCS_test_cases.VPM</Parameter>
> </Command>
>
>
>
>
> Regards
> Sunil Pandit
> R&D , CSC FSG Austin
> (512)2755792
>
> Computer Sciences Corporation
> Registered Office: 2100 East Grand Avenue, El Segundo California 90245,
> USA
> Registered in USA No: C-489-59
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery.
> NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
> any order or other contract unless pursuant to explicit written agreement
> or government initiative expressly permitting the use of e-mail for such
> purpose.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
Re: new line \n is interpreted as AXIOM_TEXT
Posted by Dumindu Pallewela <pa...@gmail.com>.
In addition, IIUC, when mixed content xml is used, this is the proper
way to handle it.
Regards,
Dumindu.
On Nov 26, 2007 2:46 PM, Kaushalye Kapuruge <ka...@wso2.com> wrote:
> Hi Atanacio,
> It is necessary to consider \n as an AXIOM TEXT node. For example, in
> order to canonicalize an XML node, the new line is required to be
> considered in that way.
> Do you have a strong reason to claim this behavior is wrong?
> Cheers,
> Kaushalye
>
>
> Atanacio Reyes wrote:
> > Hello:
> > If a message like bellow is send to axis2 server, all '\n' (new line) are interpreted as AXIOM_TEXT node. I think this is wrong.
> >
> > <param1>50</param1>
> > <param2>20</param2>
> > </ns1:add>
> >
> > example:
> > <param1>50</param1> is AXIOM_ELEMENT AXIOM_TEXT AXIOM_TEXT
> > <param1>20</param1> is AXIOM_ELEMENT AXIOM_TEXT AXIOM_TEXT
> >
> >
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > Get easy, one-click access to your favorites.
> > Make Yahoo! your homepage.
> > http://www.yahoo.com/r/hs
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >
> >
> >
>
>
> --
> http://blog.kaushalye.org/
> http://wso2.org/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
--
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672
WSO2 | "Oxygenating the Web Service Platform" | http://wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Unresolved External symbol
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi,
AFAIK it should be defined in the axiom.lib . are the simple samples like
echo, math in your computer working?
Just recheck http://ws.apache.org/axis2/c/docs/installationguide.html#win in
a case you miss something.
Thanks
Dimuthu
On Nov 26, 2007 11:35 PM, Sunil Pandit <sp...@csc.com> wrote:
> Hi !
>
> I am trying to use some of the functions (
> axiom_util_get_next_siblng_element_with_localname) defined in axiomutil.h.
> I am getting linking error saying
> unresolved external symbol
> _axiom_util_get_next_siblng_element_with_localname referenced in function
> _adb_SetVarType_deserialize@12
>
> I have included all the .lib from axis2c/lib folder. I am not sure which
> library I am missing.
>
> Any help is greatly appreciated.
>
> Thanks
> Sunil Pandit
> R&D , CSC FSG Austin
> (512)2755792
>
> Computer Sciences Corporation
> Registered Office: 2100 East Grand Avenue, El Segundo California 90245,
> USA
> Registered in USA No: C-489-59
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery.
> NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
> any order or other contract unless pursuant to explicit written agreement
> or government initiative expressly permitting the use of e-mail for such
> purpose.
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
Unresolved External symbol
Posted by Sunil Pandit <sp...@csc.com>.
Hi !
I am trying to use some of the functions (
axiom_util_get_next_siblng_element_with_localname) defined in axiomutil.h .
I am getting linking error saying
unresolved external symbol
_axiom_util_get_next_siblng_element_with_localname referenced in function
_adb_SetVarType_deserialize@12
I have included all the .lib from axis2c/lib folder. I am not sure which
library I am missing.
Any help is greatly appreciated.
Thanks
Sunil Pandit
R&D , CSC FSG Austin
(512)2755792
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA
Registered in USA No: C-489-59
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Reading attribute on a complex element
Posted by Sunil Pandit <sp...@csc.com>.
Can someone guide me on how to read the attribute value on an element ?
I have a web service that takes a complex element with an attribute. The
deserialization code generated by WSDL2C is not able to read this
attribute.
So I modified the code and none of the method including
axiom_element_get_all_attributes returns the attributes.
The axiom_element_get_all_attributes returns NULL.
When I log the string form of the node passed to deserialize method , I can
see all the sub elements and the attribute . Here is the code
Any help is sincerely appreciated.
parent_element = axiom_node_get_data_element(first_node, env);
qname = axutil_qname_create_from_string(env,"Sequence");
if(qname != NULL)
{
parent_attri = axiom_element_get_attribute(parent_element, env,
qname);
}
if(parent_attri == NULL)
{
attributes =
axiom_element_get_all_attributes(parent_element,env);
}
Here is the string form of node passed to the deserialize method
Mon Nov 26 23:32:54 2007] [info] CommandType : String form of Element is
<Command Sequence="1">
<Type>loadsession</Type>
<Parameter>C:\VPMS\workspace\Federated
Perf\Federated\Models\DADVDOCS_Master\DADVDOCS\DULDOCS_test_cases.VPM</Parameter>
</Command>
Regards
Sunil Pandit
R&D , CSC FSG Austin
(512)2755792
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA
Registered in USA No: C-489-59
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: new line \n is interpreted as AXIOM_TEXT
Posted by Kaushalye Kapuruge <ka...@wso2.com>.
Hi Atanacio,
It is necessary to consider \n as an AXIOM TEXT node. For example, in
order to canonicalize an XML node, the new line is required to be
considered in that way.
Do you have a strong reason to claim this behavior is wrong?
Cheers,
Kaushalye
Atanacio Reyes wrote:
> Hello:
> If a message like bellow is send to axis2 server, all '\n' (new line) are interpreted as AXIOM_TEXT node. I think this is wrong.
>
> <param1>50</param1>
> <param2>20</param2>
> </ns1:add>
>
> example:
> <param1>50</param1> is AXIOM_ELEMENT AXIOM_TEXT AXIOM_TEXT
> <param1>20</param1> is AXIOM_ELEMENT AXIOM_TEXT AXIOM_TEXT
>
>
>
>
>
>
> ____________________________________________________________________________________
> Get easy, one-click access to your favorites.
> Make Yahoo! your homepage.
> http://www.yahoo.com/r/hs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
>
--
http://blog.kaushalye.org/
http://wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org