Web / Apache OFBiz Interview questions
What is the difference between OFBiz's REST/SOAP service export and calling a service internally?
Internally, calling a service through dispatcher.runSync or runAsync happens in-process: parameters are a Java object (typically a Map), and the caller shares the same JVM, transaction context, and delegator as the callee.
Exposing the same service over REST or SOAP adds a network and serialization boundary: incoming requests are deserialized (JSON/XML) into the service's parameter map, the service runs exactly as it would internally, and the result map is serialized back out - so external systems can invoke OFBiz business logic without any Java dependency.
Because the exposed contract is still the same ModelService definition, validation, permission checks, and transaction behavior are identical either way; what changes is authentication (typically token or HTTP-based for the external endpoint versus an already-authenticated in-process UserLogin) and the added latency and serialization overhead of a network hop.
More Related questions...