Hi,
I am trying to add a simple child element to an OMElement I have
created, but I am getting a null pointer. I am using the same syntax I
have seen in the Axiom OM Tutorial
(http://ws.apache.org/axis2/1_0/OMTutorial.html), and am using Axis 2 1.3.
The code I try is:
public static OMElement createQuery(){
OMNamespace aon = new
OMNamespaceImpl("http://www.aoi.com/WSDA/0.1", "ao");
OMElement wsdaQueryNode = new OMElementImpl("wsdaQuery", aon, null);
wsdaQueryNode.addAttribute("name", "campaign.getProductSkuId", aon);
OMElement param = new OMElementImpl("param", aon, null);
param.addAttribute("skuId", "6949", aon);
param.addChild(param);
return wsdaQueryNode;
}
The error I get is:
java.lang.NullPointerException
Error: java.lang.NullPointerException
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.<init>(StAXOMBuilder.java:64)
at
org.apache.axiom.om.impl.llom.OMNodeImpl.importNode(OMNodeImpl.java:455)
at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:197)
at
com.aoi.ws.clients.test.WSDATestClient.createQuery(WSDATestClient.java:55)
at com.aoi.ws.clients.test.WSDATestClient.main(WSDATestClient.java:27)
Any ideas would be much appreciated.
Regards,
Chris
--
Chris Bowman
Director, Phoros Limited
mobile: +44(0)7766 881 564
email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]