createDocument via PEAR_SOAP

Help
rotsch42
2008-08-20
2013-04-17
  • rotsch42
    rotsch42
    2008-08-20

    Hello,

    i'm using contineo 3.0.4 and i'm trying to create a new document with the SOAP-CLient of php5 (with pear extension).

    I managed to get rid off several problems by trial and error but now i get stuck and hope somebody out there can help me.

    I tried to invoke the createDocument - Function by using this code :

    $file=file_get_contents("/tmp/test.txt");
    $v =  new SOAP_Attachment('test','application/octet-stream',"",$file);
    $methodValue = new SOAP_Value('testattach', 'Struct', array($v));
    $params = array(
          "username" => "myuser",
          "password" => "mypassword",
          "parent" => 5,
          "docname" => "Test",
          "source" => "",
          "sourceDate" => "20.08.2008",
          "author" => "myself",
          "sourceType" => "",
          "coverage" => "",
          "language" => "de",
          "keywords" => "Test",
          "versionDesc" => "",
          "filename" => "test.txt",
          "groups" => "mygroup"    
      );
      $client = new SOAP_Client("http://localhost:8080/contineo-web-3.0.4/services/Dms/",false,
      array (
      "location" => "http://localhost:8080/contineo-web-3.0.4/services/Dms/",
      "namespace" => "http://ws.web.contineo.org",
      "attachments" => "Mime",
      "exceptions" => 0
      ));
      $zusargs=array("namespace" => "http://ws.web.contineo.org","trace" => 1,"attachments" => "Mime");
      $result = $client->call("createDocument",array_merge($params,array($v)),$zusargs);

    ---------------

    But all i got is the following Null-Pointer - Exception :

    20.08.2008 15:19:47,805 ERROR  (org.apache.axis2.rpc.receivers.RPCMessageReceiver: 153) -- Exception occurred while trying to invoke service method createDocument
    java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor890.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
        at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)
        at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
        at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
        at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.contineo.web.LocaleFilter.doFilter(LocaleFilter.java:38)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NullPointerException
        at org.contineo.web.ws.Dms.createDocument(Dms.java:265)
        ... 28 more

    Any help would be great......