<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li></li>
</ol>
<p dir="auto">Use a web container, for example tomcat, and use a context path, for example set the container context path "dubbo_samples_webservice_provider_war"</p>
<ol start="2" dir="auto">
<li></li>
</ol>
<p dir="auto">config web.xml</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    &lt;servlet&gt;
        &lt;servlet-name&gt;dubbo&lt;/servlet-name&gt;
        &lt;servlet-class&gt;org.apache.dubbo.remoting.http.servlet.DispatcherServlet&lt;/servlet-class&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;dubbo&lt;/servlet-name&gt;
        &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;"><pre class="notranslate">    &lt;<span class="pl-ent">servlet</span>&gt;
        &lt;<span class="pl-ent">servlet-name</span>&gt;dubbo&lt;/<span class="pl-ent">servlet-name</span>&gt;
        &lt;<span class="pl-ent">servlet-class</span>&gt;org.apache.dubbo.remoting.http.servlet.DispatcherServlet&lt;/<span class="pl-ent">servlet-class</span>&gt;
        &lt;<span class="pl-ent">load-on-startup</span>&gt;1&lt;/<span class="pl-ent">load-on-startup</span>&gt;
    &lt;/<span class="pl-ent">servlet</span>&gt;
    &lt;<span class="pl-ent">servlet-mapping</span>&gt;
        &lt;<span class="pl-ent">servlet-name</span>&gt;dubbo&lt;/<span class="pl-ent">servlet-name</span>&gt;
        &lt;<span class="pl-ent">url-pattern</span>&gt;/services/*&lt;/<span class="pl-ent">url-pattern</span>&gt;
    &lt;/<span class="pl-ent">servlet-mapping</span>&gt;</pre></div>
<ol start="3" dir="auto">
<li></li>
</ol>
<p dir="auto">config provider</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    &lt;dubbo:application name=&quot;dubbo-webservice-app&quot; /&gt;

    &lt;dubbo:registry address=&quot;zookeeper://127.0.0.1:2181&quot; /&gt;

    &lt;dubbo:protocol name=&quot;webservice&quot; port=&quot;8083&quot; server=&quot;servlet&quot; contextpath=&quot;dubbo_samples_webservice_provider_war/services&quot;/&gt;

    &lt;dubbo:service interface=&quot;org.apache.dubbo.samples.webservice.DemoService&quot; ref=&quot;demoService&quot; /&gt;

    &lt;bean id=&quot;demoService&quot; class=&quot;org.apache.dubbo.samples.webservice.provider.impl.DemoServiceImpl&quot; /&gt;"><pre class="notranslate">    &lt;<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">application</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>dubbo-webservice-app<span class="pl-pds">"</span></span> /&gt;

    &lt;<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">registry</span> <span class="pl-e">address</span>=<span class="pl-s"><span class="pl-pds">"</span>zookeeper://127.0.0.1:2181<span class="pl-pds">"</span></span> /&gt;

    &lt;<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">protocol</span> <span class="pl-e">name</span>=<span class="pl-s"><span class="pl-pds">"</span>webservice<span class="pl-pds">"</span></span> <span class="pl-e">port</span>=<span class="pl-s"><span class="pl-pds">"</span>8083<span class="pl-pds">"</span></span> <span class="pl-e">server</span>=<span class="pl-s"><span class="pl-pds">"</span>servlet<span class="pl-pds">"</span></span> <span class="pl-e">contextpath</span>=<span class="pl-s"><span class="pl-pds">"</span>dubbo_samples_webservice_provider_war/services<span class="pl-pds">"</span></span>/&gt;

    &lt;<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">service</span> <span class="pl-e">interface</span>=<span class="pl-s"><span class="pl-pds">"</span>org.apache.dubbo.samples.webservice.DemoService<span class="pl-pds">"</span></span> <span class="pl-e">ref</span>=<span class="pl-s"><span class="pl-pds">"</span>demoService<span class="pl-pds">"</span></span> /&gt;

    &lt;<span class="pl-ent">bean</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>demoService<span class="pl-pds">"</span></span> <span class="pl-e">class</span>=<span class="pl-s"><span class="pl-pds">"</span>org.apache.dubbo.samples.webservice.provider.impl.DemoServiceImpl<span class="pl-pds">"</span></span> /&gt;</pre></div>
<ol start="4" dir="auto">
<li></li>
</ol>
<p dir="auto">start provider<br>
start consumer</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">The consumer can invoke provider successfully.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">The invoke fails</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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"><pre class="notranslate"><code class="notranslate">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
</code></pre></div>
<p dir="auto">In fact, the wsdl url is<br>
<a href="http://localhost:8083/dubbo_samples_webservice_provider_war/services/dubbo_samples_webservice_provider_war/services/org.apache.dubbo.samples.webservice.DemoService?wsdl" rel="nofollow">http://localhost:8083/dubbo_samples_webservice_provider_war/services/dubbo_samples_webservice_provider_war/services/org.apache.dubbo.samples.webservice.DemoService?wsdl</a></p>
<p dir="auto"><strong>It's because the consumer cannot get the provider container context path and the servlet pattern defined in the provider.</strong></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.5</li>
<li>Operating System version: windows10</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>application.properties</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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"><pre class="notranslate"><code class="notranslate">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
</code></pre></div>
<ol start="2" dir="auto">
<li>interfaces</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public interface UserBusinessService extends Serializable {
 // methods
}"><pre class="notranslate"><code class="notranslate">public interface UserBusinessService extends Serializable {
 // methods
}
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Path(&quot;noGeneratorRestService&quot;)
@Consumes({&quot;application/json&quot;, &quot;text/xml&quot;})
@Produces({&quot;application/json; charset=UTF-8&quot;, &quot;text/xml; charset=UTF-8&quot;})
public interface NOGeneratorRestService {
//methods
}"><pre class="notranslate"><code class="notranslate">@Path("noGeneratorRestService")
@Consumes({"application/json", "text/xml"})
@Produces({"application/json; charset=UTF-8", "text/xml; charset=UTF-8"})
public interface NOGeneratorRestService {
//methods
}
</code></pre></div>
<ol start="3" dir="auto">
<li>implements</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Service
public class UserBusinessServiceImpl implements UserBusinessService {
//methods
}"><pre class="notranslate"><code class="notranslate">@Service
public class UserBusinessServiceImpl implements UserBusinessService {
//methods
}
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Service(protocol = &quot;rest&quot;)
public class NOGeneratorRestServiceImpl implements NOGeneratorRestService {
//methods
}"><pre class="notranslate"><code class="notranslate">@Service(protocol = "rest")
public class NOGeneratorRestServiceImpl implements NOGeneratorRestService {
//methods
}
</code></pre></div>
<ol start="4" dir="auto">
<li>exception result</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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"><pre class="notranslate"><code class="notranslate">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
</code></pre></div>
<ol start="5" dir="auto">
<li>ConfigManager.isDefaultConfig is not working<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13428489/78758056-1747ae00-79b0-11ea-9f68-b8b282e95b51.png"><img src="https://user-images.githubusercontent.com/13428489/78758056-1747ae00-79b0-11ea-9f68-b8b282e95b51.png" alt="1586330358(1)" style="max-width: 100%;"></a></li>
</ol>
<p dir="auto">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 <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/service/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/service">@service</a>，otherwise use the dubbo procotol. But now the dubbo.protocols.rest.default=false is not working.<br>
应用里面有两个协议，一个是默认的dubbo协议，一个是rest协议，我希望就是注解里面有显示声明rest就用rest协议，不然就默认用dubbo协议，现在的问题就是default属性没有生效，导致不声明的接口都会同时暴露两种协议，请问是哪里配置不对吗？</p>