cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-4763) Http conduit configuration overriding.
Date Fri, 25 Jan 2013 17:17:13 GMT

    [ https://issues.apache.org/jira/browse/CXF-4763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13562844#comment-13562844
] 

Daniel Kulp edited comment on CXF-4763 at 1/25/13 5:15 PM:
-----------------------------------------------------------

Ah, right.  That due to name="\*" instead of something like name="\*.http-conduit".

All HTTP conduits are configured twice, once using the "name" based on the service name and
once based on the URL.  The names are all regex expressions and matched for both of those.
 For the most part, I generally recommend NOT using the http-conduit form and instead use
the URL based form.  The URL's are usually significantly easier to figure out and make sure
they are correct.

In anycase, this is working as designed.
                
      was (Author: dkulp):
    
Ah, right.  That due to name="*" instead of something like name="*.http-conduit".

All HTTP conduits are configured twice, once using the "name" based on the service name and
once based on the URL.  The names are all regex expressions and matched for both of those.
 For the most part, I generally recommend NOT using the http-conduit form and instead use
the URL based form.  The URL's are usually significantly easier to figure out and make sure
they are correct.

In anycase, this is working as designed.
                  
> Http conduit configuration overriding.
> --------------------------------------
>
>                 Key: CXF-4763
>                 URL: https://issues.apache.org/jira/browse/CXF-4763
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus, JAX-WS Runtime, Transports
>    Affects Versions: 2.7.2
>         Environment: Windows 7 x64
> Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
> Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)
>            Reporter: Siarhei Krukau
>            Priority: Trivial
>         Attachments: demo-webapp.zip
>
>
> I have a simple web service:
> {code:java}
> @WebService(endpointInterface = "by.dev.madhead.demowebapp.web.service.DemoService")
> @Service("DemoService")
> public class DemoServiceImpl implements DemoService {
>     private Random random = new Random(new Date().getTime());
>     @Override
>     public String getVersion() {
>         return "1.0";
>     }
>     @Override
>     public Integer generateRandomNumber(Integer range) {
>         return random.nextInt(range);
>     }
>     @Override
>     public String sleepAndReturn(Integer milliseconds) throws InterruptedException {
>         Thread.sleep(milliseconds);
>         return milliseconds + " milliseconds slept.";
>     }
> }
> {code}
> It is configured via Spring and runs inside a webapp:
> {code:xml}
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> <context:component-scan base-package="by.dev.madhead.demowebapp.web.service" />
> <jaxws:endpoint id="DemoServiceEndpoint" implementor="#DemoService" address="/DemoService"
/>
> {code}
> The webservice runs good. Then I've created a client:
> {code:java}
> public class Main {
>     public static void main(String[] args) throws Exception {
>         ApplicationContext context = new ClassPathXmlApplicationContext("context.xml",
Main.class);
>         DemoService service = (DemoService) context.getBean("DemoServiceClient");
>         System.out.println(service.sleepAndReturn(2000));
>     }
> }
> {code}
> {code:xml}
> <jaxws:client id="DemoServiceClient" serviceClass="by.dev.madhead.demowebapp.web.service.DemoService"
>     address="http://localhost:8080/demo-webapp/DemoService" />
> <http-conf:conduit name="*">
>     <http-conf:client ReceiveTimeout="3000" />
> </http-conf:conduit>
> <http-conf:conduit name="{http://service.web.demowebapp.madhead.dev.by/}DemoServicePort.http-conduit">
>     <http-conf:client ReceiveTimeout="1000" />
> </http-conf:conduit>
> {code}
> I've expect client to fail, as the most specific conduit config has timeout in 1000ms,
but it tooks service 2000ms to answer. But It works fine, as wildcard conduit config is used.
On the contrary, when I set wildcard conduit's timeout to 1000ms, and the second one to 3000
and call WS it fails, as wildcard config is used.
> Is it correct behavior?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message