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

Remote method server exception

$
0
0

Hi!

 

I want to set state for the WTDocument by java code through rms like this:

RemoteMethodServer rms = RemoteMethodServer.getDefault();

                    rms.setUserName("***");

                    rms.setPassword("***");

                    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();

               Class argTypes[] = {wt.lifecycle.LifeCycleManaged.class, wt.lifecycle.State.class};

               Object argValues[] = {(wt.lifecycle.LifeCycleManaged)wtd, wt.lifecycle.State.toState("CANCELLED")};

               rms.invoke("setState", wt.lifecycle.LifeCycleServerHelper.service.getClass().getName(), null, argTypes, argValues);

                    }

 

But I have an exception like this:

WARNING: The ManagerService is not initialized!  This can be caused by:

1) Attempting to invoke a server only method from a remote client

2) Attempting to invoke a method on a service from the constructor or static initializer of another service

 

What is wrong?


Viewing all articles
Browse latest Browse all 8876

Trending Articles



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