Webservice has extra return/ in response.

2009-12-02 Thread Harm Verhagen
Hi, When using CXF to construct a webservice I see that my response xml always gets an extra wrapper layer. It always gets an extra return ... /return in the soap responses. * Actual soap response.* soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body

setting response headers in AtomFeedProvider

2009-12-02 Thread Paul Wilton
Hi Sergey, I was planning on setting a response header (Last-Modified, expires, cache-control etc) in an extended AtomFeedProvider based on the Feed updated data, for example: public class AtomFeedProvider extends org.apache.cxf.jaxrs.provider.AtomFeedProvider { @Override public void

Minimal Set of Libraries for Client using WS-Security

2009-12-02 Thread Raymi
Hi there, I'am developping an Eclipse Plugin that calls a (CXF) webservice to get its data. The webservice is protected with the UsernameToken Profile. What are my options to minimize the amount of jars I have to include in the plugin: - I can't use pure Java because the webservice is

java.lang.VerifyError: Cannot inherit from final class

2009-12-02 Thread Shahul Hameed
Hi I am getting the following exception when my application starts up Caused by: java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at

CXF complains about xsi:nil=true for a method with no parameters.

2009-12-02 Thread silvano.squizzato
1. I’m trying to port the WS code from XFire to CXF (version 2.2.5) 2. listDomains is a method defined with no parameters in the WSDL: xsd:element name=listDomains xsd:complexType/ /xsd:element 3. I used a SOAP::Lite::VERSION: 0.69 client 4. The client sends such a kind of

Re: DOSGi - how do i change http port?

2009-12-02 Thread Bernd Wiswedel
I have to admit that I can't get it to work that way. I'm using eclipse and followed the instructions listed on http://cxf.apache.org/setting-up-eclipse-for-running-and-debugging-distributed-osgi.html. My plugin activator writes in its start method: props.put(osgi.remote.interfaces, *);

Re: Working with HTTP sessions in Apache CXF

2009-12-02 Thread Sergey Beryozkin
Hi I'm not sure exactly what to advise, perhaps if you can clarify what exactly you need to test then it may help So perhaps you'd like to register a mock Jetty handler which says extends org.mortbay.jetty.servlet.SessionHandler ? If so then you can get a DestinationFactoryManager

Re: how to close inputStream before returning response

2009-12-02 Thread Sergey Beryozkin
Hi, Thanks guys, Sergey, can you provide any link or document for the last option(prototype one) you suggested? See http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-Resourcelifecycles and http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-Lifecyclemanagement Also if I want to send

Re: How to use CXF and JSON

2009-12-02 Thread Sergey Beryozkin
Thanks David... Looks like the problem has to do with that fact that an Object instance is being returned The method.getReturnType() is used when searching for providers... cheers, Sergey -Original Message- From: cgswtsu78 [mailto:cg...@proofpoint.com] Sent: Tuesday, December

Re: setting response headers in AtomFeedProvider

2009-12-02 Thread Sergey Beryozkin
Hi Paul This really has to work... Can you please try, just for the sake of the test, doing headers.add(CustomHeader, bar); and see if it's there on the wire. I'm just thinking that may be it is the fact that a Date as opposed to String which is being set in your case that affects it ? If

Re: DOSGi - how do i change http port?

2009-12-02 Thread Sergey Beryozkin
Hi we chatted a bit with David about it, perhaps the fact that you're using a jaxws frontend is what affecting it ? It should not actually, but please try just remove this property and see what happens... I have to admit that I can't get it to work that way. I'm using eclipse and followed

Re: Can I remove Bouncy Castle from CXF 2.1.4

2009-12-02 Thread Daniel Kulp
On Wed December 2 2009 2:55:30 am Bruce Li wrote: Hi all, We want to use CXF 2.1.4 in our product but we are told not to use Bouncy Castle. I'm new to CXF so my question is, is Bouncy Castle only used for https and WS-Security? Could I remove it if we do not have such requirements, or

Re: Using CXF with NTLM authentication as well as SSL/HTTPS

2009-12-02 Thread Daniel Kulp
You would probably need to log a bug with jcifs. That said, I expect they are going to say something along the lines of NTLM with SSL/HTTPS is completely redundant and not worth supporting. With SSL/HTTPS, the channel is already encrypted. Thus, the extra protection offered by NTLM is

RE: Using CXF with NTLM authentication as well as SSL/HTTPS

2009-12-02 Thread Acevedo, Alberto Mr CIV USA AMC
If you are using Tomcat then Tomcatspnego is another alternative: http://tomcatspnego.codeplex.com/Release/ProjectReleases.aspx?ReleaseId= 29695 Tomcatspnego works with NTLMV2, and jcif doesn't. Alberto Acevedo -Original Message- From: Daniel Kulp [mailto:dk...@apache.org] Sent:

RE: setting response headers in AtomFeedProvider

2009-12-02 Thread Paul Wilton
Hi Sergey I have tried headers.add(CustomHeader, bar); headers.add(Last-Modified, org.apache.cxf.jaxrs.utils.HttpUtils.getHttpDateFormat().format(feed.get Updated()); and nothing is on the Wire.. If I add a custom ResponseHandler filter - how would this filter now about my feed object in order

Re: setting response headers in AtomFeedProvider

2009-12-02 Thread Sergey Beryozkin
Hi Paul let me write a little test, using a derived provider, exactly the way you did it. The filter will have a Response as one of the input parameters, this is a Response which will be eventually serialized by your provider, response.getEntity() will return a Feed instance. You'd need to

No operation matching request path error

2009-12-02 Thread John Klassa
I think I'm missing something obvious, but I can't figure out what it is. I had some proof-of-concept code put together that does something just like this -- successfully -- but without Spring configuration (I was using an Application instance). I don't know if that's related, but thought I'd

Re: setting response headers in AtomFeedProvider

2009-12-02 Thread Sergey Beryozkin
It definitely works for me, I just added headers.add(Foo, Bar); to http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericHandlerWriter.java just before the delegation to the JAXBProvider occurs and I can see HTTP/1.1 200 OK Content-Type:

Re: DOSGi - how do i change http port?

2009-12-02 Thread Bernd Wiswedel
It doesn't help. It still uses the default endpoint. I even started over from scratch and followed 1:1 the steps described online for setting up eclipse (literally copying the interface and service class). No jaxws, no jaxb, just the defaults... The org.apache.cxf.ws.address property doesn't

RE: setting response headers in AtomFeedProvider

2009-12-02 Thread Paul Wilton
yep 2.2.5 I have now found out why... In my example code below (original email) it wasn't exactly as I had it in my test case. I was writing an xml directive out to the output stream first (I didn't think was relevant so didn't put it in the email) public void writeTo(Feed feed, Class? clazz,

Re: One endpoint handling multiple URL paths

2009-12-02 Thread Lukasz Lichota
ah ok, indeed it works, I knew about the servlet but it's almost alwasy mapped to '*', but I tried and it worked, the missing point was that I didn't know that when I have endpoint /myservice/ then the request to /myservice/something goes also to this endpoint and this actually what I was asking

RE: No operation matching request path error

2009-12-02 Thread KARR, DAVID (ATTCINW)
-Original Message- From: John Klassa [mailto:j...@klassa.com] Sent: Wednesday, December 02, 2009 9:07 AM To: users@cxf.apache.org Subject: No operation matching request path error [deleted] @Path(/bug) public class DefectResource extends BaseResource { @GET

Re: setting response headers in AtomFeedProvider

2009-12-02 Thread Sergey Beryozkin
Excellent...You could've written instead directly into HttpServletResponse, however the current filter impl will probably miss custom headers set directly on it, something that will need to be fixed By the way, in background, I've been working on some Atom-related enhancements, will be

Re: How to use CXF and JSON

2009-12-02 Thread cgswtsu78
Hi Sergey, I don't quite understand the proper implementation for using CXF and JSON. I have the xml implementation working, see below. Can you guide me on doing the same basic function but returning JSON? I know I need to change the @Produces to application/json, but what setup do I need to

Re: How to use CXF and JSON

2009-12-02 Thread Sergey Beryozkin
Hi You probably just don't need to do it all, just do @Produces(application/xml, application/json) @GET public SomeConcreteObjectType get(...) { return topSpamSenderService.getTopSpamSender(null); } hope it helps Sergey Hi Sergey, I don't quite understand the proper implementation for

Re: How to use CXF and JSON

2009-12-02 Thread cgswtsu78
That did work, but it required me to save the json string as a file. When opening it in notepad it has the correct object representation. How can I display the json string in the browser? Do I have to setup something prior to making the request to the service method? Currently, I'm just

Re: No operation matching request path error

2009-12-02 Thread Sergey Beryozkin
I just did a quick test and I can see a NoteResource is correctly selected... Perhaps the HTTP Accept does not text/plain or wildcard ? I have to go right now, will reply tomorrow David, FYI, a selection algorithm specifies how to select between multiple matching classes, please see

RE: How to use CXF and JSON

2009-12-02 Thread KARR, DAVID (ATTCINW)
-Original Message- From: cgswtsu78 [mailto:cg...@proofpoint.com] Sent: Wednesday, December 02, 2009 10:17 AM To: users@cxf.apache.org Subject: Re: How to use CXF and JSON That did work, but it required me to save the json string as a file. When opening it in notepad it has the

Re: Payload: .No message body writer found for response class : ArrayList.

2009-12-02 Thread Parimal Dhinoja
Hi, As you see in following code, My requirement is to send one or more XML files in response stream. I have done following to accomplish my requirement: 1. Resource class method returns ArrayList which contains XML file objects. 2. I have created custom MessageBodyWriter, which modify the

Re: java.lang.VerifyError: Cannot inherit from final class

2009-12-02 Thread Daniel Kulp
Check for other versions of: org.apache.cxf.endpoint.dynamic.DynamicClientFactory The OLD OLD versions of DynamicClientFactory were final. When the JaxWsDynamicClientFactory class was added, the final restriction was taken off. Thus, it kind of sounds like you are getting a new

Re: DOSGi - how do i change http port?

2009-12-02 Thread Sergey Beryozkin
cxf-dosgi-ri-multibundle-distribution-1.0.tar.gz Please use a 1.1 distribution thanks, Sergey Bernd Wiswedel (2) wrote: It doesn't help. It still uses the default endpoint. I even started over from scratch and followed 1:1 the steps described online for setting up eclipse

Re: Webservice has extra return/ in response.

2009-12-02 Thread Daniel Kulp
I think the only way to do that would be to do something like: @WebMethod @WebResult(name = resultCode) public int deleteNetwork( @WebParam(name = token) String token, @WebParam(name = id) int id, @WebParam(name = resultDescription, mode=OUT)

RE: How to use CXF and JSON

2009-12-02 Thread cgswtsu78
David or Sergey, I guess back to my original questionexcept this should be a bit more clear. I'm using apache's httpclient in order to process POST and GET requests to my REST service methods. These POST and GET requests are being executed from a JSF managed bean in order to retrieve an

RE: How to use CXF and JSON

2009-12-02 Thread cgswtsu78
David or Sergey, I guess back to my original questionexcept this should be a bit more clear. I'm using apache's httpclient in order to process POST and GET requests to my REST service methods. These POST and GET requests are being executed from a JSF managed bean in order to retrieve an

Re: java2ws and xmlbeans databinding

2009-12-02 Thread Daniel Kulp
On Tue December 1 2009 10:58:21 am rmiyares wrote: The online documentation mentions that java2ws supports jaxb and aegis databindings. Does it also support xmlbeans? Maybe. Not really sure. Most likely with the same configuration things you have for Aegis, it might work. Alternatively,

Re: CXF complains about xsi:nil=true for a method with no parameters.

2009-12-02 Thread Daniel Kulp
On Wed December 2 2009 8:30:18 am silvano.squizzato wrote: 1.I’m trying to port the WS code from XFire to CXF (version 2.2.5) 2.listDomains is a method defined with no parameters in the WSDL: xsd:element name=listDomains xsd:complexType/ /xsd:element 3.I used a

Re: jax-ws-catalog and resolving schemas in jars that do xsd:include

2009-12-02 Thread Daniel Kulp
Is there any way you could create a small hello world type sample that demonstrates this?This SOUNDS like a bug. If you could attach a small test case to a JIRA, that would be a huge help. You also don't mention what version of CXF. The stack trace doesn't seem to line up with recent

Re: Any best practise to make CXF better support large amount data transmit

2009-12-02 Thread Daniel Kulp
On Tue December 1 2009 4:16:28 am Jessie914 wrote: hi, Glen Many thanks for the reply, I am now able to invoke async calls. Regarding to the MTOM, if MTOM is used, the server side must enable the MTOM as well, correct? If you want the server to RETURN MTOM, yes. The server (and client)

Re: Problem getting SOAP client to read jaxws:properties

2009-12-02 Thread Daniel Kulp
On Wed December 2 2009 12:44:22 am Glen Mazza wrote: OK, judging from here: http://tinyurl.com/yatskw4 and http://tinyurl.com/y9e7rjf the name attribute of jaxws:client must point to the name of the wsdl:port within the wsdl:service section, *not* the name of the wsdl:service. I'll update

Question about x509 certificates

2009-12-02 Thread Cole Ferrier
I've done some basic testing and setup with x509 certificates, but i have a few requirements that i'm trying to figure out how i could implement. 1) I want to be able to accept an signed (not encrypted) message without having the public key in my keystore prior to someone calling me. I have a

Re: Re: Can I remove Bouncy Castle from CXF 2.1.4

2009-12-02 Thread bruce . li
Thanks Daniel. Since we are not using WS-Security now and we will use Java 6, we may be able to remove it from CXF for us. Thanks. On Dec 2, 2009 11:47pm, Daniel Kulp dk...@apache.org wrote: On Wed December 2 2009 2:55:30 am Bruce Li wrote: Hi all, We want to use CXF 2.1.4 in our

Re: WSD2JS Not Creating Schema Objects

2009-12-02 Thread noosy
Thanks again! Another question if you don't mind.. I'm looking for the equivalent of how I would normally use xmlbeans in Java - that I can do in JS. More specifically, my web service returns xml within xml if that makes sense. My generated wsdl2js CXF code allows me to work nicely with the

spring 2.5 with client side manual address

2009-12-02 Thread Saiful Haqqi
hi all, many article say how to create client side like this with spring, bean id=client class=demo.order.OrderProcess factory-bean=clientFactory factory-method=create/ bean id=clientFactory class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean property name=serviceClass

Re: How to handle exceptions in JAx-rs service and convert it to Http Response code based on type of Exception

2009-12-02 Thread vickatvuuch
register rest exception mapper and convert there, for example see below: note that the mapper works fine in REST only case, I actually ended up building my own CustomFaultOutInterceptor such as this: public class CustomFaultOutInterceptor extends AbstractPhaseInterceptorMessage public class

Re: WSD2JS Not Creating Schema Objects

2009-12-02 Thread Benson Margulies
You can use the CXF stuff all over again if you are willing to write an XML schema for your XML and write a bit of Java. In the CXF code, it wouldn't be too hard to run SchemaJavascriptBuilder to create the necessary functions to serialize and deserialize. then you just parse the string

Re: WSD2JS Not Creating Schema Objects

2009-12-02 Thread noosy
Thats what I was hoping you would say. Yes, I have an XML schema for my XML, would you mind (briefly) explaining the steps I should take to run SchemaJavascriptBuilder against my schema to generate the necessary deserialize/serialize functions? When you say write a bit of Java are you saying I

Marshalling null value fields

2009-12-02 Thread Mustafa Sezgin
Hi all, I have some beans in a rest service which marshalled and sent back to the end user. However sometimes certain fields in the bean may not have values and as a result, the XML that gets produced can sometimes omit these fields. We want the responses to always be consistent, so even if a

Re: WSDL wsaw:Action vs soapAction in MAPs on the response message

2009-12-02 Thread Craig Tataryn
Anyone have an inkling as to whether CXF is interpreting the spec correctly on this? Essentially we have an explicit wsaw:Action specified on a response message, yet because there is a soapAction set in the binding the wsaw:Action is ignored and replaced with the value of the soapAction. Thanks,

RE: Marshalling null value fields

2009-12-02 Thread Mustafa Sezgin
After doing some investigation and prototyping, I have been thinking that if there is not an annotation based way of doing this, then writing an interceptor for the pre marshal phase and modifying the values of the object to be marshalled there. This requires I have all the fields in the object to