AnsweredAssumed Answered

Invoking Project Creation with WSDL-generated Java classes

Question asked by djudju on Jan 19, 2009
Latest reply on Mar 18, 2012 by LalitSethi
Hello,  I'm working on Clarity 8.1 FP02 Hotfix. My objective : create a project in Clarity through a web service call with a Java client.  Thanks to the integration documentation, I generated a proxy API with axis for this WSDL document : http:// /niku/WSDL/Object/Projects After generating my .class and packaging them into a jar file named xoglient.jar, I started to develop my Java Client.Generated classes :,,,,,,,, This client connects to XOG webservice through the following URL ( http:// /niku/xog ), then it uses a XML input file to create a project. Note : I tested with the Clarity XOG client my XML input file, it works.  xml File writeProject.xml    

pageLayoutCode="projmgr.projectPageFrame" priority="0" program="false"
projectID="Test" start="2008-01-01T00:00:00"
status="0" statusIndicator="1"

deliverable      Source code of my Java Client , which calls the webservice :   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

DocumentBuilder builder = factory.newDocumentBuilder();

String fileName = "http://localhost/niku/lectra/wsfiles/xog/writeProject.xml";

URL xml = new URL(fileName);

URLConnection connection = xml.openConnection();


Document document =

/* Building soap envelope*/

MessageElement[] messageElement = new MessageElement[1];

if (document == null) {

messageElement[0] = new MessageElement("", "Empty");

} else if (document.getDocumentElement() == null) {

messageElement[0] = new MessageElement(document


} else {

messageElement[0] = new MessageElement(document



/* creating nikudatabus with the input XML file */

NikuDataBus input = new NikuDataBus(messageElement);

/* connection to web service*/

ProjectsServiceLocator service = new ProjectsServiceLocator();


com.niku. www.xog.Object.Auth auth = new com.niku. www.xog.Object.Auth (

sessionId, null, null);

ProjectsPort serv = service.getProjectsService();

/* Creation of the project through the web service */

XOGOutput output = serv.writeProject(input, auth);

System.out.println(output.get_any());   Result :  - the XML file is found by the client- the client connects to the XOG webservice   - the project is not created  - errors appears in app-niku.log :   ERROR 2009-01-19 07:39:31,679 [http-80-Processor6] niku.xog (admin:5007821__6f3aa631:none) Exception occurred while processing client request com.niku.xog.XOGException: The specified Action in the ActionObject root element is invalid (Read/Write).
at com.niku.xog.service.AbstractObjectHandler.process(
at com.niku.xog.service.XOGDispatch.processMessage(
at com.niku.xog.service.XOGSOAPServlet.processMessage(
at com.niku.xog.service.XOGSOAPServlet.doPost(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at com.lectra.wlp.fade.HlabFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at com.niku.union.web.filter.CharsetFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$
at    I tried to change the content of my XML file => no impact on the error...  Can somebody help me? Thank you.