Dear Friends,
I wrote java code for XML Export with the help of SDK Sample, but I get NullPointer Exception. Please help me whether my below code is proper or not.
Thanks,
Gowri.
public static XmlService getXmlService(URL location, String token)
throws Exception {
XmlService endpoint;
XmlService_Service service = new XmlService_Service(location,
new QName("urn:Core.service.livelink.opentext.com",
"XmlService"));
endpoint = service.getBasicHttpBindingXmlService();
// force the service to use the specified URL, instead of the one
// defined in the WSDL
((BindingProvider) endpoint).getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
location.toExternalForm());
setSoapHeader((WSBindingProvider) endpoint, token);
return endpoint;
}
ExportOptions opt = new ExportOptions();
opt.setNodeInfo(true);
opt.setAttributeInfo(true);
opt.setAcls(true);
Attachment att = fXml.exportXml(12345, opt)