Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: Java code to Download Content of WTDocument

$
0
0

Another option is to invoke your method on the methodserver:

 

 

 

import java.lang.reflect.InvocationTargetException;

import java.rmi.RemoteException;

 

 

import org.apache.log4j.Logger;

 

 

import wt.method.RemoteAccess;

import wt.method.RemoteMethodServer;

import wt.util.WTException;

 

 

public class InvokeTest  implements RemoteAccess {

 

 

      public static Logger  logger = Logger.getLogger(InvokeTest.class.getName());

 

 

 

 

      public static void myMethod() throws WTException,RemoteException{

            // your code goes here

      }

 

 

      public static void main(String[] args) throws WTException, RemoteException, InvocationTargetException {

         RemoteMethodServer.getDefault().invoke("myMethod", "ext.tools.InvokeTest", null,new Class[]{}, new Object[]{} );

      }

 

 

}


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>