I want to publish my pages from the publication so I want to attach this publication into existing publication target. Here is my current code:
PublicationTargetData pd=(PublicationTargetData)client.read("tcm:0-7-65537",new ReadOptions()); ArrayOfLinkToPublicationData linkpub=new ArrayOfLinkToPublicationData(); LinkToPublicationData plinkData=new LinkToPublicationData(); plinkData.setIdRef("tcm:0-234-1"); List l=linkpub.getLinkToPublicationData(); l.add(plinkData); pd.setPublications(linkpub); client.update(pd,new ReadOptions());
This code is successfully attaching the Publication into the Publication Target but it unfortunately it replaces the Publication Target with the new one. But I don't want to remove the previous Publication from the Publication Target. So kindly suggest any solution.