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

Re: Remote method server exception

$
0
0

You need to do this way.

 

RemoteMethodServer rms = RemoteMethodServer.getDefault();

                    rms.setUserName("***");

                    rms.setPassword("***");

rms.invoke("yourMethodName", Yourclass.class.getName,null,argTypes,argValues);

 

// Put your logic inside your method

 

public yourMethodName() {

WTChangeOrder2 cho = (WTChangeOrder2)( new ReferenceFactory()).getReference("VR:wt.change2.WTChangeOrder2:16423065").getObject();

                    wt.fc.QueryResult qr = wt.change2.ChangeHelper2.service.getChangeablesBefore(cho);

                    wt.doc.WTDocument wtd = null;

                    wt.fc.QueryResult qr2 = new wt.fc.QueryResult();

                    while (qr.hasMoreElements())

                    {

                              wtd = (wt.doc.WTDocument)qr.nextElement();

                       State st=State.toState(String state);

                                                  LifeCycleHelper.service.setLifeCycleState(wtd,st);

               }

 

}

 

Let me know if you need further detail


Viewing all articles
Browse latest Browse all 8876

Trending Articles



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