RE: Fediz - intended project direction?

2013-05-08 Thread Oliver Wulff
If you don't mind I'd like to move this dicussion to the dev list.

Just thinking out loud... the Fediz IDP should become an application but might 
still require to deploy the WAR into your favorite servlet container.

When the new feature (FEDIZ-3) is completed we're close for 1.1.0 release. But 
this still requires to customize spring configs to integrate the IDP into your 
company's security infrastructure. What is missing is a GUI. I'd like to see 
putting some REST interfaces for the IDP/STS which is used by either a command 
line tool and web console. The REST services should cover:
- configure a trusted IDP (certificate, claims transformation, ...)
- configure a relying party (application, ...)
- configure an IDP instance (authentication backend, signer certificate, ...)

Thanks
Oli


From: Sergey Beryozkin [sberyoz...@gmail.com]
Sent: 07 May 2013 23:22
To: users@cxf.apache.org
Subject: Re: Fediz - intended project direction?

On 07/05/13 22:21, Sergey Beryozkin wrote:
 Hi
 On 07/05/13 16:25, snowch wrote:
 Hi Oli,

 The question is whether Fediz is aimed at being a framework or an
 application.

 For example, I would classify the WSO2 Identity Server and OpenSSO as
 applications. If you just want to deploy a WSO2 IS, or OpenSSO, you would
 rarely checkout the source code and start hacking around.

 However, Fediz feels more like a framework that you would build your own
 application on top of. You start by checking out the source code for
 Fediz, then customize the configuration (and login pages, etc),
 followed by
 building your own war with your own configuration.

 Would you see Fediz moving more towards being an application, or more
 as a
 framework?

 IMHO the former is a specific 'application' of the former and I honestly
 hope that in time we will see a dedicated generic application(s) built
 around Fediz plugin.

The 2nd 'former' was meant to read the 'latter' :-)


 Cheers, Sergey

 Does my question make sense now?

 Many thanks,

 Chris





 --
 View this message in context:
 http://cxf.547215.n5.nabble.com/Fediz-intended-project-direction-tp5727348p5727363.html

 Sent from the cxf-user mailing list archive at Nabble.com.




--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

RE: java.lang.NoClassDefFoundError exception loading a rest endPoint in particular condition

2013-05-08 Thread eanbiso
Thanks for the reply.
What I've seen in last test is that moving the GenCmdDescr class in the same 
package with IModel interface the exception doesn't occurs anymore.
But I am not clear what can be the reason: also the other package was visible 
and loading the ws as soap there aren't problems; only when loading the ws as 
rest the exception occurs, even if during the publication seems to be all right.
Any idea?
Thanks,

Andrea


Date: Wed, 8 May 2013 02:07:59 -0700
From: ml-node+s547215n5727417...@n5.nabble.com
To: bisoma...@hotmail.it
Subject: Re: java.lang.NoClassDefFoundError exception loading a rest endPoint 
in particular condition



I've done a quick local test:


