I've maybe found a quicker way to handle it.
I have set this:
SpringBusFactory factory = new SpringBusFactory();
Bus bus = factory.createBus("server-bean.xml");
factory.setDefaultBus(bus)
this.endPoint = (EndpointImpl)
Endpoint.publish(endpointAddress, implementor);
and for my server-bean.xml I'm trying to use this:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xsi:schemaLocation="http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/transports/http-jetty/configuration
http://cxf.apache.org/schemas/configuration/http-jetty.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<httpj:engine-factory bus="cxf">
<httpj:engine port="9001">
<httpj:tlsServerParametersRef id="secure" />
<httpj:threadingParameters minThreads="5"
maxThreads="15" />
<httpj:connector>
<beans:bean class="org.mortbay.jetty.bio.SocketConnector">
<beans:property name = "port" value="9001" />
</beans:bean>
</httpj:connector>
<httpj:handlers>
<beans:bean class="org.mortbay.jetty.handler.DefaultHandler">
<beans:property name = "resourceBase" value = "/Users/bertuz" />
</beans:bean>
</httpj:handlers>
<httpj:sessionSupport>true</httpj:sessionSupport>
</httpj:engine>
</httpj:engine-factory>
</beans>
the problem is that I obtain this error when I run the code:
15:02:04,172 FATAL [hcim.w3c.wet.service.Server] An error occoured
while publishing the SOAP service:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory':
Cannot create inner bean 'httpj:engine#2ad3eec2' of type
[org.apache.cxf.transport.http_jetty.spring.JettyHTTPServerEngineBeanDefinitionParser$SpringJettyHTTPServerEngine]
while setting bean property 'enginesList' with key [0]; nested
exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'httpj:engine#2ad3eec2': Cannot create
inner bean 'org.mortbay.jetty.bio.SocketConnector#4677bcd5' of type
[org.mortbay.jetty.bio.SocketConnector] while setting bean property
'connector'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.mortbay.jetty.bio.SocketConnector] for bean with name
'org.mortbay.jetty.bio.SocketConnector#4677bcd5' defined in file
[/Users/bertuz/Dropbox/lavoro/progetti/web-evaluator-tool/out/server-bean.xml];
nested exception is java.lang.ClassNotFoundException:
org.mortbay.jetty.bio.SocketConnector
that sounds very strange to me! Every guide on cxf refers to that
class in the examples!
Matteo
On 6 May 2011 21:33, Benson Margulies [via CXF]
<[email protected]> wrote:
> The Jetty server object can be obtained from the endpoint, I've done
> it. It will take me some time to rummage up the prescription.
>
> On Fri, May 6, 2011 at 3:31 PM, bertuz <[hidden email]> wrote:
>> Hi Sergey,
>> thanks for replying. I've had a look to the page you linked but to be
>> honest
>> it did not help me so much.
>> I'm using cxf 2.3.1 and according to the javadoc
>>
>>
>> http://cxf.apache.org/javadoc/latest-2.3.x/org/apache/cxf/transport/http_jetty/package-summary.html
>>
>> the only handler available is JettyHTTPHandler. So, I suppose I should
>> modify that one, setting the resourceBase and it should be done. But I
>> don't
>> have a clue how to obtain the handler that cxf sets.
>>
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/static-pages-with-embedded-jetty-Where-can-I-find-better-doc-tp4373909p4376901.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://cxf.547215.n5.nabble.com/static-pages-with-embedded-jetty-Where-can-I-find-better-doc-tp4373909p4377065.html
> To unsubscribe from static pages with embedded jetty. Where can I find
> better doc?, click here.
--
View this message in context:
http://cxf.547215.n5.nabble.com/static-pages-with-embedded-jetty-Where-can-I-find-better-doc-tp4373909p4381953.html
Sent from the cxf-user mailing list archive at Nabble.com.