通过Axis RPC客户端发送CDATA

通过Axis RPC客户端发送CDATA

问题描述:

任何人都可以让我知道如何通过Java在Axis(旧版本,不是Axis2)RPC客户端上发送CDATA?通过Axis RPC客户端发送CDATA

我试图在很多地方找到答案,但根本得不到明确的答案。

String stringToBeWrapped = "A'B'C'D"; 
OMElement elementWhichNeedsCData = ....; 
TextImpl omText = (TextImpl) 
bodyElement.getOMFactory().createOMText(stringToBeWrapped); 
omText.setType(XMLStreamConstants.CDATA); 
elementWhichNeedsCData.addChild(omText); 

http://axis.8716.n7.nabble.com/Problem-with-CDATA-tags-in-SOAP-message-td39617.html