Re: JAX-WS CXF with Tibco JMS
Hi Ed, I have been able to reproduce the error on 2.2-SNAPSHOT now. It seems to happen when the ConnectionFactory is not wrapped in a SingleConnectionFactory. With the config style you use this should happen automatically. Could you provide me with a complete maven sample project that shows the error? This would help debugging into the problem. As a workaround you can use the new config style as explained in : http://cwiki.apache.org/CXF20DOC/using-the-jmsconfigfeature.html When you wrap the ConnectionFactory like in the example the error should not occur. Still I would like to fix this of course ;-) Greetings Christian Ed Scriven schrieb: Christian, I have tested my configuration with Tibco 4.3.0 and CXF 2.2-SNAPSHOT. Unfortunately problems persist. Although javax.jms.InvalidDestinationException is no longer thrown, the client times out. Inspecting the Tibco logs shows that the temporary queue is created successfully but "created receiver failed: invalid temporary queue" remains. For your information, my CXF configuration is as follows (please note that this has been manually typed over from a segregated network): Server: http://system.parameters/SystemParametersServiceImpl}SystemParametersServiceImplPort.jms-destination";> Client: http://system.parameters/SystemParametersServiceImpl}SystemParametersServicePort.jms-conduit";> Regards, Ed 2009/1/28 Christian Schneider : Could you try to checkout the CXF head from subversion, compile it and try it with your project. I was not yet able to identify the source of the problem but for me it seems solved on the head. If it works for you too we can be quite sure that CXF 2.1.4 will include the fix for this issue. If your have subversion and maven installed the following will work: svn co http://svn.apache.org/repos/asf/cxf/trunk cd trunk set MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=128M mvn -Pfastinstall In your project you then include the just compiled version as: 2.2-SNAPSHOT Greetings Christian Ed Scriven schrieb: Hello Christian, Did you get a chance to check your own samples with Tibco EMS? Regards, Ed 2009/1/21 Christian Schneider Hi Ed, I will check my own sample with tibco ems. Greetings Christian Ed Scriven schrieb: Hello, I am experiencing problems getting JAX-WS CXF with Tibco JMS to work. My configuration is derived from the http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.htmland http://cwiki.apache.org/CXF20DOC/jms-transport.html. I am using Spring. If I provide a jndiReplyDestinationName on the jms:conduit/jms:address element all works fine. Unfortunately when I remove this attribute and expect temporary queues instead Tibco throws a javax.jms.InvalidDestinationException: Invalid temporary destination exception. This exception is raised from the Spring DefaultMessageListenerContainer requesting Tibco libraries to create a consumer. Having inspected the Tibco logs the temporary queue is created successfully named $TMP$.EMS-SERVER.9A049772E795.2. The logs do state that "created receiver failed: invalid temporary queue". I have spent a good day trawling Google for anything related to this issue, but with no success. Apologies not stack traces nor code, they are on a segregated network with no Internet access. I can get them if required. Has anyone experience CXF with Tibco JMS? Has anyone experienced temporary queue problems before? Regards, Ed -- Christian Schneider --- http://www.liquid-reality.de -- Christian Schneider --- http://www.liquid-reality.de -- Christian Schneider --- http://www.liquid-reality.de
Re: Altering JSON Output in a REST service
hi wildPengiun can u plz explain more what u did to alter json output in rest service I am, using jaxrs I also want to alter json output by adding callback function please can provide some sample code suppose my rest service is @GET @Produces("application/json") @Consumes("application/json") @Path("/users/json") public Flights getFlightListAsJson() { return getFlights(); } & i get ouput {"flights":{"flight":[{"@flightId":"OK123","company":"Czech Airlines","number":123,"aircraft":"B737"},{"@flightId":"OK124","company":"Czech Airlines","number":124,"aircraft":"AB115"}]}} but i wanted to do output like getflight({"flights":{"flight":[{"@flightId":"OK123","company":"Czech Airlines","number":123,"aircraft":"B737"},{"@flightId":"OK124","company":"Czech Airlines","number":124,"aircraft":"AB115"}]}}) how can write this getflight string in response using jaxrs. wildPengiun wrote: > > Thanks for that Sergey, but I've had a success with my REST > outInterceptors. Instead of using an annotation on the service class I've > added it to the beans.xml and now its burst into life. Now I can see the > content-type is JSON hoorah. > > Next problem is how to change the message ?? any clues > > Thanks for all the help. > > > > Sergey Beryozkin-3 wrote: >> >> Hi >> >>> >>> I'm trying to alter some output in a REST call. I want to wrap the JSON >>> output with a callback name. I've managed to get a filter to work (all >>> my >>> attempts to get the OutInterceptor to work have failed). So now I've got >>> a >>> message object. >>> >>> To alter the message I thought I could use something like JSONStream os >>> = >>> message.getContent(JSONStream.class); but this returns null. Anyone have >>> an >>> idea how I can alter the JSON. >> >> JAXRS Output filters are invoked immediately after the invocation has >> returned but before a given method response has been >> serialized into the output message. >> >> So I think what you need to do in your response handler is to replace the >> actual OutputStream.class with a buffered/filter one, >> wrapping the original one. >> >> What will happen next is that a JSONProvider will write into this stream >> and I guess at this moment you can transfrom the incoming >> output bytes. >> >> It's basically doing same thing you can do with Servlet filters. >> >> Default JSONProvider does not append a JSONStream.class. >> >> As such another option is actually write a custom JSON >> MessageVBodyWriter, possibly either extending the default one or simple >> copying its code and updating its wtiteTo() method to do a pre-request >> specific JSON or something like that. >> Providers can have @Contexts like UriInfo, etc, injected so one can get >> some additional info from there. >> >> Does it make sense or am I missing the point ? >> >> Cheers, Sergey >> >>> -- >>> View this message in context: >>> http://www.nabble.com/Altering-JSON-Output-in-a-REST-service-tp20478852p20478852.html >>> Sent from the cxf-user mailing list archive at Nabble.com. >>> >> >> >> >> > > -- View this message in context: http://www.nabble.com/Altering-JSON-Output-in-a-REST-service-tp20478852p21721601.html Sent from the cxf-user mailing list archive at Nabble.com.
Any way to automatically generate documentation?
Hi all, I have a SOAP service I implemented with CXF. The service's underlying Java classes are documented via JavaDoc comments. My question is... Is there any way to generate nice SOAP interface documentation which would pull the comments directly from the JavaDoc? The documentation would then be given to clients who want to use my SOAP api. (I know that XMLspy will generate basic docs directly from the WSDL file, but I'm hoping there's an easier, more direct, and FREE way to do this using CXF or related tools.) Many thanks!
Re: integrate with Hibernate+Spring+CXF
You aren't deep enough in the backtrace. See http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ExceptionInInitializerError.html . You have somehow provoked some other exception from your static code, and we don't know what from this email. 2009/1/28 Bhanu B > Hi All > Could any one tell me about this ERROR > It has accruing when saving data into DB table > > org.apache.cxf.phase.PhaseInterceptorChain doIntercept > INFO: Application has thrown exception, unwinding now > org.apache.cxf.interceptor.Fault >at > > org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:119) >at > > org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:83) >at > > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:107) >at > org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:54) >at > > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68) >at > > org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56) >at > > org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) >at > > org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92) >at > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220) >at > > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78) >at > > org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92) >at > > org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:285) >at > > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:168) >at > > org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:175) >at > > org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153) >at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) >at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) >at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >at > > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) >at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) >at > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) >at > > org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) >at > > org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) >at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) >at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >at > > org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) >at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) >at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) >at > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) >at > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) >at java.lang.Thread.run(Thread.java:613) > Caused by: java.lang.ExceptionInInitializerError >at > > com.company.auth.service.AuthServiceImpl.updateEmployee(AuthServiceImpl.java:33) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >at java.lang.reflect.Method.invoke(Method.java:585) >at > > org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:136) >at > > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82) >... 32 more > > > > Regards, > B > > 2009/1/28 Bhanu B > > > Hi > > Please find my source code here and let me know what is the wrong ,i > think > > something has wrong here > > > > Employee.java > > > > package com.company.auth.bean; > > > > import java.io.Serializable; > > > > public class Employee implements Serial
Re: integrate with Hibernate+Spring+CXF
Hi All Could any one tell me about this ERROR It has accruing when saving data into DB table org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Application has thrown exception, unwinding now org.apache.cxf.interceptor.Fault at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:119) at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:83) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:107) at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:54) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78) at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:285) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:168) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:175) at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:613) Caused by: java.lang.ExceptionInInitializerError at com.company.auth.service.AuthServiceImpl.updateEmployee(AuthServiceImpl.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:136) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82) ... 32 more Regards, B 2009/1/28 Bhanu B > Hi > Please find my source code here and let me know what is the wrong ,i think > something has wrong here > > Employee.java > > package com.company.auth.bean; > > import java.io.Serializable; > > public class Employee implements Serializable { > > private static final long serialVersionUID = 1L; > private Integer gid; > private String lastname; > private String firstname; > private String privileges; > > public Employee() { > > > } > > public Integer getGid() { > return gid; > } > public void setGid(Integer gid) { > this.gid = gid; > } > public String getLastname() { > return lastname; > } > public void setLastname(String lastname) { >
Can wsdl2java generate common classes from an xsd shared between several wsdls?
I have a situation that can be represented by this scenario: * I have two wsdls. One contains a webservice interface for ordering Bikes. It references an XSD that describes my Bike object. The other contains a webservice interface for ordering Cars. It references an XSD that describes my Car object. * Both of my two xsds (Bike.xsd and Car.xsd) reference a third xsd that describes a Vehicle. * Bike and Car both extend Vehicle. When I use wsdl2java to generate my web service for the Bike WS, I get a nice object hierarchy where Bike subclasses Vehicle. The Vehicle class has a JAXB annotation like this: @XMLSeeALso({Bike.class}) Similarly when I use wsdl2java on the carws.wsdl, My car object extends Vehicle and Vehicle has a JAXB annotation pointing to Car.class. My problem is that I want the Vehicle class to be shared between both Car and Bike. I know I could hand edit the file after I generate it, but I'd like to avoid that if possible. Is there a solution for this? I was originally looking for a solution where I could pass in both wsdls at the same time, but it didn't look like that was possible. I appreciate any help. -- View this message in context: http://www.nabble.com/Can-wsdl2java-generate-common-classes-from-an-xsd-shared-between-several-wsdls--tp21715213p21715213.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: How to use JAX-RS as facade for other services?
Hi Andy If so then it's a client api which you're after, right ? I'm planning to start doing some work in this area shortly. There's a number of approaches, and I'm not certain we'll get an http-centric approach prioritized first, but for 2.2 we'll attempt to come up with something, possibly with the proxy injection supported. What do you think about JAXWS Dispatch API ? Will it do ? It's all just streams, not brittle. or indeed basic (HTTP)URLConnection ? If what you'd like to do is to get a URI of a given request and send it further along to a corresponding external service then may be it work too ? Sorry if I'm still misunderstanding you... Cheers, Sergey Hi Sergey, client-sider redirect is not the case, what I am thinking of is hiding other service *behind* JAX-RS being "URLs controller", so the latter is what I am looking for. Basic example is to call outside service from within JAX-RS handler method i.e.: client --> jax-rs --> extern service client <-- jax-rs <-- extern service cheers, andy. Sergey Beryozkin-4 wrote: Hi Andy, Any chance some of Response/ResponseBuilder methods can help you, like seeOther() ? Or are you referring to JAX-RS client api such that you can do some outbound invocations ? If it's the latter then I can say we're evaluating a number of approaches, CXF 2.2 might get some initial client api support Can you expand a bit on how you envisage the messages flow ... Cheers, Sergey -- View this message in context: http://www.nabble.com/How-to-use-JAX-RS-as-facade-for-other-services--tp21697838p21712073.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: problems with ws-a
I should have mentioned that this is a provider service. So, it appears that I'm being affected by https://issues.apache.org/jira/browse/CXF-1591 I guess I'll need to write my own handlers for this one. -Tom On Tue, Jan 27, 2009 at 11:18 AM, Tom Howe wrote: > Hi, I'm trying to work with ws-addressing, but I'm receiving warnings on > the server side. I have a service defined by the following (truncated) > wsdl: > > > > http://www.w3.org/2005/02/addressing/wsdl"/> > > > > My service is run in this way: > > EndpointImpl ep = (EndpointImpl) Endpoint.create(implementor); > ep.setWsdlLocation("src/main/resources/wsdl/hello_world.wsdl"); > ep.setServiceName(new QName("http://apache.org/hello_world_soap_http";, > "SOAPService")); > ep.setEndpointName(new QName("http://apache.org/hello_world_soap_http";, > "SoapOverHttp")); > ep.getFeatures().add(new WSAddressingFeature()); > ep.publish("http://localhost:9000/HelloWorld";); > > and my client is run in this manner: > > ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); > factory.setServiceClass(Greeter.class); > factory.setAddress(endpointAddress); > factory.getFeatures().add(new WSAddressingFeature()); > Greeter client = (Greeter) factory.create(); > System.out.println(client.greetMe("hello")); > > The soap message does contain the Addressing headers and the client > produces the following output: > > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > storeMAPs > INFO: associating MAPs with context property > javax.xml.ws.addressing.context.outbound > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > retrieveMAPs > INFO: retrieving MAPs from context property > javax.xml.ws.addressing.context.outbound > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > retrieveMAPs > INFO: current MAPs [MessageId: > urn:uuid:2a1b5f9f-4f85-44b1-ad27-8a5b402cfec1, Action: > http://apache.org/hello_world_soap_http/types/Greeter/greetMe, To: > http://localhost:9000/HelloWorld, ReplyTo: > http://www.w3.org/2005/08/addressing/anonymous, FaultTo: > http://www.w3.org/2005/08/addressing/anonymous] > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > retrieveMAPs > INFO: retrieving MAPs from context property > javax.xml.ws.addressing.context.outbound > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > retrieveMAPs > INFO: current MAPs [MessageId: > urn:uuid:2a1b5f9f-4f85-44b1-ad27-8a5b402cfec1, Action: > http://apache.org/hello_world_soap_http/types/Greeter/greetMe, To: > http://localhost:9000/HelloWorld, ReplyTo: > http://www.w3.org/2005/08/addressing/anonymous, FaultTo: > http://www.w3.org/2005/08/addressing/anonymous] > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec encode > INFO: Outbound WS-Addressing headers > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec > encodeAsExposed > INFO: MessageID : urn:uuid:2a1b5f9f-4f85-44b1-ad27-8a5b402cfec1 > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec > encodeAsExposed > INFO: To : http://localhost:9000/HelloWorld > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec > encodeAsExposed > INFO: ReplyTo : http://www.w3.org/2005/08/addressing/anonymous > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec > encodeAsExposed > INFO: FaultTo : http://www.w3.org/2005/08/addressing/anonymous > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec > encodeAsExposed > INFO: Action : > http://apache.org/hello_world_soap_http/types/Greeter/greetMe > Jan 27, 2009 10:33:14 AM org.apache.cxf.phase.PhaseInterceptorChain > doIntercept > > > This certainly implies that addressing is setup properly. > > However, the server produces the following output: > > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > retrieveMAPs > INFO: retrieving MAPs from context property > javax.xml.ws.addressing.context.inbound > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > retrieveMAPs > INFO: WS-Addressing - failed to retrieve Message Addressing Properties from > context > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec > unmarshalMAPs > INFO: Inbound WS-Addressing headers > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > retrieveMAPs > INFO: retrieving MAPs from context property > javax.xml.ws.addressing.context.inbound > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils > retrieveMAPs > WARNING: WS-Addressing - failed to retrieve Message Addressing Properties > from context > Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.MAPAggregator getMAPs > > > Which implies to me that server is not able to process the addressing > handlers. So, am I misinterpreting the output or have I done something > wrong? > > Thank you very much. > > Tom Howe >
Re: integrate with Hibernate+Spring+CXF
Hi Please find my source code here and let me know what is the wrong ,i think something has wrong here Employee.java package com.company.auth.bean; import java.io.Serializable; public class Employee implements Serializable { private static final long serialVersionUID = 1L; private Integer gid; private String lastname; private String firstname; private String privileges; public Employee() { } public Integer getGid() { return gid; } public void setGid(Integer gid) { this.gid = gid; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getPrivileges() { return privileges; } public void setPrivileges(String privileges) { this.privileges = privileges; } /*public boolean isUserInRole(String role) { if(privileges == null) { return false; } else { return privileges.contains(role); } } */ } - Employee.hbm.xml http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";> --- EmployeeDAO.java package com.company.auth.dao; import org.apache.cxf.service.invoker.SessionFactory; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.JdbcTemplate; //import org.springframework.orm.hibernate.HibernateTemplate; import org.springframework.orm.hibernate3.HibernateTemplate; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.orm.hibernate3.HibernateCallback; import org.hibernate.*; import org.hibernate.criterion.*; import com.company.auth.dao.HibernateFactory; import com.company.auth.bean.Employee; public class EmployeeDAO extends HibernateFactory{ public void updateUser(com.company.auth.bean.Employee obj) throws DataAccessException{ getHibernateTemplate().saveOrUpdate(obj); } public String updateEmployee(String firstname,String lastname,String privileges) { Employee employee = new Employee(); employee.setFirstname(firstname); employee.setLastname(lastname); employee.setPrivileges(privileges); System.out.println("Employe Table has been updated "+ employee); System.out.println("FirstName"+ employee.getFirstname()); System.out.println("LastName"+ employee.getLastname()); System.out.println("privileges"+ employee.getPrivileges()); //getHibernateTemplate().saveOrUpdate(employee);//save(employee); EmployeeDAO dao = new EmployeeDAO() ; dao.updateUser(employee); //return template.saveOrUpdate(employee); return employee.toString(); } } AuthService.java package com.company.auth.service; import javax.jws.WebService; import javax.jws.WebParam; import com.company.auth.bean.Employee; @WebService public interface AuthService { String updateEmployee(@WebParam(name="firstname") String firstname, @WebParam(name="lastname")String lastname, @WebParam(name="privileges")String privileges); } -- AuthServiceImpl.java package com.company.auth.service; import javax.jws.WebService; import com.company.auth.bean.Employee; import com.company.auth.dao.EmployeeDAO; @WebService(endpointInterface = "com.company.auth.service.AuthService", serviceName = "corporateAuthService") public class AuthServiceImpl implements AuthService { public String updateEmployee(String firstname, String lastname, String privileges) { // TODO Auto-generated method stub EmployeeDAO dao = new EmployeeDAO(); com.company.auth.bean.Employee obj = new com.company.auth.bean.Employee(); return dao.updateEmployee(firstname, lastname, privileges).toString(); //return dao.updateUser(obj); } } - cxf.xml http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:jaxws=" http://cxf.apache.org/jaxws"; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd "> /WEB-INF/jdbc.properties ${j
Re: How to use JAX-RS as facade for other services?
Hi Sergey, client-sider redirect is not the case, what I am thinking of is hiding other service *behind* JAX-RS being "URLs controller", so the latter is what I am looking for. Basic example is to call outside service from within JAX-RS handler method i.e.: client --> jax-rs --> extern service client <-- jax-rs <-- extern service cheers, andy. Sergey Beryozkin-4 wrote: > > Hi Andy, > > Any chance some of Response/ResponseBuilder methods can help you, like > seeOther() ? Or are you referring to JAX-RS client api such > that you can do some outbound invocations ? If it's the latter then I can > say we're evaluating a number of approaches, CXF 2.2 might > get some initial client api support > > Can you expand a bit on how you envisage the messages flow ... > > Cheers, Sergey > > > -- View this message in context: http://www.nabble.com/How-to-use-JAX-RS-as-facade-for-other-services--tp21697838p21712073.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Error when cxf2.1.3 is deployed on Tomcat v6 !!!
Does this help? http://www.nabble.com/Camel-CXF-Spring-Tomcat-configuration-td15350144s22882.html#a15350144 On Wed, Jan 28, 2009 at 5:42 AM, cmoulliard wrote: > > Willem, > > I have made a new build of Camel 2.0-SNAPSHOT this morning and retest again > with Tomcat v6. The first error mentioned reappears : > > Caused by: org.apache.cxf.BusException: No DestinationFactory was found for > the namespace http://schemas.xmlsoap.org/soap/http. >at > org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:115) >at > org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:86) >at org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:69) >at > org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:121) >... 54 more > > Here is the list of jars present in the lib folder : > > cxf-rt-databinding-jaxb-2.2-SNAPSHOT.jar > cxf-rt-frontend-jaxws-2.2-SNAPSHOT.jar > cxf-rt-frontend-simple-2.2-SNAPSHOT.jar > cxf-rt-management-2.2-SNAPSHOT.jar > cxf-rt-transports-http-2.2-SNAPSHOT.jar > cxf-rt-transports-local-2.2-SNAPSHOT.jar > cxf-rt-ws-addr-2.2-SNAPSHOT.jar > cxf-tools-common-2.2-SNAPSHOT.jar > FastInfoset-1.2.2.jar > geronimo-activation_1.1_spec-1.0.2.jar > geronimo-annotation_1.0_spec-1.1.1.jar > geronimo-javamail_1.4_spec-1.5.jar > geronimo-jaxws_2.1_spec-1.0.jar > geronimo-stax-api_1.0_spec-1.0.1.jar > geronimo-ws-metadata_2.0_spec-1.1.2.jar > jaxb-api-2.1.jar > jaxb-impl-2.1.6.jar > jaxb-xjc-2.1.9.jar > jdom-1.0.jar > log4j-1.2.14.jar > mail-1.4.jar > neethi-2.0.4.jar > oro-2.0.8.jar > saaj-api-1.3.jar > saaj-impl-1.3.2.jar > spring-aop-2.5.6.jar > spring-beans-2.5.6.jar > spring-context-2.5.6.jar > spring-context-support-2.5.6.jar > spring-core-2.5.6.jar > spring-tx-2.5.6.jar > spring-web-2.5.5.jar > stax-api-1.0-2.jar > velocity-1.6.1.jar > wsdl4j-1.6.2.jar > wstx-asl-3.2.6.jar > xml-resolver-1.2.jar > XmlSchema-1.4.3.jar > activation-1.1.jar > aopalliance-1.0.jar > asm-2.2.3.jar > camel-core-2.0-SNAPSHOT.jar > camel-cxf-2.0-SNAPSHOT.jar > camel-mail-2.0-SNAPSHOT.jar > camel-spring-2.0-SNAPSHOT.jar > camel-velocity-2.0-SNAPSHOT.jar > commons-collections-3.2.1.jar > commons-io-1.3.2.jar > commons-lang-2.4.jar > commons-logging-1.1.1.jar > commons-logging-api-1.1.jar > cxf-api-2.2-SNAPSHOT.jar > cxf-common-schemas-2.2-SNAPSHOT.jar > cxf-common-utilities-2.2-SNAPSHOT.jar > cxf-rt-bindings-soap-2.2-SNAPSHOT.jar > cxf-rt-bindings-xml-2.2-SNAPSHOT.jar > cxf-rt-core-2.2-SNAPSHOT.jar > > Charles > > > willem.jiang wrote: >> >> Hi, >> >> Did you run mvn clean install from the camel trunk (camel 2.0-SNAPSHOT) ? >> From the stack trace , I can tell the code is very old :( >> >> Willem >> >> On Tue, Jan 27, 2009 at 11:35 PM, cmoulliard wrote: >> >>> >>> If I add to my pom.xml, the following dependency, >>> >>> >>>org.apache.cxf >>> cxf-common-utilities >>>${cxf-version} >>>test >>> >>> >>> I can go one step further but a new error is there : >>> >>> >>> GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé >>> (context >>> initialized) à l'instance de classe d'écoute (listener) >>> org.springframework.web.context.ContextLoaderListener >>> java.lang.NullPointerException >>>at >>> org.apache.camel.component.cxf.CxfConsumer.(CxfConsumer.java:50) >>> at >>> >>> org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:78) >>>at >>> >>> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:62) >>>at org.apache.camel.Route.getServicesForRoute(Route.java:74) >>>at >>> >>> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:681) >>>at >>> >>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:652) >>>at >>> >>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:166) >>>at >>> >>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:161) >>> at >>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49) >>>at >>> >>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:96) >>>at >>> >>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115) >>>at >>> >>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78) >>>at >>> >>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) >>>at >>> >>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76) >>>at >>> >>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274) >>>at >>> >>> org.springframework.context.support.AbstractApplicat
How to use Asynchronous callback SOAP/HTTP when consumer in a webapp (running inside JEE container)
Hi, Per the JAXWS specs there is support for asynchronous consumption of services (SOAP over HTTP) using the ExecuteService class. How does this work when the consumer of the service is a webapp and running inside a JEE container - JBoss 4.2. Per JEE specs, applications are not supposed to manage/spawn threads. How does CXF create/control threads when consumer (client) is a webapp running in Jboss; does it register the ThreadPool with the container so that container has visibility of these threads? Thanks Sameer
Re: programmatically add jax.ws.Hander on the server side
Are you looking something like this? HelloWorldImpl helloworldImpl = new HelloWorldImpl(); JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean(); svrFactory.setServiceClass(HelloWorld.class); svrFactory.setAddress("http://localhost:9000/Hello";); svrFactory.setServiceBean(helloworldImpl); List handlers = new ArrayList(); handlers.add(new LoggingHandler()); svrFactory.addHandlers(handlers); svrFactory.create(); -Arul peppinolusuraio wrote: Hi Dan, I meant programmatically using Java Code, without relying upon Spring. There is a way? dkulp wrote: On Tuesday 27 January 2009 8:31:46 am peppinolusuraio wrote: hi, there is a way to add programmatically handlers on the server side programmatically withour relying upon @HandlerChain annotation??? Do you mean via spring config type thing or actually via some sort of java code?With 2.1.3, there is a element on jaxws:endpoint which would be a list of handlers to add.That's probably the easiest way to go. -- Daniel Kulp dk...@apache.org http://dankulp.com/blog
Per-request interceptors
Folks, I have a requirement to use a JAX-WS client proxy using custom interceptors which change from request to request. I'm currently doing this by using JaxWsProxyFactoryBean to create a new proxy client each time, and injecting the interceptor each time. However, this means going through the whole client creation process each time, which is inefficient and inelegant. The interaction between ClientFactoryBean and ClientProxyFactoryBean suggests that this is unavoidable - there seems to be no simple way to decorate the client proxy with interceptors that are private to the current thread. I could just store the interceptor in a ThreadLocal, and then retrieve it using a fixed, delegating interceptor, but again that seems a bit clunky. So, is it possible in the CXF API to have a single instance of a proxy client, which I can decorate with additional interceptors on a per-request basis? kenny
Re: JAX-WS CXF with Tibco JMS
Christian, I have tested my configuration with Tibco 4.3.0 and CXF 2.2-SNAPSHOT. Unfortunately problems persist. Although javax.jms.InvalidDestinationException is no longer thrown, the client times out. Inspecting the Tibco logs shows that the temporary queue is created successfully but "created receiver failed: invalid temporary queue" remains. For your information, my CXF configuration is as follows (please note that this has been manually typed over from a segregated network): Server: http://system.parameters/SystemParametersServiceImpl}SystemParametersServiceImplPort.jms-destination";> Client: http://system.parameters/SystemParametersServiceImpl}SystemParametersServicePort.jms-conduit";> Regards, Ed 2009/1/28 Christian Schneider : > Could you try to checkout the CXF head from subversion, compile it and try > it with your project. > I was not yet able to identify the source of the problem but for me it seems > solved on the head. > If it works for you too we can be quite sure that CXF 2.1.4 will include the > fix for this issue. > > If your have subversion and maven installed the following will work: > > svn co http://svn.apache.org/repos/asf/cxf/trunk > cd trunk > set MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=128M > mvn -Pfastinstall > > In your project you then include the just compiled version as: > 2.2-SNAPSHOT > > Greetings > > Christian > > > Ed Scriven schrieb: >> >> Hello Christian, >> >> Did you get a chance to check your own samples with Tibco EMS? >> >> Regards, >> >> Ed >> >> 2009/1/21 Christian Schneider >> >> >>> >>> Hi Ed, >>> >>> I will check my own sample with tibco ems. >>> >>> Greetings >>> >>> Christian >>> >>> Ed Scriven schrieb: >>> >>> Hello, >>> I am experiencing problems getting JAX-WS CXF with Tibco JMS to work. My configuration is derived from the http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.htmland http://cwiki.apache.org/CXF20DOC/jms-transport.html. I am using Spring. If I provide a jndiReplyDestinationName on the jms:conduit/jms:address element all works fine. Unfortunately when I remove this attribute and expect temporary queues instead Tibco throws a javax.jms.InvalidDestinationException: Invalid temporary destination exception. This exception is raised from the Spring DefaultMessageListenerContainer requesting Tibco libraries to create a consumer. Having inspected the Tibco logs the temporary queue is created successfully named $TMP$.EMS-SERVER.9A049772E795.2. The logs do state that "created receiver failed: invalid temporary queue". I have spent a good day trawling Google for anything related to this issue, but with no success. Apologies not stack traces nor code, they are on a segregated network with no Internet access. I can get them if required. Has anyone experience CXF with Tibco JMS? Has anyone experienced temporary queue problems before? Regards, Ed >>> >>> -- >>> >>> Christian Schneider >>> --- >>> http://www.liquid-reality.de >>> >>> >>> >> >> >> > > > -- > > Christian Schneider > --- > http://www.liquid-reality.de > > -- Batehawk Ltd registered in England and Wales. Registration number: 6142022 Registered Office: c/o Ascot Sinclair Associates, Avondale House, 262 Uxbridge Road, Hatch End, Middlesex, HA5 4HS.
RE: Try to modify the firts jaxws example
Hi Sean, Thanks for the reply, I was exactly trying to modify the example you said. However, if I modified anything, it would not work. I ended up with another "radical" solution: changed to another framework. I already created a simple web service and its working now. I think there's some default settings file related to that 'http://server.hw.demo/' thing (If you change it, the example does not work, even if you change the package structure), but I couldn't find it. However, I'm just too new in webservices. Thanks anyway. :-) Sean O'Callaghan wrote: > > Hi, > > The error indicates that the address that it is trying to connect to is > null. > What are you passing into svrFactory.setAddress()in your server? > > Perhaps you can take a look at the java_first_jaxws sample in the samples > directory of a CXF install and use this as the starting point for > modifying the code? > > > Regards, > > Seán. > -- View this message in context: http://www.nabble.com/Trying-to-modify-the-%22A-simple-JAX-WS-service%22-example-tp21691314p21707804.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: JAX-WS CXF with Tibco JMS
Dan, Christian, Thanks. I am looking into this right now. Ed 2009/1/28 Daniel Kulp : > > I deployed new snapshots last night: > http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apache-cxf/ > > Feel free to use them instead of building your own. > > Dan > > > On Wednesday 28 January 2009 2:22:22 am Christian Schneider wrote: >> Could you try to checkout the CXF head from subversion, compile it and >> try it with your project. >> I was not yet able to identify the source of the problem but for me it >> seems solved on the head. >> If it works for you too we can be quite sure that CXF 2.1.4 will include >> the fix for this issue. >> >> If your have subversion and maven installed the following will work: >> >> svn co http://svn.apache.org/repos/asf/cxf/trunk >> cd trunk >> set MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=128M >> mvn -Pfastinstall >> >> In your project you then include the just compiled version as: >> 2.2-SNAPSHOT >> >> Greetings >> >> Christian >> >> Ed Scriven schrieb: >> > Hello Christian, >> > >> > Did you get a chance to check your own samples with Tibco EMS? >> > >> > Regards, >> > >> > Ed >> > >> > 2009/1/21 Christian Schneider >> > >> >> Hi Ed, >> >> >> >> I will check my own sample with tibco ems. >> >> >> >> Greetings >> >> >> >> Christian >> >> >> >> Ed Scriven schrieb: >> >> >> >> Hello, >> >> >> >>> I am experiencing problems getting JAX-WS CXF with Tibco JMS to work. >> >>> My configuration is derived from the >> >>> http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.h >> >>>tmland http://cwiki.apache.org/CXF20DOC/jms-transport.html. I am using >> >>> Spring. >> >>> >> >>> If I provide a jndiReplyDestinationName on the jms:conduit/jms:address >> >>> element all works fine. Unfortunately when I remove this attribute and >> >>> expect temporary queues instead Tibco throws a >> >>> javax.jms.InvalidDestinationException: >> >>> Invalid temporary destination exception. This exception is raised from >> >>> the >> >>> Spring DefaultMessageListenerContainer requesting Tibco libraries to >> >>> create >> >>> a consumer. >> >>> >> >>> Having inspected the Tibco logs the temporary queue is created >> >>> successfully >> >>> named $TMP$.EMS-SERVER.9A049772E795.2. The logs do state that "created >> >>> receiver failed: invalid temporary queue". >> >>> >> >>> I have spent a good day trawling Google for anything related to this >> >>> issue, >> >>> but with no success. Apologies not stack traces nor code, they are on >> >>> a segregated network with no Internet access. I can get them if >> >>> required. >> >>> >> >>> Has anyone experience CXF with Tibco JMS? Has anyone experienced >> >>> temporary >> >>> queue problems before? >> >>> >> >>> Regards, >> >>> >> >>> Ed >> >> >> >> -- >> >> >> >> Christian Schneider >> >> --- >> >> http://www.liquid-reality.de > > > > -- > Daniel Kulp > dk...@apache.org > http://dankulp.com/blog > -- Batehawk Ltd registered in England and Wales. Registration number: 6142022 Registered Office: c/o Ascot Sinclair Associates, Avondale House, 262 Uxbridge Road, Hatch End, Middlesex, HA5 4HS.
Re: JAX-WS CXF with Tibco JMS
I deployed new snapshots last night: http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apache-cxf/ Feel free to use them instead of building your own. Dan On Wednesday 28 January 2009 2:22:22 am Christian Schneider wrote: > Could you try to checkout the CXF head from subversion, compile it and > try it with your project. > I was not yet able to identify the source of the problem but for me it > seems solved on the head. > If it works for you too we can be quite sure that CXF 2.1.4 will include > the fix for this issue. > > If your have subversion and maven installed the following will work: > > svn co http://svn.apache.org/repos/asf/cxf/trunk > cd trunk > set MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=128M > mvn -Pfastinstall > > In your project you then include the just compiled version as: > 2.2-SNAPSHOT > > Greetings > > Christian > > Ed Scriven schrieb: > > Hello Christian, > > > > Did you get a chance to check your own samples with Tibco EMS? > > > > Regards, > > > > Ed > > > > 2009/1/21 Christian Schneider > > > >> Hi Ed, > >> > >> I will check my own sample with tibco ems. > >> > >> Greetings > >> > >> Christian > >> > >> Ed Scriven schrieb: > >> > >> Hello, > >> > >>> I am experiencing problems getting JAX-WS CXF with Tibco JMS to work. > >>> My configuration is derived from the > >>> http://cwiki.apache.org/CXF20DOC/jax-ws-java-first-with-jms-transport.h > >>>tmland http://cwiki.apache.org/CXF20DOC/jms-transport.html. I am using > >>> Spring. > >>> > >>> If I provide a jndiReplyDestinationName on the jms:conduit/jms:address > >>> element all works fine. Unfortunately when I remove this attribute and > >>> expect temporary queues instead Tibco throws a > >>> javax.jms.InvalidDestinationException: > >>> Invalid temporary destination exception. This exception is raised from > >>> the > >>> Spring DefaultMessageListenerContainer requesting Tibco libraries to > >>> create > >>> a consumer. > >>> > >>> Having inspected the Tibco logs the temporary queue is created > >>> successfully > >>> named $TMP$.EMS-SERVER.9A049772E795.2. The logs do state that "created > >>> receiver failed: invalid temporary queue". > >>> > >>> I have spent a good day trawling Google for anything related to this > >>> issue, > >>> but with no success. Apologies not stack traces nor code, they are on > >>> a segregated network with no Internet access. I can get them if > >>> required. > >>> > >>> Has anyone experience CXF with Tibco JMS? Has anyone experienced > >>> temporary > >>> queue problems before? > >>> > >>> Regards, > >>> > >>> Ed > >> > >> -- > >> > >> Christian Schneider > >> --- > >> http://www.liquid-reality.de -- Daniel Kulp dk...@apache.org http://dankulp.com/blog
Re: How to use JAX-RS as facade for other services?
Hi Andy, Any chance some of Response/ResponseBuilder methods can help you, like seeOther() ? Or are you referring to JAX-RS client api such that you can do some outbound invocations ? If it's the latter then I can say we're evaluating a number of approaches, CXF 2.2 might get some initial client api support Can you expand a bit on how you envisage the messages flow ... Cheers, Sergey I am looking for best way to use JAX-RS not only to expose some owned functionality in REST-style but also as a facade (wrapper / proxy) for other HTTP/REST services... emulation of 'mod_rewrite' to make uniform URLs for legacy 'sealed' services... for simplicity let's assume they obey REST rules i.e. w/o content or protocol transformation... any ideas? cheers, andy. -- View this message in context: http://www.nabble.com/How-to-use-JAX-RS-as-facade-for-other-services--tp21697838p21697838.html Sent from the cxf-user mailing list archive at Nabble.com.
RE: Try to modify the firts jaxws example
Hi, The error indicates that the address that it is trying to connect to is null. What are you passing into svrFactory.setAddress()in your server? Perhaps you can take a look at the java_first_jaxws sample in the samples directory of a CXF install and use this as the starting point for modifying the code? Regards, Seán. -Original Message- From: Roderick Lina [mailto:rodlm...@gmail.com] Sent: 27 January 2009 18:26 To: users@cxf.apache.org Subject: Try to modify the firts jaxws example I'm very new to Web Services and I think I'm just missing something. I tought it would be a simple question to answer but after a lot of search, I decided to post here. I read the example that comes with CXF (http://cwiki.apache.org/CXF20DOC/a-simple-jax-ws-service.html) and tested in MyEclipse and it worked correctly. No problems at all. Then I tried to make a test service based on that example but I always get "Could not send Message"/"Invalid address. Endpoint address cannot be null.". I found some post where some said it should be the server that's not running or the service that's not published, but when I try "http://localhost:9000/helloWorld?wsdl"; the WSDL is shown. The client, however, can't connect to it. I thought that it should be related to some config file that's missing, but the example runs without it, So, it doesn't make sense. I also checked that if I change the SERVICE_NAME or PORT_NAME (on Client.java) to anything different of "http://server.hw.demo/"; it will not work, but if a copy the demo files to a completely different place/package but let the SERVICE and PORT name the same it will work. So, I don't get it. What am I missing? Thanks in advance. -- View this message in context: http://www.nabble.com/Try-to-modify-the-firts-jaxws-example-tp21691314p21691314.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Error when cxf2.1.3 is deployed on Tomcat v6 !!!
Willem, I have made a new build of Camel 2.0-SNAPSHOT this morning and retest again with Tomcat v6. The first error mentioned reappears : Caused by: org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://schemas.xmlsoap.org/soap/http. at org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:115) at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:86) at org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:69) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:121) ... 54 more Here is the list of jars present in the lib folder : cxf-rt-databinding-jaxb-2.2-SNAPSHOT.jar cxf-rt-frontend-jaxws-2.2-SNAPSHOT.jar cxf-rt-frontend-simple-2.2-SNAPSHOT.jar cxf-rt-management-2.2-SNAPSHOT.jar cxf-rt-transports-http-2.2-SNAPSHOT.jar cxf-rt-transports-local-2.2-SNAPSHOT.jar cxf-rt-ws-addr-2.2-SNAPSHOT.jar cxf-tools-common-2.2-SNAPSHOT.jar FastInfoset-1.2.2.jar geronimo-activation_1.1_spec-1.0.2.jar geronimo-annotation_1.0_spec-1.1.1.jar geronimo-javamail_1.4_spec-1.5.jar geronimo-jaxws_2.1_spec-1.0.jar geronimo-stax-api_1.0_spec-1.0.1.jar geronimo-ws-metadata_2.0_spec-1.1.2.jar jaxb-api-2.1.jar jaxb-impl-2.1.6.jar jaxb-xjc-2.1.9.jar jdom-1.0.jar log4j-1.2.14.jar mail-1.4.jar neethi-2.0.4.jar oro-2.0.8.jar saaj-api-1.3.jar saaj-impl-1.3.2.jar spring-aop-2.5.6.jar spring-beans-2.5.6.jar spring-context-2.5.6.jar spring-context-support-2.5.6.jar spring-core-2.5.6.jar spring-tx-2.5.6.jar spring-web-2.5.5.jar stax-api-1.0-2.jar velocity-1.6.1.jar wsdl4j-1.6.2.jar wstx-asl-3.2.6.jar xml-resolver-1.2.jar XmlSchema-1.4.3.jar activation-1.1.jar aopalliance-1.0.jar asm-2.2.3.jar camel-core-2.0-SNAPSHOT.jar camel-cxf-2.0-SNAPSHOT.jar camel-mail-2.0-SNAPSHOT.jar camel-spring-2.0-SNAPSHOT.jar camel-velocity-2.0-SNAPSHOT.jar commons-collections-3.2.1.jar commons-io-1.3.2.jar commons-lang-2.4.jar commons-logging-1.1.1.jar commons-logging-api-1.1.jar cxf-api-2.2-SNAPSHOT.jar cxf-common-schemas-2.2-SNAPSHOT.jar cxf-common-utilities-2.2-SNAPSHOT.jar cxf-rt-bindings-soap-2.2-SNAPSHOT.jar cxf-rt-bindings-xml-2.2-SNAPSHOT.jar cxf-rt-core-2.2-SNAPSHOT.jar Charles willem.jiang wrote: > > Hi, > > Did you run mvn clean install from the camel trunk (camel 2.0-SNAPSHOT) ? > From the stack trace , I can tell the code is very old :( > > Willem > > On Tue, Jan 27, 2009 at 11:35 PM, cmoulliard wrote: > >> >> If I add to my pom.xml, the following dependency, >> >> >>org.apache.cxf >> cxf-common-utilities >>${cxf-version} >>test >> >> >> I can go one step further but a new error is there : >> >> >> GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé >> (context >> initialized) à l'instance de classe d'écoute (listener) >> org.springframework.web.context.ContextLoaderListener >> java.lang.NullPointerException >>at >> org.apache.camel.component.cxf.CxfConsumer.(CxfConsumer.java:50) >> at >> >> org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:78) >>at >> >> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:62) >>at org.apache.camel.Route.getServicesForRoute(Route.java:74) >>at >> >> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContext.java:681) >>at >> >> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:652) >>at >> >> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:166) >>at >> >> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:161) >> at >> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49) >>at >> >> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:96) >>at >> >> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:115) >>at >> >> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78) >>at >> >> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) >>at >> >> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76) >>at >> >> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274) >>at >> >> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736) >>at >> >> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383) >>at >> >> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) >>at >> >> org.springframework.web.context.ContextLoader.init
Re: Improving user error messages for failed webservice connection?
2008/12/11 Daniel Kulp > I THINK with CXF 2.0.9/2.1.3 (might be the latest SNAPSHOTS, don't remember > exactly when I fixed this), when you catch the WebServiceException from the > call, the "cause" will be the real cause (like the IOException) that could > be > examined for more information. > > Yes it does, but the only way to differentiate between a 403 (eg invalid authorization), invalid URL, etc is to PARSE the message for the IO exception, not exactly elegant... ;-) (but I do that now) Would be a reasonable future change to send some more specific exceptions? For instance including the HTTP error as a separate field etc? or even create some more specific exceptions for the most interesting ones?
Re: programmatically add jax.ws.Hander on the server side
Hi Dan, I meant programmatically using Java Code, without relying upon Spring. There is a way? dkulp wrote: > > On Tuesday 27 January 2009 8:31:46 am peppinolusuraio wrote: >> hi, >> >> there is a way to add programmatically handlers on the server side >> programmatically withour relying upon @HandlerChain annotation??? > > Do you mean via spring config type thing or actually via some sort of java > code?With 2.1.3, there is a element on jaxws:endpoint which > would be a list of handlers to add.That's probably the easiest way to > go. > > > -- > Daniel Kulp > dk...@apache.org > http://dankulp.com/blog > > -- View this message in context: http://www.nabble.com/programmatically-add-jax.ws.Hander-on-the-server-side-tp21685348p21702156.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: integrate with Hibernate+Spring+CXF
Hello Bhanu, Your problem may be related to a conflict on the "asm" dependency. Indeed, CXF uses a newer "cglib" version than hibernate, that itself uses a newer "asm", so that it sometimes cause issues when integrating them together (Exception such as NoSuchMethodError) The workaround I use is to replace the old cglib (and its dependency) by the cglib-nodep.jar in your classpath, that is OK for Hibernate and does not require an old "asm". If you use Maven, this sample should help you to understand how to resolve such conflict: org.ow2.bonita bonita-server 4.0.1 test cglib cglib cglib cglib-nodep 2.1_3 Hope that helps... Regards, Mickael Bhanu B a écrit : Hi Mert, I appreciate your response, here i am getting an error while running my application ,i think it desn't put data into DB table some hibernate problem, my requirement is 1-> get data from WebService through SOAP GUI 2-> updated data in to the DB Table with all integration Hibernate+Spring+CXF i couldn't get much information about your 'mesir' application. if any more information is really great help to me. Thanks, B On Tue, Jan 27, 2009 at 2:27 PM, Mert Çalışkan wrote: check out mesir.. I did some work with that stack. http://code.google.com/p/mesir Cheers, Mert On Tue, Jan 27, 2009 at 10:15 PM, Bhanu B wrote: Hi Any one could tell me how to integrate Hibernate+Spring+CXF to developing webservices please help me ?!! Regards, Bhanu