You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Piotr \"PiBis\" Berłowski" <pb...@forcom.com.pl> on 2009/03/20 17:20:43 UTC
CXF + embedded Jetty +Spring
Hi all,
I have encountered numerous posts stating problems with ebedded
jetty config with CXF and Spring, but no clear roadmap has been provided
as what it should look like. The documentation concerning Jetty
configuration is also very limited. Thus I decided to ask my question here:
I wish to configure my jetty server and my endpoints in a Spring cxf.xml
file.
I'd like my launcher app to be provided ONLY with information where that
config file may be found.
I wish to be able to run java -jar LauncherApp.jar and obtain a running
instance of jetty server with my CXF webservice.
Is it possible, and if yes, then how?
I was trying different setups with SpringBusFactory,
JettyHTTPServerEngineFactory and others to no avail. I'd be very
grateful for a clear roadmap explaining this scenario.
Best regards,
Piotr Berlowski
Re: AW: AW: CXF + embedded Jetty +Spring
Posted by "Piotr \"PiBis\" Berłowski" <pb...@forcom.com.pl>.
Hello again,
Ahhhh, so that's what I was missing. Automatically created
singletons on spring context load. That seems to be of great help to me.
If i get it running, I'll post a full solution.
Best regards,
Piotr.
> Hi Piotr,
>
> Well then I'll just give you ALL OF MY CODE for this task ;-)
>
>
> package de.upw.tiller.pgm.ws;
>
> import org.springframework.context.support.ClassPathXmlApplicationContext;
>
> public
> class PgmServer
> {
> protected PgmServer()
> throws Exception
> {
> // Initialize the spring context
> System.out.println("Initializing Spring context ...");
> String[] configs = { "ws-context.xml" };
> new ClassPathXmlApplicationContext(configs);
> System.out.println("Service Started.");
> }
>
> public static
> void main(String args[])
> throws Exception
> {
> new PgmServer();
> System.out.println("Server ready...");
> }
>
> }
>
>
>
>
> Chris
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: "Piotr \"PiBis\" Berłowski" [mailto:pberlowski@forcom.com.pl]
> Gesendet: Freitag, 20. März 2009 18:04
> An: users@cxf.apache.org
> Betreff: Re: AW: CXF + embedded Jetty +Spring
>
> Hi Christofer,
>
> Thanks for your quick reply. I have scanned the document that you
> provided. It's a great job, but, to my regret, it misses my main point
> of interest which is configuration and launching of embedded Jetty
> server. Also you decided on Aegis databinding whereas I am set on JAX-WS.
>
> Best regards,
> Piotr Berlowski
>
>> Hi Piotr,
>>
>> I have had the same problems as you are having. Most of them, I had to
>>
> find
>
>> out by digging into the source code.
>> Because I usually tend to forget, what I did after a few weeks, I wrote a
>> howto:
>>
>>
> http://dev.c-ware.de/confluence/display/PUBLIC/Seting+up+Flex+to+communicate
>
>> +with+Apache+CXF+web+service+using+Aegis+databinding
>>
>> It deals with CXF + Aegis binding, and how you setup and configure CXF in
>>
> a
>
>> Spring environment.
>> I doubt it will answer all your questions, but I guess it will get you
>> started :-)
>>
>> After migrating to CXF 2.2 today I will have to update some portions of
>>
> the
>
>> tutorial ... maybe I'll do that sometime this evening.
>>
>> Hope it helps,
>> Chris
>>
>> Hi all,
>>
>> I have encountered numerous posts stating problems with ebedded
>> jetty config with CXF and Spring, but no clear roadmap has been provided
>> as what it should look like. The documentation concerning Jetty
>> configuration is also very limited. Thus I decided to ask my question
>>
> here:
>
>> I wish to configure my jetty server and my endpoints in a Spring cxf.xml
>> file.
>> I'd like my launcher app to be provided ONLY with information where that
>> config file may be found.
>> I wish to be able to run java -jar LauncherApp.jar and obtain a running
>> instance of jetty server with my CXF webservice.
>>
>> Is it possible, and if yes, then how?
>>
>> I was trying different setups with SpringBusFactory,
>> JettyHTTPServerEngineFactory and others to no avail. I'd be very
>> grateful for a clear roadmap explaining this scenario.
>>
>> Best regards,
>> Piotr Berlowski
>>
>>
>>
>>
>
>
>
> __________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3951
> (20090320) __________
>
> E-Mail wurde geprüft mit ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> __________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3951
> (20090320) __________
>
> E-Mail wurde geprüft mit ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>
AW: AW: CXF + embedded Jetty +Spring
Posted by Christofer Dutz <c....@upw.de>.
Hi Piotr,
Well then I'll just give you ALL OF MY CODE for this task ;-)
package de.upw.tiller.pgm.ws;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public
class PgmServer
{
protected PgmServer()
throws Exception
{
// Initialize the spring context
System.out.println("Initializing Spring context ...");
String[] configs = { "ws-context.xml" };
new ClassPathXmlApplicationContext(configs);
System.out.println("Service Started.");
}
public static
void main(String args[])
throws Exception
{
new PgmServer();
System.out.println("Server ready...");
}
}
Chris
-----Ursprüngliche Nachricht-----
Von: "Piotr \"PiBis\" Berłowski" [mailto:pberlowski@forcom.com.pl]
Gesendet: Freitag, 20. März 2009 18:04
An: users@cxf.apache.org
Betreff: Re: AW: CXF + embedded Jetty +Spring
Hi Christofer,
Thanks for your quick reply. I have scanned the document that you
provided. It's a great job, but, to my regret, it misses my main point
of interest which is configuration and launching of embedded Jetty
server. Also you decided on Aegis databinding whereas I am set on JAX-WS.
Best regards,
Piotr Berlowski
> Hi Piotr,
>
> I have had the same problems as you are having. Most of them, I had to
find
> out by digging into the source code.
> Because I usually tend to forget, what I did after a few weeks, I wrote a
> howto:
>
http://dev.c-ware.de/confluence/display/PUBLIC/Seting+up+Flex+to+communicate
> +with+Apache+CXF+web+service+using+Aegis+databinding
>
> It deals with CXF + Aegis binding, and how you setup and configure CXF in
a
> Spring environment.
> I doubt it will answer all your questions, but I guess it will get you
> started :-)
>
> After migrating to CXF 2.2 today I will have to update some portions of
the
> tutorial ... maybe I'll do that sometime this evening.
>
> Hope it helps,
> Chris
>
> Hi all,
>
> I have encountered numerous posts stating problems with ebedded
> jetty config with CXF and Spring, but no clear roadmap has been provided
> as what it should look like. The documentation concerning Jetty
> configuration is also very limited. Thus I decided to ask my question
here:
>
> I wish to configure my jetty server and my endpoints in a Spring cxf.xml
> file.
> I'd like my launcher app to be provided ONLY with information where that
> config file may be found.
> I wish to be able to run java -jar LauncherApp.jar and obtain a running
> instance of jetty server with my CXF webservice.
>
> Is it possible, and if yes, then how?
>
> I was trying different setups with SpringBusFactory,
> JettyHTTPServerEngineFactory and others to no avail. I'd be very
> grateful for a clear roadmap explaining this scenario.
>
> Best regards,
> Piotr Berlowski
>
>
>
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3951
(20090320) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3951
(20090320) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
Re: AW: CXF + embedded Jetty +Spring
Posted by "Piotr \"PiBis\" Berłowski" <pb...@forcom.com.pl>.
Hi Christofer,
Thanks for your quick reply. I have scanned the document that you
provided. It's a great job, but, to my regret, it misses my main point
of interest which is configuration and launching of embedded Jetty
server. Also you decided on Aegis databinding whereas I am set on JAX-WS.
Best regards,
Piotr Berlowski
> Hi Piotr,
>
> I have had the same problems as you are having. Most of them, I had to find
> out by digging into the source code.
> Because I usually tend to forget, what I did after a few weeks, I wrote a
> howto:
> http://dev.c-ware.de/confluence/display/PUBLIC/Seting+up+Flex+to+communicate
> +with+Apache+CXF+web+service+using+Aegis+databinding
>
> It deals with CXF + Aegis binding, and how you setup and configure CXF in a
> Spring environment.
> I doubt it will answer all your questions, but I guess it will get you
> started :-)
>
> After migrating to CXF 2.2 today I will have to update some portions of the
> tutorial ... maybe I'll do that sometime this evening.
>
> Hope it helps,
> Chris
>
> Hi all,
>
> I have encountered numerous posts stating problems with ebedded
> jetty config with CXF and Spring, but no clear roadmap has been provided
> as what it should look like. The documentation concerning Jetty
> configuration is also very limited. Thus I decided to ask my question here:
>
> I wish to configure my jetty server and my endpoints in a Spring cxf.xml
> file.
> I'd like my launcher app to be provided ONLY with information where that
> config file may be found.
> I wish to be able to run java -jar LauncherApp.jar and obtain a running
> instance of jetty server with my CXF webservice.
>
> Is it possible, and if yes, then how?
>
> I was trying different setups with SpringBusFactory,
> JettyHTTPServerEngineFactory and others to no avail. I'd be very
> grateful for a clear roadmap explaining this scenario.
>
> Best regards,
> Piotr Berlowski
>
>
>
AW: CXF + embedded Jetty +Spring
Posted by Christofer Dutz <c....@upw.de>.
Hi Piotr,
I have had the same problems as you are having. Most of them, I had to find
out by digging into the source code.
Because I usually tend to forget, what I did after a few weeks, I wrote a
howto:
http://dev.c-ware.de/confluence/display/PUBLIC/Seting+up+Flex+to+communicate
+with+Apache+CXF+web+service+using+Aegis+databinding
It deals with CXF + Aegis binding, and how you setup and configure CXF in a
Spring environment.
I doubt it will answer all your questions, but I guess it will get you
started :-)
After migrating to CXF 2.2 today I will have to update some portions of the
tutorial ... maybe I'll do that sometime this evening.
Hope it helps,
Chris
-----Ursprüngliche Nachricht-----
Von: "Piotr \"PiBis\" Berłowski" [mailto:pberlowski@forcom.com.pl]
Gesendet: Freitag, 20. März 2009 17:21
An: users@cxf.apache.org
Betreff: CXF + embedded Jetty +Spring
Hi all,
I have encountered numerous posts stating problems with ebedded
jetty config with CXF and Spring, but no clear roadmap has been provided
as what it should look like. The documentation concerning Jetty
configuration is also very limited. Thus I decided to ask my question here:
I wish to configure my jetty server and my endpoints in a Spring cxf.xml
file.
I'd like my launcher app to be provided ONLY with information where that
config file may be found.
I wish to be able to run java -jar LauncherApp.jar and obtain a running
instance of jetty server with my CXF webservice.
Is it possible, and if yes, then how?
I was trying different setups with SpringBusFactory,
JettyHTTPServerEngineFactory and others to no avail. I'd be very
grateful for a clear roadmap explaining this scenario.
Best regards,
Piotr Berlowski
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3951
(20090320) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3951
(20090320) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com