Re: how to configure HTTPConduit for client using java code
Hi , I think the default Data Binding in the ServiceFactory is JaxbDatabinding. That's why you need to do when you want to use AegisDatabinding. Willem. yulinxp wrote: Why/when is it needed to set AegisDatabinding for client at all ? ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); factory.setServiceClass(HelloWorld.class); factory.setAddress(""); factory.getServiceFactory().setDataBinding(new AegisDatabinding()); HelloWorld hw = (HelloWorld)factory.create();
Problem with xsi:type="xsd:dateTime" in request to a JAXWS using Date parameter.
Hi, can anybody point me out how to solve this issue... https://issues.apache.org/jira/browse/CXF-369 as maomaode writes the solution is to use but I don't understand where to put this in CXF configuration xml I'm using something like this. and in a call to an operation defined in this service the problem arise... "xsd:dateTime becomes XMLGregorianCalendarImpl when Date needed" If anybody can point me to some documentation I will be more than enough, I hope I already check this: http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html ... but still don't get it. -- David Castañeda R.
Re: how to configure HTTPConduit for client using java code
Why/when is it needed to set AegisDatabinding for client at all ? ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); factory.setServiceClass(HelloWorld.class); factory.setAddress(""); factory.getServiceFactory().setDataBinding(new AegisDatabinding()); HelloWorld hw = (HelloWorld)factory.create(); -- View this message in context: http://www.nabble.com/how-to-configure-HTTPConduit-for-client-using-java-code-tp15460135p15489744.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Unable to locate Spring NamespaceHandler.
That completely looks correct. I assume the appropriate cxf-rt-frontend-jaxws jar is on the classpath, right? Dan On Tuesday 12 February 2008, ramanand bulusu wrote: > Hi , > > I am getting the following exception while deploying the > apllication. i dint understand the root cause for this one. please see > the exception below. > > [2008-02-13 01:09:48,573] ERROR > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mboxse >rvice] > > Exception sending context initialized event to listener instance of > class com.vms.mboxservice.listener.ContextListener > org.springframework.beans.factory.parsing.BeanDefinitionParsingExcepti >on: Configuration problem: Unable to locate Spring > NamespaceHandler for XML schema namespace > [http://cxf.apache.org/jaxws] Offending resource: class path resource > [app-context.xml] > at > org.springframework.beans.factory.parsing.FailFastProblemReporter.erro >r( FailFastProblemReporter.java:68) > > I thought that , it was coming due to the inappropriate > cxf-rt-frontend-jaxws jar file, and i tried > with the 2.0.2 -2.0.3 versions, but there is no use.please give me ur > ideas on this. > > i configured my spring file like following manner. > > http://www.springframework.org/schema/beans"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xmlns:jaxws="http://cxf.apache.org/jaxws"; > > xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"; > xsi:schemaLocation="http://www.springframework.org/schema/beans > > http://www.springframework.org/schema/beans/spring-beans.xsd > http://cxf.apache.org/jaxws > http://cxf.apache.org/schemas/jaxws.xsd";> > > /> > > > Thanks, -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Returning List via SOAP
Any chance you can try with 2.0.4? It sounds like for some reason, the ReviewData is not getting passed into the JAXB context. Not sure why that is.. Actually, what compiler flags are you using? With -o, I'm not sure if the generics is compiled in. I would assume so, but maybe not. Dan On Tuesday 12 February 2008, Tom Davies wrote: > I'm using CXF 2.0.3. > > I have an interface with a method like: > > List getAllReviews(@WebParam(name="token") String > token); > > The WSDL created for this method is: > > > > > > > > type="tns:getAllReviewsResponse"/> > > > type="xs:anyType"/> > > > > and so the generated SOAP client returns List > > Is there any way to get a return type of List (the > ReviewData class generated by wsdl2java that is, not the original > ReviewData in the remote interface) > > Thanks, >Tom > > -- > ATLASSIAN - http://www.atlassian.com > Our products help over 8,500 customers in more than 95 countries to > collaborate -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Creating a custom bindings
On Wednesday 13 February 2008, Shaw, Richard A wrote: > Does anybody have any tips (where to start) on how to create a custom > binding ? Wow. That's a big undertaking, but very cool to see. :-) Basically, for bindings, you need to create XmlStreamReader/XmlStreamWriter objects that will produce/consume the appropriate Xml events, but based on your binding instead of XML. That's usually the hardest part.Your binding would mostly just be a those readers/writers and an interceptor that would take the Input/OutputStreams from the message and wrapper them with the XmlStreamReader/Writers. Then let the rest of the CXF interceptors do the remaining work. The easiest way to see how that would work is to use JAXB or something to generate code from the schema and then pass a "debug" version of XmlStreamWriter into JAXB to see what events it would generate. You would just need to handle the same events. > I created a custom binding for the old Celtix to handle simple arrays > of data in CSV format, this was used to load data from CSV files as if > I had requested the data from a web service. It was very useful > because I could change my data source to a web service instead of a > CSV file without having to change my consumer code (just the WSDL > File). > > The thing that I find most confusing is the different ways in which > the bindings can be configured, wsdl, beans, etc. > > I'll try to create a step by step record of what I do when I start. > > I also want to create an FTP transport which I created for the old > Celtix before. I am assuming that most of the concepts for the binding > will be similar for the transport. Transports are, for the most part, much easier. If you don't need to deal with WS-RM/WS-A decoupled responses, it's pretty simple. Just get the streams, create a Message, and call on the listener. Dan > If anybody is interested I have a requirement document which details > how I use the WSDL file to define the mapping between a simple XML > array of records and the rows of a CSV file (complete with header > row). > > Richard Shaw > > ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤ > > Richard Shaw > Technical Design Authority - Information Solutions Consultancy > Intelligent Transport Systems > > Atkins Highways and Transportation > Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW > > Tel: +44 (0) 1372 756407 > Fax: +44 (0) 1372 740055 > Mob: 07740 817586 > E-mail: [EMAIL PROTECTED] > > www.atkinsglobal.com/its > > > > This email and any attached files are confidential and copyright > protected. If you are not the addressee, any dissemination of this > communication is strictly prohibited. Unless otherwise expressly > agreed in writing, nothing stated in this communication shall be > legally binding. > > The ultimate parent company of the Atkins Group is WS Atkins plc. > Registered in England No. 1885586. Registered Office Woodcote Grove, > Ashley Road, Epsom, Surrey KT18 5BW. A list of wholly owned Atkins > Group companies registered in the United Kingdom can be found at > http://www.atkinsglobal.com/terms_and_conditions/index.aspx > > Consider the environment. Please don't print this e-mail unless you > really need to. -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: how to configure HTTPConduit for client using java code
On Wednesday 13 February 2008, yulinxp wrote: > User's guide shows how to configure HTTPConduit for client using java > code > > http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-s >upport.html > > import org.apache.cxf.endpoint.Client; > import org.apache.cxf.frontend.ClientProxy; > import org.apache.cxf.transport.http.HTTPConduit; > import > org.apache.cxf.transports.http.configuration.HTTPClientPolicy; ... > > Client client = ClientProxy.getClient(poltim); > HTTPConduit http = (HTTPConduit) client.getConduit(); > > Here the example uses org.apache.cxf.frontend.ClientProxy. > > 1) Do JAX-WS FrontEnd & Simple FrontEnd have anything to do with > client? Nope. Shouldn't make any difference. The ClientProxy class is actually in the simple frontend. > 2) how to configure HTTPConduit for client if client needs to > set AegisDatabinding using ClientProxyFactoryBean? > (Or how to set HTTPConduit & AegisDatabinding for client at the same > time?) Same was as with jax-ws I would guess. > > ClientProxyFactoryBean factory = new ClientProxyFactoryBean(); > factory.setServiceClass(HelloWorld.class); > > factory.setAddress("http://localhost:9090/spring_http/ServerEndPoint";) >; factory.getServiceFactory().setDataBinding(new AegisDatabinding()); > HelloWorld hw = (HelloWorld)factory.create(); > > .< how to set > HTTPConduit ??? Client client = ClientProxy.getClient(hw); HTTPConduit http = (HTTPConduit) client.getConduit(); > String response = hw.sayHi("hello"); > System.out.println("Response: " + response); -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Deploy my service implementation separately from my security configuration?
Did you check all the information about websphere at: http://cwiki.apache.org/CXF20DOC/appserverguide.html Honestly, I don't know what would cause that either. You might want to try a wireshark dump or message log or something to see how different the SOAP message coming back from the server is as compared to JBoss. That might give a clue. Dan On Wednesday 13 February 2008, [EMAIL PROTECTED] wrote: > Dan, > > I actually got your suggestion working under JBoss 4.0.4GA but am > having issues with running under Websphere. > > I am using the SAAJ api's to send the request to the real server and > then the generic service takes care of wrapping the security onto the > response. > > The service interface keeps it really generic by changing the > SOAPMessage to a string/base64 as needed. > This way any service method can be passed without need to change the > generic service. > > @WebService(name="SAAJGatewayService", > targetNamespace="http://services.my.namespace";) > public interface SAAJGatewayService { > > String sendMessage ( > @WebParam(name = "message") > String message); > > } > > The real service works under Websphere since its not using any of the > security. > The problem I'm having with the generic service seems to have > something to do with the SAAJ api's conflicting with the servers > j2ee.jar (SOAPMessage, SOAPBody, and SOAPPart classes). > I tried having the jars for the SAAJ put on the Websphere server, but > now it looks like I am having problems mixing com.sun with com.ibm > xerces parsers. > > Without the saaj api on the server, I actually had the response coming > back to the generic server, but the SoapOutInterceptor is blowing up > on: > > ExtendedMessage: Interceptor has thrown exception, unwinding > noworg.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was > made to insert a node where it is not permitted. > .at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown > Source) .at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source) > .at com.ibm > .ws.webservices.engine.xmlsoap.SOAPPart.appendChild(SOAPPart.java:244) > .at > org.apache.cxf.staxutils.W3CDOMStreamWriter.newChild(W3CDOMStreamWrite >r.java:82) .at > org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMSt >reamWriter.java:99) .at > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEn >velopeStart(SoapOutInterceptor.java:95) .at > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessa >ge(SoapOutInterceptor.java:76) .at > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessa >ge(SoapOutInterceptor.java:57) .at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto >rChain.java:208) .at > org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Outg >oingChainInterceptor.java:74) .at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto >rChain.java:208) .at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia >tionObserver.java:77) .at > org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletD >estination.java:79) .at > org.apache.cxf.transport.servlet.ServletController.invokeDestination(S >ervletController.java:264) .at > org.apache.cxf.transport.servlet.ServletController.invoke(ServletContr >oller.java:160) .at > org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXF >Servlet.java:170) .at > org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXF >Servlet.java:148) etc > > I am stuck at this point wondering what is happening to the SOAP > object that could be causing this HIERARCHY_REQUEST_ERR. > > > > > Daniel Kulp <[EMAIL PROTECTED]> > 02/05/2008 02:50 PM > > To > cxf-user@incubator.apache.org > cc > [EMAIL PROTECTED] > Subject > Re: Deploy my service implementation separately from my security > configuration? > > > > > > > > > You MAY be able to do this by writing a completely generic > Provider based service that just forwards onto another > service. The security information would be set on that and the > spring could configure in a URL to the service it then sends the SOAP > messages onto. It would then use the dispatch APIs (or even the > straight SAAJ apis I think would work if you are talking straight > HTTP) to forward the SAAJ message onto the real server, get the SAAJ > back, and return it where the security would do it's thing. > > Dan > > On Monday 04 February 2008, [EMAIL PROTECTED] wrote: > > Hello, > > > > I am working with CXF 2.0.4 with javaFirst/Spring/CXF Servlet. > > I have the jaxws setup using Timestamp, Signature, and Encypt. > > I have some customized interceptors and a handler. > > > > This is all included in one war file (just like the demos) that I > > deploy to JBoss (and eventually Websphere). > > > > I was wondering if its possible to: > > - separate out my service implementation as one war file and my > > security configuration as another war file > > o
Re: put a variable in an handler and access it from the MessageContext
You need to set a scope for the property. In a handler, properties default to "Handler" scope and thus are only available to handlers. You need to call: lmc.setScope(Constants.MY_CONSTANT, MessageContext.Scope.APPLICATION); to make it Application scoped. Dan On Thursday 14 February 2008, Davide Gesino wrote: > How can I put a variable in an handler and access it from the > MessageContext once I have reached the endpoint? > I have injected the WebServiceContext in my endpoint (with the > @resource annotation). > I have put an object in my handler in a SoapMessageContext as a key > pair value: > > public boolean handleMessage(LogicalMessageContext lmc) { > > lmc.put(Constants.MY_CONSTANT, new Date()); > > return true; > } > > and I expected the variable > > would have been accessed as: > > context.getMessageContext().get(Constants.MY_CONSTANT); > > Anyway what i get is null. Where is my fault?? -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Issue with WSDL or CXF
The answer to your question: 'Do you litterally mean "I ran wsdl2java, compiled it, than ran the client"? If so, that's probably the issue.' Is Yes A... I did just simply run the client without populating any data. If this is what the issue is I will feel like a fool. Let me try regenerating with some default data. Again Daniel thanks for the prompt response!!! -Kyle
Re: soap fault question
Ready to go!... https://issues.apache.org/jira/browse/CXF-1434 hope this help, any further help I can provide don't hesitate in asking. -- David Castañeda R.
Re: Issue with WSDL or CXF
On Thursday 14 February 2008, Kyle.Bober wrote: > Okay so I setup the CXF logging interceptor and this is what I now > see... > It seems that the soap:body is empty!!! Why is this happening??? > Knowing me I am making a stupid mistake on my WSDL somewhere. > Although, I used one of the simple examples as my template and just > changed some of the XSD and WSDL tags to fit my situation. Notice > anything out of the ordinary? Or maybe I am not setting up a > configuration parameter somewhere. Again, I am just running the test > client class that CXF generates for me... > > -Kyle > > Next step Wireshark setup... Wireshark will show the same thing. Don't worry about it since the logs worked well. When you say: > Again, I am just running the test > client class that CXF generates for me... Do you litterally mean "I ran wsdl2java, compiled it, than ran the client"? If so, that's probably the issue. The client is pretty much just a stub. You probably need to go in and actually create the data that would be passed in. Without doing that, it's probably sending a null object to a bare method which probably doesn't work and would create that error. If that IS the case, you COULD try running wsdl2java with the -defaultValues switch. The client that is then generated (server as well) does throw some random data in there. The random data may not match the schema exactly, but it may work if validation is off. -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Issue with WSDL or CXF
Okay so I setup the CXF logging interceptor and this is what I now see... Feb 14, 2008 9:48:24 AM org.apache.cxf.interceptor.LoggingInInterceptor logging INFO: Inbound Message Encoding: UTF-8 Headers: {cache-control=[no-cache], content-type=[text/xml; charset=UTF-8], connection=[keep-alive], host=[localhost:8080], soapaction=[""], transfer-encoding=[chunked], accept=[*], user-agent=[Java/1.6.0_04], pragma=[no-cache]} Messages: Message: Payload: http://schemas.xmlsoap.org/soap/envelope/";> -- Feb 14, 2008 9:48:25 AM org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now java.lang.NullPointerException at org.apache.cxf.frontend.SimpleMethodDispatcher.getMethod(SimpleMethodDispatcher.java:96) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:57) 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:208) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77) at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:264) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170) at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148) 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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Feb 14, 2008 9:48:25 AM org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose INFO: Outbound Message --- Encoding: UTF-8 Headers: {} Messages: Payload: http://schemas.xmlsoap.org/soap/envelope/";>soap:ServerFault occurred while processing. -- It seems that the soap:body is empty!!! Why is this happening??? Knowing me I am making a stupid mistake on my WSDL somewhere. Although, I used one of the simple examples as my template and just changed some of the XSD and WSDL tags to fit my situation. Notice anything out of the ordinary? Or maybe I am not setting up a configuration parameter somewhere. Again, I am just running the test client class that CXF generates for me... -Kyle Next step Wireshark setup... -- View this message in context: http://www.nabble.com/Issue-with-WSDL-or-CXF-tp15469111p15480901.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Issue with WSDL or CXF
Daniel, I noticed I am receiving this exceprtion on the server side. I am running Tomcat 6.0.14. Feb 14, 2008 9:35:32 AM org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now java.lang.NullPointerException at org.apache.cxf.frontend.SimpleMethodDispatcher.getMethod(SimpleMethodDispatcher.java:96) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:57) 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:208) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77) at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:264) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170) at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148) 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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) I am now in the process of setting up logging with CXF and Wireshark. Not sure if the above exception explains anything that may stand out an be obvious. -Kyle -- View this message in context: http://www.nabble.com/Issue-with-WSDL-or-CXF-tp15469111p15480789.html Sent from the cxf-user mailing list archive at Nabble.com.
put a variable in an handler and access it from the MessageContext
How can I put a variable in an handler and access it from the MessageContext once I have reached the endpoint? I have injected the WebServiceContext in my endpoint (with the @resource annotation). I have put an object in my handler in a SoapMessageContext as a key pair value: public boolean handleMessage(LogicalMessageContext lmc) { lmc.put(Constants.MY_CONSTANT, new Date()); return true; } and I expected the variable would have been accessed as: context.getMessageContext().get(Constants.MY_CONSTANT); Anyway what i get is null. Where is my fault?? -- View this message in context: http://www.nabble.com/put-a-variable-in-an-handler-and-access-it-from-the-MessageContext-tp15480680p15480680.html Sent from the cxf-user mailing list archive at Nabble.com.
Arrays as result and casting issue
Hi I got an issue with casting arrays returned when calling my SOAP service. Interface: public Address[] lookupAddress(...); Implementation: public Address[] lookupAddress(...) { ... some stuff happening ... UKAddress address = new UKAddress[10]; ... 10 UKAddress objects added to address array ... return address; } Model: public class BaseModel{} public class Address{} extends BaseModel public class UKAddress extends Address{} Spring setup: class="com.surgex.addresslookup.service.impl.AddressLookupServiceImpl" i nit-method="init"> address="/AddressLookup"> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"> class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/> class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration"/> class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/> true com.surgex.addresslookup.model.BaseModelvalue> com.surgex.addresslookup.model.Address com.surgex.addresslookup.model.UKAddressvalue> Note: the client side also has the setup as per the server above. WSDL: name="UKAddress" nillable="true" type="tns:UKAddress"/> name="Address" nillable="true" type="tns:Address"/> nillable="true" type="xsd:string"/> name="matchingAttributes" type="xsd:int"/> nillable="true" type="xsd:string"/> name="dbleDependentLocality" nillable="true" type="xsd:string"/> nillable="true" type="xsd:string"/> name="dependentLocality" nillable="true" type="xsd:string"/> name="dependentThoroughfare" nillable="true" type="xsd:string"/> name="matchingAttributes" type="xsd:int"/> nillable="true" type="xsd:string"/> nillable="true" type="xsd:string"/> nillable="true" type="xsd:string"/> nillable="true" type="xsd:string"/> nillable="true" type="xsd:string"/> nillable="true" type="xsd:string"/> The issue is that when using SOAP to access this service (Note that this service is also exposed through RMI, JMX, HttpInvoker, Hessian and Burlap and they're all fine) I cannot cast the Address[] to a UKAddress[] eventhough all elements in the Address[] are UKAddress objects. I get a ClassCastException. I have the same bunch of tests which are executed using RMI, JMX, HttpInvoker, Burlap and Hessian and they have no issue with the cast. Address[] addresses = service.lookupAddress(...); UKAddress[] addr = (UKAddress[])addresses-> ClassCastException; Code below runs ok. Address[] addresses = service.lookupAddress(...); assertTrue(addresses instanceof Address[]); System.out.println(addresses.length); for (int i=0; ihttp://pgpkeys.mit.edu/ 1024D/BA6700ED 49A6 8E8E 4230 8D41 1ADE B649 3203 1DD2 BA67 00ED
RE: CXF client SSL configure question
Thats correct, the client side CXF SSL setup is independent of the specific servlet containers own SSL setup (which varies across containers). Cheers, Donal -Original Message- From: yulinxp [mailto:[EMAIL PROTECTED] Sent: 13 February 2008 21:06 To: cxf-user@incubator.apache.org Subject: Re: CXF client SSL configure question To answer my own question, I still need to set HTTPConduit for Client running in Tomcat. The SSL configuration for tomcat is for server application only?? yulinxp wrote: > > CXF server is running in JBoss. JBoss has enable SSL on it. > CXF client is another web application running in Tomcat in a different > machine. Tomcat also has enable SSL on it. > > So when client connecting to Server via HTTPS, how do I setup SSL for CXF > client? > My understanding is that, if JBoss and Tomcat's keystoreFile and > truststoreFile are setup correctly(they include each other to > truststoreFile), > then I don't need to configure SSL for CXF client. > Am I right? > -- View this message in context: http://www.nabble.com/CXF-client-SSL-configure-question-tp15146286p15467 922.html Sent from the cxf-user mailing list archive at Nabble.com. IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
Re: Client side plain SOAP invocation
Thanks for the tips. This seems to be what I am looking for. Regards -- View this message in context: http://www.nabble.com/Client-side-plain-SOAP-invocation-tp15457618p15476264.html Sent from the cxf-user mailing list archive at Nabble.com.