Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Use of the webservice protocol of dubbo

Shulou Source: shulou.com Published: 2022-06-01 06:38:38 10月03日 Update

Common interface and implementation class

Public interface WsService

{

String sayHello (String msg)

}

Public class WsServiceImpl implements WsService

{

@ Override

Public String sayHello (String msg)

{

Return "hello" + msg

}

}

Dubbo service provider configuration

Dubbo service consumer configuration

Web.xml configuration

Dubbo

Com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet

one

Dubbo

/ *

Dependent profile

Org.apache.cxf

Cxf-rt-frontend-simple

2.6.1

Org.apache.cxf

Cxf-rt-transports-http

2.6.1

Matters needing attention

It needs to be specified.

Jar needs to use version 2.6.1, but there seems to be a problem with the higher version. Consumers can't access it.

When consumer references, the url needs to take the application context, otherwise it cannot be accessed.

For servlet services, the port and context must be consistent with the application server's port and context.

Remaining problems

Mutual use of 1.dubbo-webservice and Standard webservice

Tags: Services configuration up and down context consumers consumption versions ports issues applications normal consistent items interfaces providers files servers standards considerations legacy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft OPPO Reno Shulou Information Docker