in reply to typecast int to string

Showing us some code would help.

I was bit by a similar situation doing XML RPC to a Java based server that was asking for a boolean. I used RPC::XML to make the XML RPC process easy and ultimately solve the problem.

In your case, the method would be something like:

RPC::XML::string->new(12345)