I'm new to this concept so I might be wrong in calling it a "multi-module project". In the software I'm making, there's one distinct unit with distinct inputs and outputs. I decided to pull it out and run it as a separate (web) service since it has other values in this stand-alone mode.

But the thing is, now the application which was previously blended with this unit has to run standalone, too. And that means there should be a new way for it to communicate with that unit by calling it's service endpoints which adds new layers of complexity (serializing and de-serializing not-so-simple data into XML and JSON). Is there a common practice for this in software engineering? Can I transmit the data in any other way?

The software is being written in Scala which runs on JVM and may or may not affect this story.