Re: interceptors and faults
Florian Rosenberg wrote: [...] public static void main(String[] args) { ClientProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setAddress(http://localhost:1/ErrorService;); factory.setServiceClass(ErrorService.class); ErrorService ess = (ErrorService)factory.create(); Client c = ClientProxy.getClient(ess); ListInterceptor infault = c.getInFaultInterceptors(); infault.add(new SimpleInterceptor(Phase.RECEIVE)); infault.add(new SimpleInterceptor(Phase.PRE_STREAM)); infault.add(new SimpleInterceptor(Phase.PRE_PROTOCOL)); infault.add(new SimpleInterceptor(Phase.UNMARSHAL)); infault.add(new SimpleInterceptor(Phase.PRE_LOGICAL)); infault.add(new SimpleInterceptor(Phase.PRE_INVOKE)); ListInterceptor in = c.getInInterceptors(); in.add(new SimpleInterceptor(Phase.RECEIVE)); in.add(new SimpleInterceptor(Phase.PRE_STREAM)); in.add(new SimpleInterceptor(Phase.PRE_PROTOCOL)); in.add(new SimpleInterceptor(Phase.UNMARSHAL)); in.add(new SimpleInterceptor(Phase.PRE_LOGICAL)); in.add(new SimpleInterceptor(Phase.PRE_INVOKE)); try { ess.buggyOperation(something wrong); } catch (DummyException_Exception e) { e.printStackTrace(); } } found the problem, very subtile: you need to invoke factory.getClientFactoryBean().get[In|Out|InFault|OutFault]Interceptors(); on the client factory bean not directly on the factory, then it works. Is this desired behavior? Besides that, I still do not really unterstand when handleFault() is called in an interceptor and what are the consequences Thanks, -Florian
How to develop a WebServiceClient correctly?
Currently I’m using CXF for accessing some Seam (stateful) services. I managed it to maintain session state of one service (I’ve set the SESSION_MAINTAIN_PROPERTY to true), but I need some further help with different services using the same session. A usual scenario would be following: • a registered user logs in (name, pwd) – AuthenticationService • invokes some methods of Service A • same with other methods of Service B • … • user logs out - AuthenticationService How can different services share the same session till timeout? -- View this message in context: http://www.nabble.com/How-to-develop-a-WebServiceClient-correctly--tp16741038p16741038.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: CXF Spring client: getting the message´s XML payload
Hi Freeman, Definitely, Option 2 is the most suitable way for my configuration because is less intrusive than others. I´ll try it. Thanks a lot for your support. Regards, Juanjo.
Re: Q: Issues when attempting to send . Wind up with gt;
adam_j_bradley wrote: Dan, Thanks for the tip, getting closer! One thing I want to now have is for all the symbols to be converted to gt; to mimic the behavior of the existing Web Service client (C# based). Any thoughts on how I might do that? It shouldn't be necessary - both forms are equivalent XML and will come out the same at the other end. The only characters that absolutely must be escaped in XML are (lt;) and (amp;), plus and single or double quotes that occur in attribute values delimited by the same type of quote (i.e. attr=quot; is the same as attr='', attr='apos;' is the same as attr='). Many processors also escape (gt;) and non-attribute ' and characters, but that isn't required by the spec. Either way, all the escaping will have been removed by the time the other end sees the value. Ian -- Ian Roberts | Department of Computer Science [EMAIL PROTECTED] | University of Sheffield, UK
Re: SSL KeyManager Authentication
Solved. I misspelled the filename of the KeyManager TrustStore. For some reason I did not get an Exception... Regards, Marko -- View this message in context: http://www.nabble.com/SSL-KeyManager-Authentication-tp16718625p16741940.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Fwd: CXF has graduated!
Congratulations to Dan and all the team ;-) I've been waiting this to happen for a long time. Davide Juanjo Vázquez wrote: Congratulations! Regards, Juanjo On Wed, Apr 16, 2008 at 8:30 PM, David Castañeda [EMAIL PROTECTED] wrote: Kudos to Dan and all people who has been involved. On Wed, Apr 16, 2008 at 1:26 PM, Arul Dhesiaseelan [EMAIL PROTECTED] wrote: Congratulations Dan and team! Daniel Kulp wrote: Forwarding this to cxf-user as it's as important for them as well. Dan -- Forwarded Message -- Subject: CXF has graduated! Date: Wednesday 16 April 2008 From: Jim Jagielski [EMAIL PROTECTED] To: [EMAIL PROTECTED] I am happy and proud to announce that at this month's board meeting, we have approved CXF's graduation out of the Incubator and as a TLP. Dan Kulp was approved as VP of the PMC. Congrats to one and all! --- -- David Castañeda R. -- View this message in context: http://www.nabble.com/Fwd%3A-CXF-has-graduated%21-tp16730423p16742889.html Sent from the cxf-user mailing list archive at Nabble.com.
Does JavaToWSDL support generics ?
Hi, I would like to generate a WSDL for the following method: public ListCar getAllCars();. In the generated WSDL I expect to have something similar to 'xs:element name=getAllCarsResponsexs:complexTypexs:sequencexs:element minOccurs=0 name=return nillable=true type=xxx:Car//xs:sequence/xs:complexType/xs:element'. When using JavaToWSDL, the generated WSDL contains 'xsd:element name=getAllCars type=tns:getAllCars /xsd:complexType name=getAllCarsxsd:sequence //xsd:complexTypexsd:element name=getAllCarsResponse type=tns:getAllCarsResponse /xsd:complexType name=getAllCarsResponsexsd:sequencexsd:element maxOccurs=unbounded minOccurs=0 name=return //xsd:sequence/xsd:complexType'. There is no reference to the 'Car' element :o(. Based on this experience I was wondering if JavaToWSDL supports generics or should I specify an additional parameter to generate a reference to the 'Car' element in the 'getAllCarsResponse' element ? Regards, Stefan Lecho. -- View this message in context: http://www.nabble.com/Does-JavaToWSDL-support-generics---tp16743152p16743152.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Invalid SOAP message
Yes! That's the problem! I made it via code and it works. Thank you very much, Jan Daniel Kulp [EMAIL PROTECTED] napsal dne 16.04.2008 19:11:15: Those extra character are due to the Transfer-Encoding: chunked. It looks like the cobol server doesn't support the chunked encoding.You can look at the docs for the HTTPConduit at: http://cwiki.apache.org/CXF20DOC/client-http-transport.html to turn off the chunking. Via code, it would look like: // Okay, are you sick of configuration files ? // This will show you how to configure the http conduit dynamically Client client = ClientProxy.getClient(poltim); HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setAllowChunking(false); http.setClient(httpClientPolicy); Dan On Wednesday 16 April 2008, Jan Pechanec wrote: I have problem with SOAP request message generated with Apache CXF 2.0.4. I generated java client from WSDL (wsdl2java), and tried to call web service running in the cobol MicroFocus Enteprise Server - the response was following: ... faultcodeClient/faultcode faultstringError in client request message/faultstring ... I suppose it means that SOAP request message is bad for the server side of web service. I tried following: Apache CFX client - cobol server : Error in client request message soapUI client generated from WSDL - cobol server : OK Apache CFX client - soapUI Mock service generated from WSDL : OK In the tcpmon I can see that there are strange chars (ed, 0) around SOAP message. I suppose this is the problem, but why there are these chars? See below. POST / HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: Accept: * Cache-Control: no-cache Pragma: no-cache User-Agent: Java/1.6.0_04 Host: localhost:8081 Connection: keep-alive Transfer-Encoding: chunked ed soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:BodyRea d xmlns=http://tempuri.org/wmapserv;BookStockno/BookStocknoBo okTitle/BookTitleBookAuthor/BookAuthor/Read/soap:Body/soap: Envelope 0 -- Thank you for any help, any hint, Jan -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Q: Issues when attempting to send . Wind up with
Here we go again. I suggest that you write things like 'convert the greater-than sign to amp g t semi'. You shouldn't ever need to do this. No standard-conforming XML processor needs it. On Wed, Apr 16, 2008 at 9:19 PM, adam_j_bradley [EMAIL PROTECTED] wrote: Dan, Thanks for the tip, getting closer! One thing I want to now have is for all the symbols to be converted to to mimic the behavior of the existing Web Service client (C# based). Any thoughts on how I might do that? Sincerely, Adam dkulp wrote: Don't pre-escape it. Let the CXF runtime escape it. The runtime doesn't know if a string that is being passed in is XML or just a straight string. Thus, it will always escape any of the XML special characters. You don't need to do it. -- View this message in context: http://www.nabble.com/Q%3A-Issues-when-attempting-to-send-%22-gt%22.-Wind-up-with-%22-amp-gt-%22-tp16703395p16736921.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: soap requests with no attributes or elements
Thanks all for your help. I decided to use empty nested complexType elements for no-input soap reqeusts and the generated code works much better. -- View this message in context: http://www.nabble.com/soap-requests-with-no-attributes-or-elements-tp16715370p16744039.html Sent from the cxf-user mailing list archive at Nabble.com.
Optional elements and null
I have my response XSD as: element name=Info complexType sequence element name=productID type=string minOccurs=1 maxOccurs=1/ element name=requestID type=string minOccurs=0 maxOccurs=1/ element ref=faults:GenericFaultType minOccurs=0 maxOccurs=1 / /sequence /complexType /element In certain situations I don't want to populate the requestID element in the response so I would expect the response NOT to include a requestID tag at all in the response but I'm getting a requestIDnull/requestID when I don't set the requestID value. Is there some way to not even populate my requestID element in the response if this value is null? Thanks, David
On the fly WSDL lacks namespace declarations
Hello, When I access the WSDL which is generated on the fly by invoking http://host:port/webservice?wsdl, I don't see any namespace declarations. I cannot use the same WSDL as is to generate the client code. I need to plugin in the namespace declarations (e.g. for soap and wsdl prefixes) in order for it to work with wsdl2java tool. Any idea as to how to generate a 'valid' WSDL in the first place on the fly? Regards, -- View this message in context: http://www.nabble.com/On-the-fly-WSDL-lacks-namespace-declarations-tp16747592p16747592.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Does JavaToWSDL support generics ?
What version of CXF? That should definitely be working. Dan On Thursday 17 April 2008, stlecho wrote: Hi, I would like to generate a WSDL for the following method: public ListCar getAllCars();. In the generated WSDL I expect to have something similar to 'xs:element name=getAllCarsResponsexs:complexTypexs:sequencexs:element minOccurs=0 name=return nillable=true type=xxx:Car//xs:sequence/xs:complexType/xs:element'. When using JavaToWSDL, the generated WSDL contains 'xsd:element name=getAllCars type=tns:getAllCars /xsd:complexType name=getAllCarsxsd:sequence //xsd:complexTypexsd:element name=getAllCarsResponse type=tns:getAllCarsResponse /xsd:complexType name=getAllCarsResponsexsd:sequencexsd:element maxOccurs=unbounded minOccurs=0 name=return //xsd:sequence/xsd:complexType'. There is no reference to the 'Car' element :o(. Based on this experience I was wondering if JavaToWSDL supports generics or should I specify an additional parameter to generate a reference to the 'Car' element in the 'getAllCarsResponse' element ? Regards, Stefan Lecho. -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
CXF 2.1 B2
Hi Dan, Is there a plan to release 2.1 beta2 in the coming days? Cheers, Arul
Re: Fwd: CXF has graduated!
Congratulations! Thanks best regards Jackey 2008/4/17, Davide Gesino [EMAIL PROTECTED]: Congratulations to Dan and all the team ;-) I've been waiting this to happen for a long time. Davide Juanjo Vázquez wrote: Congratulations! Regards, Juanjo On Wed, Apr 16, 2008 at 8:30 PM, David Castañeda [EMAIL PROTECTED] wrote: Kudos to Dan and all people who has been involved. On Wed, Apr 16, 2008 at 1:26 PM, Arul Dhesiaseelan [EMAIL PROTECTED] wrote: Congratulations Dan and team! Daniel Kulp wrote: Forwarding this to cxf-user as it's as important for them as well. Dan -- Forwarded Message -- Subject: CXF has graduated! Date: Wednesday 16 April 2008 From: Jim Jagielski [EMAIL PROTECTED] To: [EMAIL PROTECTED] I am happy and proud to announce that at this month's board meeting, we have approved CXF's graduation out of the Incubator and as a TLP. Dan Kulp was approved as VP of the PMC. Congrats to one and all! --- -- David Castañeda R. -- View this message in context: http://www.nabble.com/Fwd%3A-CXF-has-graduated%21-tp16730423p16742889.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Fwd: CXF has graduated!
Congratulations! James Forwarding this to cxf-user as it's as important for them as well. Dan -- Forwarded Message -- Subject: CXF has graduated! Date: Wednesday 16 April 2008 From: Jim Jagielski [EMAIL PROTECTED] To: [EMAIL PROTECTED] I am happy and proud to announce that at this month's board meeting, we have approved CXF's graduation out of the Incubator and as a TLP. Dan Kulp was approved as VP of the PMC. Congrats to one and all! ---
Re: Fwd: CXF has graduated!
Congratulations to all the people involved. great job guys. On Thu, Apr 17, 2008 at 7:20 PM, maomaode [EMAIL PROTECTED] wrote: Congratulations! James Forwarding this to cxf-user as it's as important for them as well. Dan -- Forwarded Message -- Subject: CXF has graduated! Date: Wednesday 16 April 2008 From: Jim Jagielski [EMAIL PROTECTED] To: [EMAIL PROTECTED] I am happy and proud to announce that at this month's board meeting, we have approved CXF's graduation out of the Incubator and as a TLP. Dan Kulp was approved as VP of the PMC. Congrats to one and all! ---
Re: Fwd: CXF has graduated!
Congratulations to everyone who is involved and best luck for the future! Pierre Forwarding this to cxf-user as it's as important for them as well. Dan -- Forwarded Message -- Subject: CXF has graduated! Date: Wednesday 16 April 2008 From: Jim Jagielski [EMAIL PROTECTED] To: [EMAIL PROTECTED] I am happy and proud to announce that at this month's board meeting, we have approved CXF's graduation out of the Incubator and as a TLP. Dan Kulp was approved as VP of the PMC. Congrats to one and all! ---