Webservice protocol

Feature description

WebService-based remote invocation protocol, implemented based on frontend-simple and transports-http of Apache CXF. 2.3.0 and above are supported.

CXF is an open source RPC framework of Apache, which is merged from Xfire and Celtix.

  • Number of connections: multiple connections
  • Connection method: short connection
  • Transmission protocol: HTTP
  • Transmission method: synchronous transmission
  • Serialization: SOAP text serialization
  • Applicable scenarios: system integration, cross-language call

It can interoperate with native WebService services, namely:

  • The provider uses Dubbo’s WebService protocol to expose the service, and the consumer directly uses the standard WebService interface to call,
  • Or the provider uses the standard WebService to expose the service, and the consumer uses Dubbo’s WebService protocol to call.


  • Parameters and return values need to implement Serializable interface
  • Parameters try to use basic types and POJO

scenes to be used

To publish a service (internal/external), regardless of client type or performance, it is recommended to use webservice. The server has determined to use webservice, the client cannot choose, and must use webservice.

How to use


Starting from Dubbo 3, the Webservice protocol is no longer embedded in Dubbo, and an independent module needs to be introduced separately.


Configuration protocol

<dubbo:protocol name="webservice" port="8080" server="jetty" />

Configure the default protocol

<dubbo:provider protocol="webservice" />

Configure service protocol

<dubbo:service protocol="webservice" />


<dubbo:protocol id="webservice1" name="webservice" port="8080" />
<dubbo:protocol id="webservice2" name="webservice" port="8081" />

direct connection

<dubbo:reference id="helloService" interface="HelloWorld" url="webservice://" />


Jetty Server (default)

<dubbo:protocol ... server="jetty" />
<dubbo:protocol ... server="servlet" />

Configure DispatcherServlet


If a servlet is used to dispatch the request

  • The protocol port <dubbo:protocol port="8080" /> must be the same as the port of the servlet container.
  • The context path of the protocol <dubbo:protocol contextpath="foo" /> must be the same as the context path of the servlet application.

Last modified February 22, 2023: Merge refactor website (#2293) (4517e8c1c9c)