add attachment to a cxf client

2011-09-06 Thread opicina
Hi i have some problem to add an attachment with cxf: *I have generate the cxf client:* /org.apache.cxf.jaxws.JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); proxyFactory.setServiceClass(ProtPT.class); proxyFactory.setAddress(http://xxx/services/x;);

Re: JAX-RS spec about Resource

2011-09-06 Thread Raj Floyd
Thanks Sergey. On Mon, Sep 5, 2011 at 5:35 PM, Sergey Beryozkin sberyoz...@gmail.comwrote: Hi, On 05/09/11 12:56, Raj Floyd wrote: Hi JAX-RS spec says: * Resource classes are POJOs that have at least one method annotated with @Path or a request method designator.* I feel a Resource

WSDL and CXF causing fault from unsatisfied policy alternatives?

2011-09-06 Thread Casey
To anyone: I'm trying to create a web service inside Eclipse Indigo using CXF 2.x and when I test it with a client, I receive the following error dump inside Eclipse: Sep 6, 2011 9:20:18 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which

Re: CXF : JAX-RS: support multiple request method designators to one method?

2011-09-06 Thread Daniel Kulp
On Monday, September 05, 2011 2:54:06 AM CXF user1109 wrote: About SOAP, for response/outgoing message by default CXF uses ProviderSource? If I want to do streaming for esponse/outgoing message, I need to write ProviderXMLStreamReader or ProviderStaxSource? No, you can leave it as

Re: WSDL and CXF causing fault from unsatisfied policy alternatives?

2011-09-06 Thread Daniel Kulp
On Tuesday, September 06, 2011 1:49:44 PM Casey wrote: To anyone: I'm trying to create a web service inside Eclipse Indigo using CXF 2.x and when I test it with a client, I receive the following error dump inside What version of CXF? Also, what libraries/jars from CXF are present in your

Re: None of the policy alternatives can be satisfied

2011-09-06 Thread Daniel Kulp
On Tuesday, September 06, 2011 2:22:59 AM yannick wrote: Hi, I already found this topic but didn't help me: http://cxf.547215.n5.nabble.com/None-of-the-policy-alternatives-can-be-satis fied-td4346996.html#a4347102 . We'd likely need to see the full policy. A testcase would be useful as

Re: None of the policy alternatives can be satisfied

2011-09-06 Thread yannick
Dan thanks for your reply. I solved the problem by checking the jar files of the example source and my own. I didn't get any exceptions about conflicts our what ever but just by comparing I noticed that I didn't had all the jars... So I added the missing onces and didn't receive the exception

Re: Initializing beans and session factory types

2011-09-06 Thread Barry Hathaway
Taking Dan's suggestion I got this to work in a CXF/Tomcat environment. Now I'm trying to migrate this service to a ServiceMix environment. After building all the bundles, installing them, and running a client to access the service I get: org.apache.cxf.interceptor.Fault: No Scope registered

Re: WSDL and CXF causing fault from unsatisfied policy alternatives?

2011-09-06 Thread Casey
On Tuesday, September 06, 2011 1:49:44 PM Casey wrote: To anyone: I'm trying to create a web service inside Eclipse Indigo using CXF 2.x and when I test it with a client, I receive the following error dump inside What version of CXF? Also, what libraries/jars from CXF are present

Re: WSDL and CXF causing fault from unsatisfied policy alternatives?

2011-09-06 Thread Daniel Kulp
That list looks fine. Looking closer: WARNING: No assertion builder for type {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1 .0. xsd} SecurityToken registered. I would say your Policy is invalid. There isn't a SecurityToken element defined for that

Re: add attachment to a cxf client

2011-09-06 Thread Daniel Kulp
I think you can do something like: ((BindingProvider)client).getRequestContext() .get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); That should return a: MapString, DataHandler that you can use to add datahandlers. Alternatively, you can create a CollectionAttachment where the

Re: Initializing beans and session factory types

