Is there a way to force the base url of RPC calls?

24 views
Skip to first unread message

Neil Aggarwal

unread,
Dec 17, 2024, 4:39:07 PM12/17/24
to google-we...@googlegroups.com
Hello all:

I am having a problem with an RPC call.

My server side is available and responds to requests. I put a doGet
method in the implementation class and you can see its response
at this url:
https://dev.3dmathpuzzles.com/3dmp/DiagonalSlitherlink/GetPuzzle

When I load my client code:
https://dev.3dmathpuzzles.com/3dmp/diagonalSlitherlink.html
The RPC call fails with a 404 error.

I think the RPC call is using a different URL than what my server is
expecting.

I called GWT.getModuleBaseURL() and it gave me
https://dev.3dmathpuzzles.com/play/DiagonalSlitherlink/

So I think it might be trying to access the RPC at
https://dev.3dmathpuzzles.com/play/DiagonalSlitherlink/GetPuzzle

That is not going to work since that request will only go to Apache
and not make it to Tomcat.

Is there a way to force the base URL for the RPC call?

Thank you,
Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

Colin Alworth

unread,
Dec 17, 2024, 4:49:39 PM12/17/24
to GWT Users
You can cast your async service instance in client code to ServiceDefTarget, then invoke setServiceEntryPoint(...) on it with the desired URL.

Neil Aggarwal

unread,
Dec 17, 2024, 6:37:04 PM12/17/24
to google-we...@googlegroups.com

> You can cast your async service instance in client code to ServiceDefTarget, then invoke setServiceEntryPoint(...) on it with the desired URL.

 

That worked, now my servlet is getting called and I can see entries in the tomcat log.

 

Thank you!

Reply all
Reply to author
Forward
0 new messages