Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

Use a web container, for example tomcat, and use a context path, for example set the container context path "dubbo_samples_webservice_provider_war"

config web.xml

<servlet>
<servlet-name>dubbo</servlet-name>
<servlet-class>org.apache.dubbo.remoting.http.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dubbo</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>

config provider

<dubbo:application name="dubbo-webservice-app" />

<dubbo:registry address="zookeeper://127.0.0.1:2181" />

<dubbo:protocol name="webservice" port="8083" server="servlet" contextpath="dubbo_samples_webservice_provider_war/services"/>

<dubbo:service interface="org.apache.dubbo.samples.webservice.DemoService" ref="demoService" />

<bean id="demoService" class="org.apache.dubbo.samples.webservice.provider.impl.DemoServiceImpl" />

start provider

start consumer

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

The consumer can invoke provider successfully.

Actual Result

The invoke fails

If there is an exception, please attach the exception trace:

org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:67)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:81)
at com.sun.proxy.$Proxy32.hello(Unknown Source)
at org.apache.dubbo.common.bytecode.Wrapper0.invokeMethod(Wrapper0.java)
at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)
at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:84)
at org.apache.dubbo.rpc.protocol.AbstractProxyProtocol$2.doInvoke(AbstractProxyProtocol.java:113)
at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:163)
at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(AsyncToSyncInvoker.java:52)
at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78)
at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:89)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:81)
at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:51)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:81)
at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:69)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:81)
at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:82)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:259)
at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:82)
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:74)
at org.apache.dubbo.common.bytecode.proxy0.hello(proxy0.java)
at org.apache.dubbo.samples.webservice.consumer.Application.main(Application.java:27)
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: null' when communicating with http://127.0.0.1:8083/dubbo_samples_webservice_provider_war/services/org.apache.dubbo.samples.webservice.DemoService
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1618)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1625)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1570)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
... 30 more

In fact, the wsdl url is

http://localhost:8083/dubbo_samples_webservice_provider_war/services/dubbo_samples_webservice_provider_war/services/org.apache.dubbo.samples.webservice.DemoService?wsdl

It's because the consumer cannot get the provider container context path and the servlet pattern defined in the provider.

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.5

Operating System version: windows10

Java version: 1.8

Steps to reproduce this issue

application.properties

dubbo.protocols.dubbo.port=-1
dubbo.protocols.dubbo.name=dubbo
dubbo.protocols.dubbo.default=true

dubbo.protocols.rest.port=-1
dubbo.protocols.rest.name=rest
dubbo.protocols.rest.contextpath=upmRestServices
dubbo.protocols.rest.default=false

interfaces

public interface UserBusinessService extends Serializable {
// methods
}

@Path("noGeneratorRestService")
@Consumes({"application/json", "text/xml"})
@Produces({"application/json; charset=UTF-8", "text/xml; charset=UTF-8"})
public interface NOGeneratorRestService {
//methods
}

implements

@Service
public class UserBusinessServiceImpl implements UserBusinessService {
//methods
}

@Service(protocol = "rest")
public class NOGeneratorRestServiceImpl implements NOGeneratorRestService {
//methods
}

exception result

java.lang.RuntimeException: RESTEASY003130: Class is not a root resource. It, or one of its interfaces must be annotated with @Path: xxx.UserBusinessService implements: java.io.Serializable

ConfigManager.isDefaultConfig is not working

My Application has two protocols, one is the default dubbo procotol, and the other is rest. And I wish the rest working when I declearing at the @service，otherwise use the dubbo procotol. But now the dubbo.protocols.rest.default=false is not working.

应用里面有两个协议，一个是默认的dubbo协议，一个是rest协议，我希望就是注解里面有显示声明rest就用rest协议，不然就默认用dubbo协议，现在的问题就是default属性没有生效，导致不声明的接口都会同时暴露两种协议，请问是哪里配置不对吗？