2011-09-06 Thread Daniel Kulp
On Tuesday, September 06, 2011 2:53:47 PM Barry Hathaway wrote: Taking Dan's suggestion I got this to work in a CXF/Tomcat environment. Now I'm trying to migrate this service to a ServiceMix environment. After building all the bundles, installing them, and running a client to access the

Re: WSDL and CXF causing fault from unsatisfied policy alternatives?

2011-09-06 Thread Casey
I would say your Policy is invalid. There isn't a SecurityToken element defined for that namespace. Definitely check the policy definition to make sure it's valid. Thanks for the response, Dan, but it seems that I get the same outcome even with the Policy removed from the WSDL--None

Re: schema validation

2011-09-06 Thread Daniel Kulp
On Monday, September 05, 2011 5:43:24 AM TON wrote: how can i customize the jaxb schema validation exception ? Most likely you'll need to write an interceptor that would check for that specific fault and remap it. If you have an interceptor on the incoming chain that does nothing in its

ExceptionMapper choosing the wrong mapper

2011-09-06 Thread Alex Porras
I am working on an app that has some custom exceptions in a class hierarchy, rooted from RuntimeException. For use in CXF, they contain complementary ExceptionMapper classes. Basically, you are looking at a parallel hierarchy: (abstract)BaseRuntimeException FooException BarException (abstract)

Re: WSDL and CXF causing fault from unsatisfied policy alternatives?

2011-09-06 Thread Daniel Kulp
On Tuesday, September 06, 2011 7:49:52 PM Casey wrote: I would say your Policy is invalid. There isn't a SecurityToken element defined for that namespace. Definitely check the policy definition to make sure it's valid. Thanks for the response, Dan, but it seems that I get the same

Re: NTLM security between WCF and CXF

2011-09-06 Thread Daniel Kulp
This exception is due to the WSDL that is being used likely having a custom MS defined policy extensor in it. If you grab the wsdl and use a clean version, your code likely should work. Dan On Friday, September 02, 2011 12:55:53 PM samyem wrote: I'm trying to use NTLM to secure WCF web

Re: RPC/Literal Problem : Found element arg0 but could not find matching RPC/Literal part

2011-09-06 Thread Daniel Kulp
On Sunday, September 04, 2011 6:37:13 AM mymacin wrote: Hi everyone, When I try to apply @SOAPBinding(style=SOAPBinding.Style.RPC) annotation to Service bean . while I am consuming this service getting below exception . Bunch of questions: Did you apply it to the SEI as well? Has the

Re: ExceptionMapper choosing the wrong mapper

2011-09-06 Thread Alex Porras
On Tue, Sep 6, 2011 at 4:12 PM, Alex Porras a...@twelve17.com wrote: [snip] Basically, you are looking at a parallel hierarchy: Bleh, my mistake. I wasn't clear enough in describing the hierarchy. It's: (abstract)BaseRuntimeException FooException extends BaseRuntimeException BarException

Re: NTLM security between WCF and CXF

2011-09-06 Thread samyem
Thanks for the quick reply. I've actually done clean builds and the problem persists. I think I am missing some critical pieces here dealing with WS-SecurityPolicy for NtlmAuthentication that arise from the WCF's binding. Using either clientCredentialType=Ntlm and clientCredentialType=Windows

Re: ExceptionMapper choosing the wrong mapper

2011-09-06 Thread Alex Porras
On Tue, Sep 6, 2011 at 4:12 PM, Alex Porras a...@twelve17.com wrote: What is happening is that when FooException is thrown in the application, it is being handled by BarExceptionMapper. I believe I have found the solution. Despite the child exception mappers specifying a generic type required

Re: NTLM security between WCF and CXF

2011-09-06 Thread Daniel Kulp
On Tuesday, September 06, 2011 1:35:57 PM samyem wrote: Thanks for the quick reply. I've actually done clean builds and the problem persists. Has nothing to do with clean builds...What I'm suggesting is to grab the WSDL from the service and clean out any policies in there so you start