8 Replies Latest reply: Jan 2, 2014 9:33 AM by 1053383 RSS

    [AutoVue Web Service]Where is VueBeanWS_Service class..?

    eeddf0e1-cb2d-4a23-ab55-a3df256d82ed

      I'm testing AutoVue Server 20.2.1 .

       

      AutoVue WS sample code is like below.

       

      There is no 'com.oracle.autovue.services.VueBeanWS_Service' class in AutoVueWS.jar.

       

      I can not compile sample code.

       

      Anybody know about this...?

       

      =================================================================================

      import com.oracle.autovue.services.AuthorizationProxy;
      import com.oracle.autovue.services.PrintPageType;
      import com.oracle.autovue.services.VueBeanWS;
      import com.oracle.autovue.services.VueBeanWS_Service;
      import com.oracle.autovue.services.WsPrintOptions;
      import com.oracle.autovue.services.WsPrintHeaders;
      import com.oracle.autovue.services.WsPrintWatermark;


      public class SampleClient {
       
          public static void main(String[] args) throws Exception {

           try{
            VueBeanWS_Service vueBeanWS_Service = new VueBeanWS_Service();
            VueBeanWS proxy = vueBeanWS_Service.getVueBeanWSPort();
           
            // Permission check for the local files should be added here if upload protocol is enabled
            // to ensure that the client has permission to read the file before print it out
           
         // AuthorizationProxy is needed if the resourse has resricted access (e.g. document is being retrieved by VueLink)
         AuthorizationProxy authProx = new AuthorizationProxy();

            // One example is access using username and password
            /*
               authProx.setUsername("demo");
               authProx.setPassword("demo");
             */

            WsPrintOptions options = new WsPrintOptions();
           
         // The list of available printers can be obtained from getPrinterNameList() web method.
               options.setPrinter("Some Printer Name");
         // refer to WsPrintOptions for all valid Page Types
               options.setPrintPageType(PrintPageType.PAGES_ALL);
            // if document is a 3d file, it is recommended to use "options.setSendPageAsImage(true)"

            WsPrintWatermark watermark = new WsPrintWatermark();
            // refer to WsPrintWatermark for all available attributes.
            /*
               watermark.setText(authProx.getUsername());
             */

            WsPrintHeaders headers = new WsPrintHeaders();
            //refer to WsPrintHeaders for all available attibutes.
            /*
            headers.setTopCenterText("%f");
             */

            // specify URI
            String URI = args[0];

            System.out.println(URI + " will be printed!");
            boolean busy = true;
            int attempt = 0;
            while (busy) {
             try{
              String msg = proxy.print(URI, options, headers, watermark, authProx, false, null);
              busy = false;
              System.out.println("file: "  + msg);
             } catch (Exception ex){
              System.out.println("Exception : " + ex.getMessage());

              if (ex.getMessage().contains("ERROR_00")){ //retry after 1 minute
               Thread.sleep(60000);
               System.out.println(" Retrying.  -Attempt # "+ (++attempt));
              } else {
               busy = false;
               System.out.println("Other exceptions: " + ex.getMessage());
              }
             }
            } // end of while(busy)

           }catch(Exception topEx){
            System.out.println("Outer Exception : " + topEx.getMessage());
           }
          }
      }