3 Replies Latest reply on Jun 2, 2011 8:10 AM by kjigs4it

    Newbie issues compiling java soap sampleclient

    JimXYZ987654321

      Hi All,

       

      I have searched the forums and internet for help with this to no avail.

       

      My setup is Windows Server 2003 / Indesign Server CS5 / Coldfusion 9 / Apache 2 / PHP5

       

      I intend to use the Java / Soap implementation to communicate with ID5... Unless anyone can think of a better way to implement with CF9 (i have found no info on the web)

       

      I have a lot of experience in scripting inDesign, and coding Coldfusion, but pretty much no experience in Java or compiling Java...

       

      I am trying to compile an run the 'sampleclient-java-soap' sample but keep getting the following error:

       

      C:\Program Files\Adobe InDesign CS5 Server SDK\samples\sampleclient-java-soap\sc
      ripts>sampleClient -host http://localhost:12345 c:\test.jsx

       

      C:\Program Files\Adobe InDesign CS5 Server SDK\samples\sampleclient-java-soap\sc
      ripts>java -classpath "..\lib\sampleclient-java-soap.jar;..\..\idsp-wsdl-java\li
      b\idsp-wsdl-java.jar;..\..\..\external\axis-1_2_1\lib\axis.jar;..\..\..\external
      \axis-1_2_1\lib\axis-ant.jar;..\..\..\external\axis-1_2_1\lib\commons-discovery-
      0.2.jar;..\..\..\external\axis-1_2_1\lib\commons-logging-1.0.4.jar;..\..\..\exte
      rnal\axis-1_2_1\lib\jaxrpc.jar;..\..\..\external\axis-1_2_1\lib\saaj.jar;..\..\.
      .\external\axis-1_2_1\lib\wsdl4j-1.5.1.jar" com.adobe.ids.SampleClient -host http
      ://localhost:12345 c:\test.jsx
      Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Service

       

              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClassCond(Unknown Source)
              at java.lang.ClassLoader.defineClass(Unknown Source)
              at java.security.SecureClassLoader.defineClass(Unknown Source)
              at java.net.URLClassLoader.defineClass(Unknown Source)
              at java.net.URLClassLoader.access$000(Unknown Source)
              at java.net.URLClassLoader$1.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: javax.xml.rpc.Service
              at java.net.URLClassLoader$1.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              ... 12 more
      Could not find the main class: com.adobe.ids.SampleClient.  Program will exit.

       

       

      I first tried to compile with ANT, then with ECLIPSE (which i have no experience with) but still get the same error...

       

      Please help... I know it's probably a newbie question in regards to Java but if someone can just point me in the right direction that would be great... From what i have deduced it is about the 'classpath' setting but in the sampleClient.bat batch file it explicitly defines the locations of the classes which from what i have read should make it work regardless ?

        • 1. Re: Newbie issues compiling java soap sampleclient
          JimXYZ987654321 Level 1

          The above was when trying to execute from the command line.

           

          This is what i get when executing from Eclipse:

           

          Mar 2, 2011 11:39:41 AM org.apache.axis.utils.JavaUtils isAttachmentSupported
          WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
          Script success
          : Script reported no errors

           


          The documentation tells me that the Warnings i should not worry about. So this is telling me it worked ?

           

          InDesign Server is running and accepting SOAP requests on port 12345. In the logs it showed no activity so it didn't work.

           

          Another thing to note is that Eclipse is showing a lot of warnings. It is showing 100 of 122 warnings in the Problems tab. Just thought this info might help ?

          • 2. Re: Newbie issues compiling java soap sampleclient
            JimXYZ987654321 Level 1

            Ok i now have the script running successfuly via Eclipse (it was an error in the javascript)

             

            But same error on the command line ?

            • 3. Re: Newbie issues compiling java soap sampleclient
              kjigs4it

              Hi,

               

              How did u generate the below libraray ??

               

              localhost.Service_wsdl.Service;
              localhost.Service_wsdl.ServiceLocator;
              localhost.Service_wsdl.ServicePortType;

               

              I  am trying to execute the sample-client-soap example but i getting below  error while doing build.

              It is giving hundreds of error while  building jar file.

               

              Can any you let me know you have  generated jar files?

              you help will be appreciated

               

              Thanx

              JK