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] [Commented] (CXF-4763) Http conduit configuration overriding.
Date Thu, 17 Jan 2013 19:00:31 GMT

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

Daniel Kulp commented on CXF-4763:
----------------------------------


It's likely the correct behavior.  It's not a "most specific" match, it's a first one to match.
  If you flip the definitions in the xml, then likely it would work as expected.   Put the
more specific ones first, then the wildcards.

                
> 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 "*" conduit config is used. On
the contrary, when I set "*" timeout to 1000ms, and the second one to 3000 and call WS it
fails, as "*" 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