axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Lin" <>
Subject not able to retrieve attribute (elements work fine)
Date Fri, 19 Jan 2007 23:23:47 GMT
I am attaching my WSDL and my schema to this message. Hopefully someone
with good knowledge can spot where I did wrong here. I am using XMLBeans
binding (version 2.2). My Axis2 version 1.1.

Basically I am having problem in getting the "personNameCommentText"
attribute in the "PersonAlternateName" element.

After my webservice is called, the server returns:
    <PersonAlternateName personNameCommentText="A" xmlns:ns1=" <> ">

In my client side, I have code that looks like this:
    String commentText = al.getPersonNameCommentText();
    log.debug("XML: "+al);

The output is:
<xml-fragment personNameCommentText="A" xmlns:ns1=" <> "
<> ">

BUT, the commentText is null, not the "A" that I am expecting!!

Then, I just want to see what the client is expecting for the XML to
look like, I added the code:
    log.debug("XML after change:\n"+al);

Now the output added a namespace to the personNameCommentText.
<xml-fragment personNameCommentText="A" ns1:personNameCommentText="R"
<> " xmlns:soapenv="
<> ">

And, if I call getPersonNameCommentText(), I am getting "R".

Any help is greatly appreciated.


View raw message