CXF-5364 Multiple cxf buses in the same spring context
Hi, I'd like to refresh a bit a subject as we run at the same issue. My main concern is about CXF Bus postprocessing. In the cxf.xml available in cxf-rt-core.jar (referenced as classpath:META-INF/cxf/cxf.xml) there is a default Bus defined together with the following classes: - org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor - org.apache.cxf.bus.spring.Jsr250BeanPostProcessor - org.apache.cxf.bus.spring.BusExtensionPostProcessor All of these postprocessing classes actually post process only the Bus that is defined with default cxf id. If I define my own clientBus it won't be postprocessed. I think it can be a source of problems? Shouldn't these postprocessors be modified to post process ALL busses registered in Spring context (regardless its id)? Thanks, Przemyslaw BIELICKI
Re: SOAP over WebSocket
Ordering is not needed at all. Correlation ID is enough as I expect that some requests will take more time that another and it's OK. Anyway, thanks a lot for your inputs! -- View this message in context: http://cxf.547215.n5.nabble.com/SOAP-over-WebSocket-tp5742556p5745365.html Sent from the cxf-dev mailing list archive at Nabble.com.
Re: SOAP over WebSocket
Yes, you need some kind of correlation Id in your SOAP message (ideally in the header part) But, I just learned that there is already existing subprotocol extension for websocket called MUX whose goal is to multiplex multiple ws connections over single TCP conection. In this case we have multiplexing on lower OSI layer e.g. implementation http://maven-repository.com/artifact/org.eclipse.jetty.websocket/websocket-mux-extension I'm going to play withit and compare. Single TCP connection to handle multiple clients is a great solution and it normally scaleas much better than one connection per client. -- View this message in context: http://cxf.547215.n5.nabble.com/SOAP-over-WebSocket-tp5742556p5745269.html Sent from the cxf-dev mailing list archive at Nabble.com.
Re: How to get in/out message length in the interceptors?
Hi Daniel, thx a lot for the tip. In fact I discovered this solution five minutes after asking the question ;) FYI for the input stream I use RECEIVE phase to register the wrapper and INVOKE phase to read bytes read count. For the output stream I use PRE_STREAM phase to register the wrapper and POST_STREAM phase to read bytes written count. Cheers, Przemyslaw On Tue, Jun 10, 2014 at 9:30 PM, Daniel Kulp dk...@apache.org wrote: On Jun 10, 2014, at 10:27 AM, Przemyslaw Bielicki pbieli...@gmail.com wrote: I need to know the input and output message size in my interceptors. I assume that Content-Length is not set in the request i.e. (Transfer-Encoding = chunked), so I cannot take the in length from the HTTP header - it must be really computed. Additional difficulty is that I don't want to serialize incoming and outgoing messages toString() as it will be a performance issue. Is there any way to get these sizes from the Input/OutputStream? Is there a way to inject my custom stream wrappers that will be counting number of bytes read/written? You would need to write an interceptor that would live fairly early in the interceptor chain that would do something like: InputStream in = message.getContent(InputStream.class); in = new MyLengthRecordingStream(in); message.setContent(InputSteam.class, in); The rest of the processing would then use your input stream and at the end of all the processing, you would have the length. -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
Re: How to get in/out message length in the interceptors?
one more thing - it might be a bug in CXF. I noticed that POST_INVOKE (registered as InInterceptor) is executed *AFTER *POST_STREAM (registered as OutInterceptor) Is it normal? On Wed, Jun 11, 2014 at 9:05 AM, Przemyslaw Bielicki pbieli...@gmail.com wrote: Hi Daniel, thx a lot for the tip. In fact I discovered this solution five minutes after asking the question ;) FYI for the input stream I use RECEIVE phase to register the wrapper and INVOKE phase to read bytes read count. For the output stream I use PRE_STREAM phase to register the wrapper and POST_STREAM phase to read bytes written count. Cheers, Przemyslaw On Tue, Jun 10, 2014 at 9:30 PM, Daniel Kulp dk...@apache.org wrote: On Jun 10, 2014, at 10:27 AM, Przemyslaw Bielicki pbieli...@gmail.com wrote: I need to know the input and output message size in my interceptors. I assume that Content-Length is not set in the request i.e. (Transfer-Encoding = chunked), so I cannot take the in length from the HTTP header - it must be really computed. Additional difficulty is that I don't want to serialize incoming and outgoing messages toString() as it will be a performance issue. Is there any way to get these sizes from the Input/OutputStream? Is there a way to inject my custom stream wrappers that will be counting number of bytes read/written? You would need to write an interceptor that would live fairly early in the interceptor chain that would do something like: InputStream in = message.getContent(InputStream.class); in = new MyLengthRecordingStream(in); message.setContent(InputSteam.class, in); The rest of the processing would then use your input stream and at the end of all the processing, you would have the length. -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
Re: SOAP over WebSocket
Hi Aki, Btw. what do you call asynchronous SOAP over HTTP? How do you get a response when it's ready? For me, HTTP is out of question as it's synchronous protocol, whatever tricks you make after :) My multiplex needs is a real bidirectional, full-duplex protocol. Cheers, Przemyslaw -- View this message in context: http://cxf.547215.n5.nabble.com/SOAP-over-WebSocket-tp5742556p5743400.html Sent from the cxf-dev mailing list archive at Nabble.com.
Re: SOAP over WebSocket
https://github.com/pbielicki/soap-websocket-cxf I tested soap-websocket-webapp in both Wildfly 8.0.1-SNAPSHOT and Tomcat 8.0.3 (for Tomcat you need to add extra dependency of commons-logging). You need to start ActiveMQ on the same machine on default port 61616. You can use soap-websocket-client to shoot messages. The only thing I'm not able to achieve yet is to have multiple consumers consuming SOAP requests for Hello and Calculator services. Any idea how to configure this? Przemyslaw -- View this message in context: http://cxf.547215.n5.nabble.com/SOAP-over-WebSocket-tp5742556p5743410.html Sent from the cxf-dev mailing list archive at Nabble.com.
Re: SOAP over WebSocket
https://github.com/pbielicki/soap-websocket-cxf I tested soap-websocket-webapp in both Wildfly 8.0.1-SNAPSHOT and Tomcat 8.0.3 (for Tomcat you need to add extra dependency of commons-logging). You need to start ActiveMQ on the same machine on default port 61616. You can use soap-websocket-client to shoot messages. The only thing I'm not able to achieve yet is to have multiple consumers consuming SOAP requests for Hello and Calculator services. Any idea how to configure this? Przemysla
ConnectionFactoryFeature missing in cxf-rt-transports-jms-3.0.0-milestone2-sources.jar
Hi, I noticed that org.apache.cxf.transport.jms.ConnectionFactoryFeature class is missing in cxf-rt-transports-jms-3.0.0-milestone2-sources.jar. Maybe also other classes are missing too. I checked CXF Git repo and the class is there in both master branch and 3.0.0-milestone2 tag, so I don't understand why it's missing in the JAR. Any ideas? Cheers, Przemyslaw
SOAP over WebSocket
Hi, does CXF support WebSockets as a transport? I need to support multiplexed SOAP and WebSocket protocol looks perfect as a starting point. It is bidirectional and full duplex. By multiplexing I mean that the client can send messages without waiting for the response, and the responses may be sent back in the different order that they were sent (I will use message / conversation ID, to identify the request and response) I looked for the information in the mailing list history, but it's still not clear for me if you support WebSocket out-of-the box[1] or I need to implement my own transport[2] (that could be a nice contribution to CXF? Many thanks, Przemyslaw [1] http://cxf.apache.org/docs/websocket.html [2] http://cxf.apache.org/docs/custom-transport.html
Re: Custom fault response (JAX-WS)
OK I found a workaround that works but it's very obscure: @Override public void handleFault(SoapMessage message) { ... Marshaller marshaller = JAXBContext.newInstance(MessageHeader.class).createMarshaller(); SOAPMessage soap = message.getContent(SOAPMessage.class); soap.getSOAPHeader().removeContents(); marshaller.marshal(msgHeader, soap.getSOAPHeader()); HttpServletResponse response = (HttpServletResponse) message.get(AbstractHTTPDestination.HTTP_RESPONSE); message.setContent(OutputStream.class, response.getOutputStream()); Exception e = message.getContent(Exception.class); soap.getSOAPBody().removeContents(); marshaller.marshal(OneAXmlUtil.buildErrorList(msgHeader, e), soap.getSOAPBody()); soap.writeTo(response.getOutputStream()); response.getOutputStream().close(); Is there any nice way to do this? Cheers, Przemyslaw -- View this message in context: http://cxf.547215.n5.nabble.com/Custom-fault-response-JAX-WS-tp5737771p5737775.html Sent from the cxf-dev mailing list archive at Nabble.com.
Re: Spring integration using @Configuration @ComponentScan annotations
sure, no problem - I will file a jira issue and attach my changes as the code is not public On Mon, Dec 9, 2013 at 3:14 PM, cschneider [via CXF] ml-node+s547215n5737562...@n5.nabble.com wrote: We have some factory classes but they are often not as convenient to use as the namespaces. In any case it would be interesting to see what you did. Can you open a jira and attach your code as a patch? If it is just a few lines you can also just paste the code or point to a github repo or similar. Christian On 09.12.2013 15:05, pbielicki wrote: Hi, in order to integrate CXF with Spring developers need to go through an XML file, right (i.e. http://cxf.apache.org/docs/writing-a-service-with-spring.html)? Is it possible out-of-the box to integrate CXF with Spring using annotation-driven context configuration? I am talking about @org.springframework.context.annotation.Configuration and @org.springframework.context.annotation.ComponentScan annotations ( http://docs.spring.io/spring/docs/3.2.x/javadoc-api/org/springframework/context/annotation/Configuration.html). Are they supported by CXF integration? The goal is to avoid any XML configuration. If it's not part of CXF I may help because I just implemented such integration (few lines of code, really), and I find it pretty useful. Please let me know what you think? I wanted to open a JIRA issue straight away but I prefer to ask you before. Cheers, Przemyslaw Bielicki -- View this message in context: http://cxf.547215.n5.nabble.com/Spring-integration-using-Configuration-ComponentScan-annotations-tp5737561.html Sent from the cxf-dev mailing list archive at Nabble.com. -- Christian Schneider http://www.liquid-reality.de Open Source Architect http://www.talend.com -- If you reply to this email, your message will be added to the discussion below: http://cxf.547215.n5.nabble.com/Spring-integration-using-Configuration-ComponentScan-annotations-tp5737561p5737562.html To unsubscribe from Spring integration using @Configuration @ComponentScan annotations, click herehttp://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5737561code=cGJpZWxpY2tpQGdtYWlsLmNvbXw1NzM3NTYxfC0xODU3NDYzNDAz . NAMLhttp://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://cxf.547215.n5.nabble.com/Spring-integration-using-Configuration-ComponentScan-annotations-tp5737561p5737563.html Sent from the cxf-dev mailing list archive at Nabble.com.