axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Gamage" <dimut...@gmail.com>
Subject Re: Namespace in response root element not declared
Date Sat, 29 Mar 2008 10:36:13 GMT
On Sat, Mar 29, 2008 at 4:04 PM, Dimuthu Gamage <dimuthuc@gmail.com> wrote:
> Hi Frank,
>  It is an identified issue, use axiom_node_serialize_sub_tree instead,
>
>  I think the rational is axiom_node_serialize assumes that it is the
>  root node it serialize, so it to the job with better performance.
>  axiom_node_serialize_sub_tree aware that it is the sub tree it is
>  serializing, but less performance than the axiom_node_serialize.
>
>  Thanks
>  Dimuthu
>
>
>
>  On Sat, Mar 29, 2008 at 5:55 AM, Frank Zhou <fchou99@yahoo.com> wrote:
>  > Hi, All,
>  >
>  >  I run into an issue that has to do with namespace. I
>  >  called a web service and get a response using the
>  >  following method:
>  >
>  >  axiom_node_t * node =
>  >  axis2_svc_client_send_receive(_wsf_service_client,
>  >  _env, payload);
>  >
>  >  However, when I serialize the node to xml, I noticed
>  >  that the root element has a namespace abbreviation but
>  >  no namespace is declared, hence the xml is invalid.
>  >  Here is an example:
>  >
>  >       <ns1:getLiteEntityResponse>
>  >          <ns1:return>
>  >             <ns1:ListElement>
>  >                <ns1:chebiId>CHEBI:16551</ns1:chebiId>
>  >
>  >  <ns1:chebiAsciiName>alpha,alpha-trehalose</ns1:chebiAsciiName>
>  >             </ns1:ListElement>
>  >           </ns1:return>
>  >       </ns1:getLiteEntityResponse>
>  >
>  >
>  >  I used the following method to serialize the node:
>  >
>  >  axiom_node_serialize(node, _env, om_output);
>  >
>  >  When I used soapUI to look at the response, I got the
>  >  following (the namespace is declared in
>  >  soapEnv:Envelope node):
>  >
>  >  <soapenv:Envelope
>  >  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>  >  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  >  xmlns:ns1="http://www.ebi.ac.uk/webservices/chebi">
>  >    <soapenv:Body>
>  >       <ns1:getLiteEntityResponse>
>  >          <ns1:return>
>  >             <ns1:ListElement>
>  >                <ns1:chebiId>CHEBI:16551</ns1:chebiId>
>  >
>  >  <ns1:chebiAsciiName>alpha,alpha-trehalose</ns1:chebiAsciiName>
>  >             </ns1:ListElement>
>  >           </ns1:return>
>  >       </ns1:getLiteEntityResponse>
>  >    </soapenv:Body>
>  >  </soapenv:Envelope>
>  >
>  >  Is this a bug or a problem in the response itself?

And it is not a problem in the response. it is 100% correct. just use
axiom_node_serialize_sub_tree.

>  >
>  >  Thanks!
>  >  Frank
>  >
>  >
>  >
>  >
>  >       ____________________________________________________________________________________
>  >  OMG, Sweet deal for Yahoo! users/friends:Get A Month of Blockbuster Total Access,
No Cost. W00t
>  >  http://tc.deals.yahoo.com/tc/blockbuster/text2.com
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>  >  For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message