@Test

 public void testProxy() throws Exception {

 IModel model = 

JAXRSClientFactory.create(http://localhost:8080;, IModel.class);

 assertNotNull(model);

 model.getJsonGenericCommandDescriptor(new 

GenCmdDescr(description));

 }


This throws HTTP level exception as expected, as no endpoint is 

listening. The proxy is created OK. The only thing I had to remove 

IPublishable from my example as you did not provide any source for it


I suspect some of your dependencies affecting the proxy generation.


Cheers, Sergey


On 08/05/13 07:16, eanbiso wrote:

 Good morning,

 the GenCmdDescr code is a class like this:



 import javax.xml.bind.annotation.XmlAttribute;

 import javax.xml.bind.annotation.XmlRootElement;

 import javax.xml.bind.annotation.XmlAccessorType;

 import javax.xml.bind.annotation.XmlAccessType;



 @XmlRootElement(name=GenCmdDescr, namespace=http://***/;)

 @XmlAccessorType(XmlAccessType.FIELD)

 public class GenCmdDescr {



  @XmlAttribute private String name;

  @XmlAttribute private int profileId;

  @XmlAttribute private int objIdHigh;

  @XmlAttribute private int objIdLow;

  @XmlAttribute private short protType;



  public GenCmdDescr(){};



  public GenCmdDescr(String name, short protType, int profileId, int 
 objIdHigh, int objIdLow) {

  super();

  this.name = name;

  this.profileId = profileId;

  this.objIdHigh = objIdHigh;

  this.objIdLow = objIdLow;

  this.protType = protType;

  }



  public String getName() {

  return this.name;

  }

  public void setName(String name) {

  this.name = name;

  }

  public int getProfileId() {

  return profileId;

  }

  public void setProfileId(int profileId) {

  this.profileId = profileId;

  }

  public int getObjIdHigh() {

  return objIdHigh;

  }

  public void setObjIdHigh(int objIdHigh) {

  this.objIdHigh = objIdHigh;

  }

  public int getObjIdLow() {

  return objIdLow;

  }

  public void setObjIdLow(int objIdLow) {

  this.objIdLow = objIdLow;

  }

  public short getProtType() {

  return protType;

  }

  public void setProtType(short protType) {

  this.protType = protType;

  }

 }



 while the ws interface is similar to this (I have reported only the method 
 with problems):



 @WebService(targetNamespace = )

 public interface IModel extends IPublishable {



  @CxfWSAuthorization(group=***, roles={***})

  @GET

  @Consumes({MediaType.APPLICATION_XML})

  @Path(/getJsonGenericCommandDescriptor/{genericCommand})

  public String getJsonGenericCommandDescriptor(

  @WebParam(name = genericCommand) @PathParam(genericCommand) 
 GenCmdDescr genericCommand) throws InstantiationException;



 }





 Andrea



 Date: Tue, 7 May 2013 09:45:46 -0700

 From: [hidden email]

 To: [hidden email]

 Subject: Re: java.lang.NoClassDefFoundError exception loading a rest endPoint 
 in particular condition







   Can you give me a favor and attach an interface and GenCmdDescr source



 to JIRA ? Or nabble ? I'll give it a try





 Sergey



 On 07/05/13 17:29, eanbiso wrote:



 Thanks for the fast reply.



 I do not use a concrete class and when I create the proxyFactory I use the 
 corresponding ws interface class as clazz value.







 Andrea















 Date: Tue, 7 May 2013 09:01:10 -0700



 From: [hidden email]



 To: [hidden email]



 Subject: Re: java.lang.NoClassDefFoundError exception loading a rest 
 endPoint in particular condition















  Hi







 On 07/05/13 15:56, eanbiso wrote:







 Hi at all,







 I have the following problem loading a rest endPoint using cxf.







 The operations I do to load the rest endPoint after its publication are the







 following:







 







 JAXRSClientFactoryBean proxyFactory = new 
 JAXRSClientFactoryBean();







 proxyFactory.setServiceClass(clazz);







 address += servName;







 proxyFactory.setAddress(address);







 

Re: java.lang.NoClassDefFoundError exception loading a rest endPoint in particular condition

2013-05-08 Thread Sergey Beryozkin

On 08/05/13 10:18, eanbiso wrote:

Thanks for the reply.
What I've seen in last test is that moving the GenCmdDescr class in the same 
package with IModel interface the exception doesn't occurs anymore.
But I am not clear what can be the reason: also the other package was visible 
and loading the ws as soap there aren't problems; only when loading the ws as 
rest the exception occurs, even if during the publication seems to be all right.
Any idea?
Not really, may be you need to use cglib-nodep... Something is being 
affected at the code generation level...


Sergey

Thanks,

Andrea


Date: Wed, 8 May 2013 02:07:59 -0700
From: ml-node+s547215n5727417...@n5.nabble.com
To: bisoma...@hotmail.it
Subject: Re: java.lang.NoClassDefFoundError exception loading a rest endPoint 
in particular condition



I've done a quick local test:


@Test

  public void testProxy() throws Exception {

  IModel model =

JAXRSClientFactory.create(http://localhost:8080;, IModel.class);

  assertNotNull(model);

  model.getJsonGenericCommandDescriptor(new

GenCmdDescr(description));

  }


This throws HTTP level exception as expected, as no endpoint is

listening. The proxy is created OK. The only thing I had to remove

IPublishable from my example as you did not provide any source for it


I suspect some of your dependencies affecting the proxy generation.


Cheers, Sergey


On 08/05/13 07:16, eanbiso wrote:


Good morning,



the GenCmdDescr code is a class like this:







import javax.xml.bind.annotation.XmlAttribute;



import javax.xml.bind.annotation.XmlRootElement;



import javax.xml.bind.annotation.XmlAccessorType;



import javax.xml.bind.annotation.XmlAccessType;







@XmlRootElement(name=GenCmdDescr, namespace=http://***/;)



@XmlAccessorType(XmlAccessType.FIELD)



public class GenCmdDescr {







  @XmlAttribute private String name;



  @XmlAttribute private int profileId;



  @XmlAttribute private int objIdHigh;



  @XmlAttribute private int objIdLow;



  @XmlAttribute private short protType;







  public GenCmdDescr(){};







  public GenCmdDescr(String name, short protType, int profileId, int 
objIdHigh, int objIdLow) {



  super();



  this.name = name;



  this.profileId = profileId;



  this.objIdHigh = objIdHigh;



  this.objIdLow = objIdLow;



  this.protType = protType;



  }







  public String getName() {



  return this.name;



  }



  public void setName(String name) {



  this.name = name;



  }



  public int getProfileId() {



  return profileId;



  }



  public void setProfileId(int profileId) {



  this.profileId = profileId;



  }



  public int getObjIdHigh() {



  return objIdHigh;



  }



  public void setObjIdHigh(int objIdHigh) {



  this.objIdHigh = objIdHigh;



  }



  public int getObjIdLow() {



  return objIdLow;



  }



  public void setObjIdLow(int objIdLow) {



  this.objIdLow = objIdLow;



  }



  public short getProtType() {



  return protType;



  }



  public void setProtType(short protType) {



  this.protType = protType;



  }



}







while the ws interface is similar to this (I have reported only the method with 
problems):







@WebService(targetNamespace = )



public interface IModel extends IPublishable {







  @CxfWSAuthorization(group=***, roles={***})



  @GET



  @Consumes({MediaType.APPLICATION_XML})



  @Path(/getJsonGenericCommandDescriptor/{genericCommand})



  public String getJsonGenericCommandDescriptor(



  @WebParam(name = genericCommand) @PathParam(genericCommand) 
GenCmdDescr genericCommand) throws InstantiationException;







}











Andrea







Date: Tue, 7 May 2013 09:45:46 -0700



From: [hidden email]



To: [hidden email]



Subject: Re: java.lang.NoClassDefFoundError exception loading a rest endPoint 
in particular condition















Can you give me a favor and attach an interface and GenCmdDescr source







to JIRA ? Or nabble ? I'll give it a try











Sergey







On 07/05/13 17:29, eanbiso wrote:







Thanks for the fast reply.







I do not use a concrete class and when I create the proxyFactory I use the corresponding 
ws interface class as clazz value.















Andrea































Date: Tue, 7 May 2013 09:01:10 -0700







From: [hidden email]







To: [hidden email]







Subject: Re: java.lang.NoClassDefFoundError exception loading a rest endPoint 
in particular condition































Hi















On 07/05/13 15:56, eanbiso wrote:















Hi at all,















I have the following problem loading a rest endPoint using cxf.















The operations I do to 

RE: java.lang.NoClassDefFoundError exception loading a rest endPoint in particular condition

2013-05-08 Thread eanbiso
Ok, I've found the problem.
I was using cxf (version 2.5.0) like an imported Project with its MANIFEST.MF 
file.
In the MANIFEST.MF I have added, under the DynamicImport-Package:  
section, the packages containing the classes that generated the exception 
NoClassDefFoundError  during the loading.
Now it seems to be all right.
Thanks a lot for the support.

Andrea

Date: Wed, 8 May 2013 02:56:02 -0700
From: ml-node+s547215n5727421...@n5.nabble.com
To: bisoma...@hotmail.it
Subject: Re: java.lang.NoClassDefFoundError exception loading a rest endPoint 
in particular condition



On 08/05/13 10:18, eanbiso wrote:

 Thanks for the reply.

 What I've seen in last test is that moving the GenCmdDescr class in the same 
 package with IModel interface the exception doesn't occurs anymore.

 But I am not clear what can be the reason: also the other package was visible 
 and loading the ws as soap there aren't problems; only when loading the ws as 
 rest the exception occurs, even if during the publication seems to be all 
 right.

 Any idea?

Not really, may be you need to use cglib-nodep... Something is being 

affected at the code generation level...


Sergey

 Thanks,



 Andrea





 Date: Wed, 8 May 2013 02:07:59 -0700

 From: [hidden email]

 To: [hidden email]

 Subject: Re: java.lang.NoClassDefFoundError exception loading a rest endPoint 
 in particular condition







   I've done a quick local test:





 @Test



   public void testProxy() throws Exception {



   IModel model =



 JAXRSClientFactory.create(http://localhost:8080;, IModel.class);



   assertNotNull(model);



   model.getJsonGenericCommandDescriptor(new



 GenCmdDescr(description));



   }





 This throws HTTP level exception as expected, as no endpoint is



 listening. The proxy is created OK. The only thing I had to remove



 IPublishable from my example as you did not provide any source for it





 I suspect some of your dependencies affecting the proxy generation.





 Cheers, Sergey





 On 08/05/13 07:16, eanbiso wrote:



 Good morning,



 the GenCmdDescr code is a class like this:







 import javax.xml.bind.annotation.XmlAttribute;



 import javax.xml.bind.annotation.XmlRootElement;



 import javax.xml.bind.annotation.XmlAccessorType;



 import javax.xml.bind.annotation.XmlAccessType;







 @XmlRootElement(name=GenCmdDescr, namespace=http://***/;)



 @XmlAccessorType(XmlAccessType.FIELD)



 public class GenCmdDescr {







   @XmlAttribute private String name;



   @XmlAttribute private int profileId;



   @XmlAttribute private int objIdHigh;



   @XmlAttribute private int objIdLow;



   @XmlAttribute private short protType;







   public GenCmdDescr(){};







   public GenCmdDescr(String name, short protType, int profileId, int 
 objIdHigh, int objIdLow) {



   super();



   this.name = name;



   this.profileId = profileId;



   this.objIdHigh = objIdHigh;



   this.objIdLow = objIdLow;



   this.protType = protType;



   }







   public String getName() {



   return this.name;



   }



   public void setName(String name) {



   this.name = name;



   }



   public int getProfileId() {



   return profileId;



   }



   public void setProfileId(int profileId) {



   this.profileId = profileId;



   }



   public int getObjIdHigh() {



   return objIdHigh;



   }



   public void setObjIdHigh(int objIdHigh) {



   this.objIdHigh = objIdHigh;



   }



   public int getObjIdLow() {



   return objIdLow;



   }



   public void setObjIdLow(int objIdLow) {



   this.objIdLow = objIdLow;



   }



   public short getProtType() {



   return protType;



   }



   public void setProtType(short protType) {



   this.protType = protType;



   }



 }







 while the ws interface is similar to this (I have reported only the method 
 with problems):







 @WebService(targetNamespace = )



 public interface IModel extends IPublishable {







   @CxfWSAuthorization(group=***, roles={***})



   @GET



   @Consumes({MediaType.APPLICATION_XML})



   @Path(/getJsonGenericCommandDescriptor/{genericCommand})



   public String getJsonGenericCommandDescriptor(



   @WebParam(name = genericCommand) 
 @PathParam(genericCommand) GenCmdDescr genericCommand) throws 
 InstantiationException;







 }











 Andrea







 Date: Tue, 7 May 2013 09:45:46 -0700



 From: [hidden email]



 To: [hidden email]



 Subject: Re: java.lang.NoClassDefFoundError exception loading a rest 
 endPoint in particular condition















  Can you give me a favor and attach an interface and GenCmdDescr source







 to JIRA ? Or nabble ? I'll give it a try



Re: REST sample works with CXF 2.6.2 but not CXF 2.7.4...

2013-05-08 Thread Sergey Beryozkin
Glen, the last example does not work because the 3rd test expects the 
exception message contain the name of exception class removed from CXF 
2.7.x, instead of CXF specific ClientWebApplicationException a JAX-RS 
m10 ClientException is returned. Note, in the latest 2.0 API that will 
become ProcessingException


Cheers, Sergey

On 07/05/13 22:46, Sergey Beryozkin wrote:

Hi Glen
On 07/05/13 12:47, Glen Mazza wrote:

Hi Sergey, one out of three samples fixed:

On 05/05/2013 02:46 PM, Sergey Beryozkin wrote:

Hi Glen

On 04/05/13 02:18, Glen Mazza wrote:


https-server-glassfish
(http://people.apache.org/~gmazza/restexamples/https-server-glassfish):


It is related to the previous issue but the problem is coming from a
different 'direction'. In this case you 1.1 JAX-RS API loaded so what
happens is that CXF, when it tries to copy the 'foreign' Response,
invokes on 2.0 Response.getHeaders method which is not available in
1.1 API,
See
http://jax-rs-spec.java.net/nonav/2.0-SNAPSHOT/apidocs/javax/ws/rs/core/Response.html


It has a nearly deprecated getMetadata() method available from 1.1 API
and new getHeaders method.
I'm updating CXF to use an older method to have such cases supported.



This one works fine now on CXF 2.7.6-SNAPSHOT.


Cool,





---
jsonp example
(http://people.apache.org/~gmazza/restexamples/jsonp.html):
After deploying via mvn clean compile exec:java, the last cURL
statement in the above HTML:

2.7.5-SNAPSHOT returns this error:
gmazza@gmazza-work:/media/work1/jersey-samples-on-cxf/jsonp$ curl
-HAccept:application/x+javascript
http://localhost:9998/jsonp/changes?_jsonp=myCallback
myCallback(No message body writer has been found for response class
LinkedList.)


In CXF 2.7.5 the refactoring has been made which exposed some issues
with JSONP setups (I recall I had to do something similar in our
system tests), looks like in this case you have
https://github.com/gmazza/jersey-samples-on-cxf/blob/master/jsonp/src/main/java/com/sun/jersey/samples/jsonp/Main.java



JSONP in interceptors 'accepting' application/json, but it needs to
match application/x+javascript, the actual value of HTTP Accept



No luck. I checked in the change to the Main method given above and
tried with CXF 2.7.6-SNAPSHOT, but the same error occurs.



2.6.7 works:
gmazza@gmazza-work:/media/work1/jersey-samples-on-cxf/jsonp$ curl
-HAccept:application/x+javascript
http://localhost:9998/jsonp/changes?_jsonp=myCallback
myCallback([{madeByAdmin:false,linesChanged:2,logMessage:title
\User Guide\
updated},{madeByAdmin:true,linesChanged:1,logMessage:fixed
metadata},{madeByAdmin:false,linesChanged:91,logMessage:added
index},{madeByAdmin:false,linesChanged:650,logMessage:\Troubleshoothing\


chapter},{madeByAdmin:false,linesChanged:1,logMessage:fixing
typo}]);gmazza@gmazza-work:/media/work1/jersey-samples-on-cxf/jsonp$
---


Ok, I've looked into it closer. The reason it did not work with CXF
2.7.6 was that Jackson provider is not typed to support
application/x+javascript. Setting application/json on JSONP in
interceptor is needed to get the runtime successfully selecting the
Jackson provider, however in CXF 2.7.6 the way the response type is
handled has changed (in the better way), so what happened was that JSONP
out pre-stream interceptor was actually setting

application/x+javascript (so that a proper response type is returned),
but it does it too early actually though that worked in CXF 2.6.7 as
this type was not affecting the selection of MBW.

Basically, if you update your example to set a mediaType property on the
out stream interceptor as application/json the example will start
working, but that will return application/json content type to the
browser.

I've just added JAX-RS 2.0 out filter which should be used from now on,
it will set a response content type after Jackson has been selected but
before it is actually invoked, in the end resulting in a proper content
type returned too, so remove

bean.getOutInterceptors().add(new JsonpPreStreamInterceptor());

and add

providerList.add(new
org.apache.cxf.jaxrs.provider.jsonp.JsonpJaxrsWriterInterceptor());

It is a long story :-), but it has become better. And IMHO is still
cleaner than using JSONPadding objects within the application code





https-clientserver-grizzly example
(http://people.apache.org/~gmazza/restexamples/https-clientserver-grizzly)


just need to run mvn clean test

2.6.7 works:
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

2.7.5-SNAPSHOT fails:
Tests run: 3, Failures: 1, Errors: 1, Skipped: 0

Failed tests:
testSSLAuth1(com.sun.jersey.samples.https_grizzly.MainTest)
testSSLAuth1(com.sun.jersey.samples.https_grizzly.MainTest) Time
elapsed: 0.99 sec  FAILURE!
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at
com.sun.jersey.samples.https_grizzly.MainTest.testSSLAuth1(MainTest.java:124)



at 

Re: Problem with UsernameToken

2013-05-08 Thread Nidhi Sharma
Hi,

To make it work I installed jboss-ep-ws-cxf-5.1.0 installer and downgrade
the cxf version to 2.2.12-patch02.
Now as per our undersatnding we need not to include cxf related jars in EAR
deployment So I removed these jars from my EAR and deployed to jboss but on
deployment its giving error as its not able to find imported class path
resource [META-INF/cxf/cxf.xml] specified in cxf.xml...

Any idea on this...will be great help.

Nidhi



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Problem-with-UsernameToken-tp5726788p5727437.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: [Java] JAX-RS with CXF

2013-05-08 Thread Sergey Beryozkin

Hi


Redirecting to the users list,
Thanks for reporting the issue

This NPE has been fixed starting from CXF 2.7.4, or, without the update: 
remove WS-Discovery libs from the CXF distro


Please update and give it a try

Thanks, Sergey

On 08/05/13 16:09, ced_benoit wrote:

Hi,

I wanted a simple webservice JAX-RS and i follow this exemple on url:

http://www.javatips.net/blog/2012/10...without-spring

I developped this webservice in Eclipse and when I run the server, i have
this error:

Code :Sélectionner tout - Visualiser dans une fenêtre à
part123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
INFO: Server startup in 6968 ms
mai 08, 2013 2:39:37 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /
mai 08, 2013 2:39:38 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service
{http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01}Discovery from WSDL:
classpath:/org/apache/cxf/ws/discovery/wsdl/wsdd-discovery-1.1-wsdl-os.wsdl
mai 08, 2013 2:39:38 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be
soap.udp://239.255.255.250:3702
mai 08, 2013 2:39:38 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
org.apache.cxf.service.factory.ServiceConstructionException
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:201)
at
org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.init(CXFNonSpringJaxrsServlet.java:140)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at
org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl.serverStarted(WSDiscoveryServiceImpl.java:126)
at
org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:72)
at
org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:192)
... 19 more

mai 08, 2013 2:39:38 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Exception lors de l'allocation pour la servlet CXF Servlet
java.lang.NullPointerException
at
org.apache.cxf.ws.discovery.internal.WSDiscoveryServiceImpl.serverStarted(WSDiscoveryServiceImpl.java:126)
at
org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSDiscoveryServerListener.java:72)
at
org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCycleManagerImpl.java:61)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:192)
at
org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.init(CXFNonSpringJaxrsServlet.java:140)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
at

Re: Problems with http conduit declared in OSGi spring configuration

2013-05-08 Thread geecxf
Dan, as you suggested, I put various break points in
org.apache.cxf.configuration.spring.ConfigurerImpl. What I discovered is
that if I put my cxf HTTPConduit definitions in the main spring
configuration, when configureBean() is called the application context is in
a different bundle than expected.

To make the scenario more concrete lets say that I have two bundles:
1. A producer bundle that creates a cxf bus for the purpose of hosting web
services that are registered with our platform.
2. A consumer bundle (at a higher run level) that launches clients which
consume services that the producer bundle manages.

What is happening is that when configureBean() is called for HTTPConduits
that are declared in the spring configuration file of the consumer bundle
the application context is the producer bundle.

However, if I modify the consumer bundle to load the configuration from a
separate configuration file in a bundle and application context aware class
like so:

String[] configs = new String[]
{
classpath:META-INF/spring/cxf-context.xml //$NON-NLS-1$
};
OsgiBundleXmlApplicationContext appContext = new
OsgiBundleXmlApplicationContext(configs,
AuthConsumer.applicationContext);
appContext.setBundleContext(AuthConsumer.bundleContext);
appContext.refresh();

Then whenever configureBean() is called the application context is in the
consumer bundle as expected.

I hope I am making myself clear since this is confusing to explain. I also
hope it helps explain what is going on well enough that you or someone else
can think of some ways why this is happening and how to get around them.





--
View this message in context: 
http://cxf.547215.n5.nabble.com/Problems-with-http-conduit-declared-in-OSGi-spring-configuration-tp5727009p5727445.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Customize JAXB unmarshalling error messages

2013-05-08 Thread balellu
Giving this a bump.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Customize-JAXB-unmarshalling-error-messages-tp5727021p5727446.html
Sent from the cxf-user mailing list archive at Nabble.com.