Hello,
Using Axis2... I created my stubs to consume the client with the Eclipse plugin.
My client requires XML to be sent within the SOAPBody, so i have gone about creating the XML using a tree of OMElement and OMTexts.
This:
OMElement toFirstName = fac.createOMElement("ToFirstName", null);
toFirstName.addChild(fac.createOMText(toFirstName, "Phil"));
Creates:
<ToFirstName>Phil</ToFirstName>
This:
OMElement fromEmailAddress = fac.createOMElement("FromEmailAddress", null);
fromEmailAddress.addChild(fac.createOMText(fromEmailAddress, "[EMAIL PROTECTED]
", XMLStreamConstants.CDATA));
Creates:
<FromEmailAddress><!CDATA[[EMAIL PROTECTED]]]></FromEmailAddress>
And this:
OMElement emailAddress =
fac.createOMElement("EmailAddress", null);
OMTextImpl txt = new OMTextImpl("[EMAIL PROTECTED]",OMNode.CDATA_SECTION_NODE,fac);
Creates:
<EmailAddress>><!CDATA[
[EMAIL PROTECTED]]]></EmailAddress>
I set the OMElement to my object, and get the above data.. this is all great.
But then, when i go to call the remote method from the stub like:
stub.updateEmail(email);
The data in both CDATA sections is missing (I had to sniff the packets I was sending, as the object that i created and invoked with the stub was ok), like this:
<FromEmailAddress><!CDATA[]]></FromEmailAddress>
<EmailAddress>><!CDATA[]]></EmailAddress>
This seems really strange.... ? Does anyone have any clues as to what is going on?
Thanks,
Dave.
- CDATA text getting lost during execution Dave Miller
- Re: CDATA text getting lost during execution Davanum Srinivas
- Re: CDATA text getting lost during execution Dave Miller
