You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by -wil- <wi...@gmail.com> on 2009/02/06 10:55:21 UTC

(newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

hi,

(i'm relatively new to CXF (which i find great (so far)).

My case:
I'd like to avoid generating the (dynamic proxied) Service- and
SEI-implementation at runtime.
The reason is that i can't maintain the object references in the calling
client. 

This is my setup:
(actually almost the same as the Hello World example at:
http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html, "WSDL2Java
generated Client")

- i have a WDSL (url) provides by one of our clients (so, i don't own it,
and hence cannot change it)
- i used CXF's wsdl2java to generate the necessary stubs en client code.
This is the command:
   <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
<my_target_dir> clientx.wsdl
- service (a Service subclass), porttype(-interface) and a specific client
is generated, which is great.
- i then use the Client which works fine ...

But (of course) a dynamic proxy is created every time which takes a lot of
time (including a bunch of HTTP GET's for getting WSDL and related XSD's).
The service has a bunch of operations, but i only call 1 operation at a
time. Actually executing the operation takes about 20% of the time,
generating the dynamic client stuff 80%. 

The WSDL is pretty static, so it would be nice to generate the 80% client
stuff (, package it in a jar) and use that code directly for within the
client at runtime.

I know i can do it with apache axis2, but i like CXF so far, so please keep
me on that path :-)

TIA!



 
-- 
View this message in context: http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21869541.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AW: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by -wil- <wi...@gmail.com>.
I'll check that one out. thx Andrew.


Andrew Clegg-2 wrote:
> 
> Admittedly I'm more of a server-side guy, but when I had a go at
> building a client following Glen's excellent tutorial here:
> 
> http://www.jroller.com/gmazza/entry/creating_a_wsdl_first_web1
> 
> I'm 99.99% sure all the proxy interfaces and classes were generated at
> build time. Try following that guide through from the start, that's
> probably what you're after...
> 
> Andrew.
> 
> 2009/2/9 -wil- <wi...@gmail.com>:
>>
>> hi Anne,
>>
>> Thx for your answer.
>> But with your approach the problem remains the same: the proxies will
>> still
>> get dynamically generated at-runtime. And that is what i want to avoid by
>> generating (and packaging) the proxy code at development time.
>>
>> g
>> -wil-
>>
>>
>>
>> Diefenbach Anne wrote:
>>>
>>> Hi,
>>>
>>> unless I am totally misunderstanding something, it sounds like you can
>>> just package your classes as a JAR and deploy the client like that. I
>>> did
>>> something similar, and I just took my classes, stuffed them in the JAR
>>> and
>>> called my client like this:
>>>
>>> java -cp
>>> .:myCXFConsumer.jar:${CXF_HOME}/lib/saaj-impl-1.3.jar:${CXF_HOME}/lib/wsdl4j-1.6.2.jar:${CXF_HOME}/lib/wstx-asl-3.2.6.jar:${CXF_HOME}/lib/xml-resolver-1.2.jar:${CXF_HOME}/lib/XmlSchema-1.4.2.jar:${CXF_HOME}/lib/asm-2.2.3.jar:${CXF_HOME}/lib/commons-logging-1.1.1.jar:${CXF_HOME}/lib/cxf-2.1.3.jar:${CXF_HOME}/lib/geronimo-activation_1.1_spec-1.0.2.jar:${CXF_HOME}/lib/geronimo-annotation_1.0_spec-1.1.1.jar:${CXF_HOME}/lib/geronimo-javamail_1.4_spec-1.3.jar:${CXF_HOME}/lib/geronimo-jaxws_2.1_spec-1.0.jar:${CXF_HOME}/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:${CXF_HOME}/lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar:${CXF_HOME}/lib/jaxb-api-2.1.jar:${CXF_HOME}/lib/jaxb-impl-2.1.7.jar:${CXF_HOME}/lib/neethi-2.0.4.jar:${CXF_HOME}/lib/saaj-api-1.3.jar:${CXF_HOME}/lib/cxf-manifest.jar:${CXF_HOME}/lib/xalan-2.7.1.jar:${CXF_HOME}/lib/xmlsec-1.4.0.jar:${CXF_HOME}/lib/bcprov-jdk15-140.jar:${CXF_HOME}/lib/serializer-2.7.1.jar:${CXF_HOME}/lib/wss4j-1.5.4.jar
>>> package.myClient
>>>
>>> Hope this helps,
>>> Anne
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: -wil- [mailto:wil.atlas@gmail.com]
>>> Gesendet: Freitag, 6. Februar 2009 10:55
>>> An: users@cxf.apache.org
>>> Betreff: (newbie & urgent !) i'd like to avoid generating the Service-
>>> and
>>> SEI-implementation at runtime
>>>
>>>
>>> hi,
>>>
>>> (i'm relatively new to CXF (which i find great (so far)).
>>>
>>> My case:
>>> I'd like to avoid generating the (dynamic proxied) Service- and
>>> SEI-implementation at runtime.
>>> The reason is that i can't maintain the object references in the calling
>>> client.
>>>
>>> This is my setup:
>>> (actually almost the same as the Hello World example at:
>>> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html,
>>> "WSDL2Java
>>> generated Client")
>>>
>>> - i have a WDSL (url) provides by one of our clients (so, i don't own
>>> it,
>>> and hence cannot change it)
>>> - i used CXF's wsdl2java to generate the necessary stubs en client code.
>>> This is the command:
>>>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
>>> <my_target_dir> clientx.wsdl
>>> - service (a Service subclass), porttype(-interface) and a specific
>>> client
>>> is generated, which is great.
>>> - i then use the Client which works fine ...
>>>
>>> But (of course) a dynamic proxy is created every time which takes a lot
>>> of
>>> time (including a bunch of HTTP GET's for getting WSDL and related
>>> XSD's).
>>> The service has a bunch of operations, but i only call 1 operation at a
>>> time. Actually executing the operation takes about 20% of the time,
>>> generating the dynamic client stuff 80%.
>>>
>>> The WSDL is pretty static, so it would be nice to generate the 80%
>>> client
>>> stuff (, package it in a jar) and use that code directly for within the
>>> client at runtime.
>>>
>>> I know i can do it with apache axis2, but i like CXF so far, so please
>>> keep
>>> me on that path :-)
>>>
>>> TIA!
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21869541.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21909035.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> :: http://biotext.org.uk/ ::
> 
> 

-- 
View this message in context: http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21911195.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AW: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by Andrew Clegg <an...@nervechannel.com>.
Admittedly I'm more of a server-side guy, but when I had a go at
building a client following Glen's excellent tutorial here:

http://www.jroller.com/gmazza/entry/creating_a_wsdl_first_web1

I'm 99.99% sure all the proxy interfaces and classes were generated at
build time. Try following that guide through from the start, that's
probably what you're after...

Andrew.

2009/2/9 -wil- <wi...@gmail.com>:
>
> hi Anne,
>
> Thx for your answer.
> But with your approach the problem remains the same: the proxies will still
> get dynamically generated at-runtime. And that is what i want to avoid by
> generating (and packaging) the proxy code at development time.
>
> g
> -wil-
>
>
>
> Diefenbach Anne wrote:
>>
>> Hi,
>>
>> unless I am totally misunderstanding something, it sounds like you can
>> just package your classes as a JAR and deploy the client like that. I did
>> something similar, and I just took my classes, stuffed them in the JAR and
>> called my client like this:
>>
>> java -cp
>> .:myCXFConsumer.jar:${CXF_HOME}/lib/saaj-impl-1.3.jar:${CXF_HOME}/lib/wsdl4j-1.6.2.jar:${CXF_HOME}/lib/wstx-asl-3.2.6.jar:${CXF_HOME}/lib/xml-resolver-1.2.jar:${CXF_HOME}/lib/XmlSchema-1.4.2.jar:${CXF_HOME}/lib/asm-2.2.3.jar:${CXF_HOME}/lib/commons-logging-1.1.1.jar:${CXF_HOME}/lib/cxf-2.1.3.jar:${CXF_HOME}/lib/geronimo-activation_1.1_spec-1.0.2.jar:${CXF_HOME}/lib/geronimo-annotation_1.0_spec-1.1.1.jar:${CXF_HOME}/lib/geronimo-javamail_1.4_spec-1.3.jar:${CXF_HOME}/lib/geronimo-jaxws_2.1_spec-1.0.jar:${CXF_HOME}/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:${CXF_HOME}/lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar:${CXF_HOME}/lib/jaxb-api-2.1.jar:${CXF_HOME}/lib/jaxb-impl-2.1.7.jar:${CXF_HOME}/lib/neethi-2.0.4.jar:${CXF_HOME}/lib/saaj-api-1.3.jar:${CXF_HOME}/lib/cxf-manifest.jar:${CXF_HOME}/lib/xalan-2.7.1.jar:${CXF_HOME}/lib/xmlsec-1.4.0.jar:${CXF_HOME}/lib/bcprov-jdk15-140.jar:${CXF_HOME}/lib/serializer-2.7.1.jar:${CXF_HOME}/lib/wss4j-1.5.4.jar
>> package.myClient
>>
>> Hope this helps,
>> Anne
>>
>> -----Ursprüngliche Nachricht-----
>> Von: -wil- [mailto:wil.atlas@gmail.com]
>> Gesendet: Freitag, 6. Februar 2009 10:55
>> An: users@cxf.apache.org
>> Betreff: (newbie & urgent !) i'd like to avoid generating the Service- and
>> SEI-implementation at runtime
>>
>>
>> hi,
>>
>> (i'm relatively new to CXF (which i find great (so far)).
>>
>> My case:
>> I'd like to avoid generating the (dynamic proxied) Service- and
>> SEI-implementation at runtime.
>> The reason is that i can't maintain the object references in the calling
>> client.
>>
>> This is my setup:
>> (actually almost the same as the Hello World example at:
>> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html,
>> "WSDL2Java
>> generated Client")
>>
>> - i have a WDSL (url) provides by one of our clients (so, i don't own it,
>> and hence cannot change it)
>> - i used CXF's wsdl2java to generate the necessary stubs en client code.
>> This is the command:
>>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
>> <my_target_dir> clientx.wsdl
>> - service (a Service subclass), porttype(-interface) and a specific client
>> is generated, which is great.
>> - i then use the Client which works fine ...
>>
>> But (of course) a dynamic proxy is created every time which takes a lot of
>> time (including a bunch of HTTP GET's for getting WSDL and related XSD's).
>> The service has a bunch of operations, but i only call 1 operation at a
>> time. Actually executing the operation takes about 20% of the time,
>> generating the dynamic client stuff 80%.
>>
>> The WSDL is pretty static, so it would be nice to generate the 80% client
>> stuff (, package it in a jar) and use that code directly for within the
>> client at runtime.
>>
>> I know i can do it with apache axis2, but i like CXF so far, so please
>> keep
>> me on that path :-)
>>
>> TIA!
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21869541.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21909035.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>



-- 
:: http://biotext.org.uk/ ::

Re: AW: AW: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by -wil- <wi...@gmail.com>.
Hi Anne,

thx for clearing that out. 
Your answer was helpfull actually but i allready did that stuff and it works
fine.
As i said in my first email, i simply want to avoid at-runtime
proxy-implementation code generation.

g



Diefenbach Anne wrote:
> 
> Hi wil,
> 
> I'm still pretty new to all of this too, so maybe I didn't quite
> understand your problem. I assumed that your "proxy code" was the service
> interface, and that you wanted to avoid calling wsdl2java every time. In
> this case, generating everything once, putting it in a JAR and deleting
> the wsdl2java call (wherever you have it) should work. But that's not your
> question?
> 
> Regards,
> Anne
> 
> -----Ursprüngliche Nachricht-----
> Von: -wil- [mailto:wil.atlas@gmail.com] 
> Gesendet: Montag, 9. Februar 2009 09:50
> An: users@cxf.apache.org
> Betreff: Re: AW: (newbie & urgent !) i'd like to avoid generating the
> Service- and SEI-implementation at runtime
> 
> 
> hi Anne,
> 
> Thx for your answer.
> But with your approach the problem remains the same: the proxies will
> still
> get dynamically generated at-runtime. And that is what i want to avoid by
> generating (and packaging) the proxy code at development time.
> 
> g
> -wil-
> 
> 
> 
> Diefenbach Anne wrote:
>> 
>> Hi,
>> 
>> unless I am totally misunderstanding something, it sounds like you can
>> just package your classes as a JAR and deploy the client like that. I did
>> something similar, and I just took my classes, stuffed them in the JAR
>> and
>> called my client like this:
>> 
>> java -cp
>> .:myCXFConsumer.jar:${CXF_HOME}/lib/saaj-impl-1.3.jar:${CXF_HOME}/lib/wsdl4j-1.6.2.jar:${CXF_HOME}/lib/wstx-asl-3.2.6.jar:${CXF_HOME}/lib/xml-resolver-1.2.jar:${CXF_HOME}/lib/XmlSchema-1.4.2.jar:${CXF_HOME}/lib/asm-2.2.3.jar:${CXF_HOME}/lib/commons-logging-1.1.1.jar:${CXF_HOME}/lib/cxf-2.1.3.jar:${CXF_HOME}/lib/geronimo-activation_1.1_spec-1.0.2.jar:${CXF_HOME}/lib/geronimo-annotation_1.0_spec-1.1.1.jar:${CXF_HOME}/lib/geronimo-javamail_1.4_spec-1.3.jar:${CXF_HOME}/lib/geronimo-jaxws_2.1_spec-1.0.jar:${CXF_HOME}/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:${CXF_HOME}/lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar:${CXF_HOME}/lib/jaxb-api-2.1.jar:${CXF_HOME}/lib/jaxb-impl-2.1.7.jar:${CXF_HOME}/lib/neethi-2.0.4.jar:${CXF_HOME}/lib/saaj-api-1.3.jar:${CXF_HOME}/lib/cxf-manifest.jar:${CXF_HOME}/lib/xalan-2.7.1.jar:${CXF_HOME}/lib/xmlsec-1.4.0.jar:${CXF_HOME}/lib/bcprov-jdk15-140.jar:${CXF_HOME}/lib/serializer-2.7.1.jar:${CXF_HOME}/lib/wss4j-1.5.4.jar
>> package.myClient
>> 
>> Hope this helps,
>> Anne
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: -wil- [mailto:wil.atlas@gmail.com] 
>> Gesendet: Freitag, 6. Februar 2009 10:55
>> An: users@cxf.apache.org
>> Betreff: (newbie & urgent !) i'd like to avoid generating the Service-
>> and
>> SEI-implementation at runtime
>> 
>> 
>> hi,
>> 
>> (i'm relatively new to CXF (which i find great (so far)).
>> 
>> My case:
>> I'd like to avoid generating the (dynamic proxied) Service- and
>> SEI-implementation at runtime.
>> The reason is that i can't maintain the object references in the calling
>> client. 
>> 
>> This is my setup:
>> (actually almost the same as the Hello World example at:
>> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html,
>> "WSDL2Java
>> generated Client")
>> 
>> - i have a WDSL (url) provides by one of our clients (so, i don't own it,
>> and hence cannot change it)
>> - i used CXF's wsdl2java to generate the necessary stubs en client code.
>> This is the command:
>>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
>> <my_target_dir> clientx.wsdl
>> - service (a Service subclass), porttype(-interface) and a specific
>> client
>> is generated, which is great.
>> - i then use the Client which works fine ...
>> 
>> But (of course) a dynamic proxy is created every time which takes a lot
>> of
>> time (including a bunch of HTTP GET's for getting WSDL and related
>> XSD's).
>> The service has a bunch of operations, but i only call 1 operation at a
>> time. Actually executing the operation takes about 20% of the time,
>> generating the dynamic client stuff 80%. 
>> 
>> The WSDL is pretty static, so it would be nice to generate the 80% client
>> stuff (, package it in a jar) and use that code directly for within the
>> client at runtime.
>> 
>> I know i can do it with apache axis2, but i like CXF so far, so please
>> keep
>> me on that path :-)
>> 
>> TIA!
>> 
>> 
>> 
>>  
>> -- 
>> View this message in context:
>> http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21869541.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21909035.html
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21910752.html
Sent from the cxf-user mailing list archive at Nabble.com.


AW: AW: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by Diefenbach Anne <Di...@fgan.de>.
Hi wil,

I'm still pretty new to all of this too, so maybe I didn't quite understand your problem. I assumed that your "proxy code" was the service interface, and that you wanted to avoid calling wsdl2java every time. In this case, generating everything once, putting it in a JAR and deleting the wsdl2java call (wherever you have it) should work. But that's not your question?

Regards,
Anne

-----Ursprüngliche Nachricht-----
Von: -wil- [mailto:wil.atlas@gmail.com] 
Gesendet: Montag, 9. Februar 2009 09:50
An: users@cxf.apache.org
Betreff: Re: AW: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime


hi Anne,

Thx for your answer.
But with your approach the problem remains the same: the proxies will still
get dynamically generated at-runtime. And that is what i want to avoid by
generating (and packaging) the proxy code at development time.

g
-wil-



Diefenbach Anne wrote:
> 
> Hi,
> 
> unless I am totally misunderstanding something, it sounds like you can
> just package your classes as a JAR and deploy the client like that. I did
> something similar, and I just took my classes, stuffed them in the JAR and
> called my client like this:
> 
> java -cp
> .:myCXFConsumer.jar:${CXF_HOME}/lib/saaj-impl-1.3.jar:${CXF_HOME}/lib/wsdl4j-1.6.2.jar:${CXF_HOME}/lib/wstx-asl-3.2.6.jar:${CXF_HOME}/lib/xml-resolver-1.2.jar:${CXF_HOME}/lib/XmlSchema-1.4.2.jar:${CXF_HOME}/lib/asm-2.2.3.jar:${CXF_HOME}/lib/commons-logging-1.1.1.jar:${CXF_HOME}/lib/cxf-2.1.3.jar:${CXF_HOME}/lib/geronimo-activation_1.1_spec-1.0.2.jar:${CXF_HOME}/lib/geronimo-annotation_1.0_spec-1.1.1.jar:${CXF_HOME}/lib/geronimo-javamail_1.4_spec-1.3.jar:${CXF_HOME}/lib/geronimo-jaxws_2.1_spec-1.0.jar:${CXF_HOME}/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:${CXF_HOME}/lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar:${CXF_HOME}/lib/jaxb-api-2.1.jar:${CXF_HOME}/lib/jaxb-impl-2.1.7.jar:${CXF_HOME}/lib/neethi-2.0.4.jar:${CXF_HOME}/lib/saaj-api-1.3.jar:${CXF_HOME}/lib/cxf-manifest.jar:${CXF_HOME}/lib/xalan-2.7.1.jar:${CXF_HOME}/lib/xmlsec-1.4.0.jar:${CXF_HOME}/lib/bcprov-jdk15-140.jar:${CXF_HOME}/lib/serializer-2.7.1.jar:${CXF_HOME}/lib/wss4j-1.5.4.jar
> package.myClient
> 
> Hope this helps,
> Anne
> 
> -----Ursprüngliche Nachricht-----
> Von: -wil- [mailto:wil.atlas@gmail.com] 
> Gesendet: Freitag, 6. Februar 2009 10:55
> An: users@cxf.apache.org
> Betreff: (newbie & urgent !) i'd like to avoid generating the Service- and
> SEI-implementation at runtime
> 
> 
> hi,
> 
> (i'm relatively new to CXF (which i find great (so far)).
> 
> My case:
> I'd like to avoid generating the (dynamic proxied) Service- and
> SEI-implementation at runtime.
> The reason is that i can't maintain the object references in the calling
> client. 
> 
> This is my setup:
> (actually almost the same as the Hello World example at:
> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html,
> "WSDL2Java
> generated Client")
> 
> - i have a WDSL (url) provides by one of our clients (so, i don't own it,
> and hence cannot change it)
> - i used CXF's wsdl2java to generate the necessary stubs en client code.
> This is the command:
>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
> <my_target_dir> clientx.wsdl
> - service (a Service subclass), porttype(-interface) and a specific client
> is generated, which is great.
> - i then use the Client which works fine ...
> 
> But (of course) a dynamic proxy is created every time which takes a lot of
> time (including a bunch of HTTP GET's for getting WSDL and related XSD's).
> The service has a bunch of operations, but i only call 1 operation at a
> time. Actually executing the operation takes about 20% of the time,
> generating the dynamic client stuff 80%. 
> 
> The WSDL is pretty static, so it would be nice to generate the 80% client
> stuff (, package it in a jar) and use that code directly for within the
> client at runtime.
> 
> I know i can do it with apache axis2, but i like CXF so far, so please
> keep
> me on that path :-)
> 
> TIA!
> 
> 
> 
>  
> -- 
> View this message in context:
> http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21869541.html
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21909035.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AW: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by -wil- <wi...@gmail.com>.
hi Anne,

Thx for your answer.
But with your approach the problem remains the same: the proxies will still
get dynamically generated at-runtime. And that is what i want to avoid by
generating (and packaging) the proxy code at development time.

g
-wil-



Diefenbach Anne wrote:
> 
> Hi,
> 
> unless I am totally misunderstanding something, it sounds like you can
> just package your classes as a JAR and deploy the client like that. I did
> something similar, and I just took my classes, stuffed them in the JAR and
> called my client like this:
> 
> java -cp
> .:myCXFConsumer.jar:${CXF_HOME}/lib/saaj-impl-1.3.jar:${CXF_HOME}/lib/wsdl4j-1.6.2.jar:${CXF_HOME}/lib/wstx-asl-3.2.6.jar:${CXF_HOME}/lib/xml-resolver-1.2.jar:${CXF_HOME}/lib/XmlSchema-1.4.2.jar:${CXF_HOME}/lib/asm-2.2.3.jar:${CXF_HOME}/lib/commons-logging-1.1.1.jar:${CXF_HOME}/lib/cxf-2.1.3.jar:${CXF_HOME}/lib/geronimo-activation_1.1_spec-1.0.2.jar:${CXF_HOME}/lib/geronimo-annotation_1.0_spec-1.1.1.jar:${CXF_HOME}/lib/geronimo-javamail_1.4_spec-1.3.jar:${CXF_HOME}/lib/geronimo-jaxws_2.1_spec-1.0.jar:${CXF_HOME}/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:${CXF_HOME}/lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar:${CXF_HOME}/lib/jaxb-api-2.1.jar:${CXF_HOME}/lib/jaxb-impl-2.1.7.jar:${CXF_HOME}/lib/neethi-2.0.4.jar:${CXF_HOME}/lib/saaj-api-1.3.jar:${CXF_HOME}/lib/cxf-manifest.jar:${CXF_HOME}/lib/xalan-2.7.1.jar:${CXF_HOME}/lib/xmlsec-1.4.0.jar:${CXF_HOME}/lib/bcprov-jdk15-140.jar:${CXF_HOME}/lib/serializer-2.7.1.jar:${CXF_HOME}/lib/wss4j-1.5.4.jar
> package.myClient
> 
> Hope this helps,
> Anne
> 
> -----Ursprüngliche Nachricht-----
> Von: -wil- [mailto:wil.atlas@gmail.com] 
> Gesendet: Freitag, 6. Februar 2009 10:55
> An: users@cxf.apache.org
> Betreff: (newbie & urgent !) i'd like to avoid generating the Service- and
> SEI-implementation at runtime
> 
> 
> hi,
> 
> (i'm relatively new to CXF (which i find great (so far)).
> 
> My case:
> I'd like to avoid generating the (dynamic proxied) Service- and
> SEI-implementation at runtime.
> The reason is that i can't maintain the object references in the calling
> client. 
> 
> This is my setup:
> (actually almost the same as the Hello World example at:
> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html,
> "WSDL2Java
> generated Client")
> 
> - i have a WDSL (url) provides by one of our clients (so, i don't own it,
> and hence cannot change it)
> - i used CXF's wsdl2java to generate the necessary stubs en client code.
> This is the command:
>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
> <my_target_dir> clientx.wsdl
> - service (a Service subclass), porttype(-interface) and a specific client
> is generated, which is great.
> - i then use the Client which works fine ...
> 
> But (of course) a dynamic proxy is created every time which takes a lot of
> time (including a bunch of HTTP GET's for getting WSDL and related XSD's).
> The service has a bunch of operations, but i only call 1 operation at a
> time. Actually executing the operation takes about 20% of the time,
> generating the dynamic client stuff 80%. 
> 
> The WSDL is pretty static, so it would be nice to generate the 80% client
> stuff (, package it in a jar) and use that code directly for within the
> client at runtime.
> 
> I know i can do it with apache axis2, but i like CXF so far, so please
> keep
> me on that path :-)
> 
> TIA!
> 
> 
> 
>  
> -- 
> View this message in context:
> http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21869541.html
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21909035.html
Sent from the cxf-user mailing list archive at Nabble.com.


AW: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by Diefenbach Anne <Di...@fgan.de>.
Hi,

unless I am totally misunderstanding something, it sounds like you can just package your classes as a JAR and deploy the client like that. I did something similar, and I just took my classes, stuffed them in the JAR and called my client like this:

java -cp .:myCXFConsumer.jar:${CXF_HOME}/lib/saaj-impl-1.3.jar:${CXF_HOME}/lib/wsdl4j-1.6.2.jar:${CXF_HOME}/lib/wstx-asl-3.2.6.jar:${CXF_HOME}/lib/xml-resolver-1.2.jar:${CXF_HOME}/lib/XmlSchema-1.4.2.jar:${CXF_HOME}/lib/asm-2.2.3.jar:${CXF_HOME}/lib/commons-logging-1.1.1.jar:${CXF_HOME}/lib/cxf-2.1.3.jar:${CXF_HOME}/lib/geronimo-activation_1.1_spec-1.0.2.jar:${CXF_HOME}/lib/geronimo-annotation_1.0_spec-1.1.1.jar:${CXF_HOME}/lib/geronimo-javamail_1.4_spec-1.3.jar:${CXF_HOME}/lib/geronimo-jaxws_2.1_spec-1.0.jar:${CXF_HOME}/lib/geronimo-stax-api_1.0_spec-1.0.1.jar:${CXF_HOME}/lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar:${CXF_HOME}/lib/jaxb-api-2.1.jar:${CXF_HOME}/lib/jaxb-impl-2.1.7.jar:${CXF_HOME}/lib/neethi-2.0.4.jar:${CXF_HOME}/lib/saaj-api-1.3.jar:${CXF_HOME}/lib/cxf-manifest.jar:${CXF_HOME}/lib/xalan-2.7.1.jar:${CXF_HOME}/lib/xmlsec-1.4.0.jar:${CXF_HOME}/lib/bcprov-jdk15-140.jar:${CXF_HOME}/lib/serializer-2.7.1.jar:${CXF_HOME}/lib/wss4j-1.5.4.jar package.myClient

Hope this helps,
Anne

-----Ursprüngliche Nachricht-----
Von: -wil- [mailto:wil.atlas@gmail.com] 
Gesendet: Freitag, 6. Februar 2009 10:55
An: users@cxf.apache.org
Betreff: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime


hi,

(i'm relatively new to CXF (which i find great (so far)).

My case:
I'd like to avoid generating the (dynamic proxied) Service- and
SEI-implementation at runtime.
The reason is that i can't maintain the object references in the calling
client. 

This is my setup:
(actually almost the same as the Hello World example at:
http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html, "WSDL2Java
generated Client")

- i have a WDSL (url) provides by one of our clients (so, i don't own it,
and hence cannot change it)
- i used CXF's wsdl2java to generate the necessary stubs en client code.
This is the command:
   <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
<my_target_dir> clientx.wsdl
- service (a Service subclass), porttype(-interface) and a specific client
is generated, which is great.
- i then use the Client which works fine ...

But (of course) a dynamic proxy is created every time which takes a lot of
time (including a bunch of HTTP GET's for getting WSDL and related XSD's).
The service has a bunch of operations, but i only call 1 operation at a
time. Actually executing the operation takes about 20% of the time,
generating the dynamic client stuff 80%. 

The WSDL is pretty static, so it would be nice to generate the 80% client
stuff (, package it in a jar) and use that code directly for within the
client at runtime.

I know i can do it with apache axis2, but i like CXF so far, so please keep
me on that path :-)

TIA!



 
-- 
View this message in context: http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21869541.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by -wil- <wi...@gmail.com>.
> I have a feeling your are referring to all the "reader/writer" things that
> Axis2 likes to generate for everything.   If that's the case, then the
> answer
> pretty much is "there isn't a way".   That's really not how JAX-WS and
> JAXB
> (and thus CXF) work.   Things are much more dynamic.
I understand and also can appreciate the CXF approach. The fact is that the
wsdl i have to work with is pretty static, so generating client code at
dev-time seems like a good performance improvement/optimisation opportunity.
So, i will definitely look at the SXC project.
thx for the pointer !
>
> The CLOSEST thing is the SXC project at codehaus.   The latest stuff
> (0.7.3)
> has a maven plugin that will take the JAXB classes and generate
> readers/writers for it's stuff.   That requires the SXC runtime as well.
>
> Dan

dkulp wrote:
> 
> 
> I have a feeling your are referring to all the "reader/writer" things that 
> Axis2 likes to generate for everything.   If that's the case, then the
> answer 
> pretty much is "there isn't a way".   That's really not how JAX-WS and
> JAXB 
> (and thus CXF) work.   Things are much more dynamic.
> 
> The CLOSEST thing is the SXC project at codehaus.   The latest stuff
> (0.7.3) 
> has a maven plugin that will take the JAXB classes and generate 
> readers/writers for it's stuff.   That requires the SXC runtime as well.
> 
> Dan
> 
> 
> 
> On Fri February 6 2009 4:55:21 am -wil- wrote:
>> hi,
>>
>> (i'm relatively new to CXF (which i find great (so far)).
>>
>> My case:
>> I'd like to avoid generating the (dynamic proxied) Service- and
>> SEI-implementation at runtime.
>> The reason is that i can't maintain the object references in the calling
>> client.
>>
>> This is my setup:
>> (actually almost the same as the Hello World example at:
>> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html,
>> "WSDL2Java
>> generated Client")
>>
>> - i have a WDSL (url) provides by one of our clients (so, i don't own it,
>> and hence cannot change it)
>> - i used CXF's wsdl2java to generate the necessary stubs en client code.
>> This is the command:
>>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
>> <my_target_dir> clientx.wsdl
>> - service (a Service subclass), porttype(-interface) and a specific
>> client
>> is generated, which is great.
>> - i then use the Client which works fine ...
>>
>> But (of course) a dynamic proxy is created every time which takes a lot
>> of
>> time (including a bunch of HTTP GET's for getting WSDL and related
>> XSD's).
>> The service has a bunch of operations, but i only call 1 operation at a
>> time. Actually executing the operation takes about 20% of the time,
>> generating the dynamic client stuff 80%.
>>
>> The WSDL is pretty static, so it would be nice to generate the 80% client
>> stuff (, package it in a jar) and use that code directly for within the
>> client at runtime.
>>
>> I know i can do it with apache axis2, but i like CXF so far, so please
>> keep
>> me on that path :-)
>>
>> TIA!
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/%28newbie---urgent-%21%29-i%27d-like-to-avoid-generating-the-Service--and-SEI-implementation-at-runtime-tp21869541p21949859.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by Kalle Korhonen <ka...@gmail.com>.
Hey Dan,

are there any examples out there on how to use sxc-jaxb-maven-plugin?
I know documentation for sxc is pretty scarce which is ok but it'd be
nice to have at least one simple example of the configuration options.
Couldn't find anything in sxc's svn repo.

Kalle


On Tue, Feb 10, 2009 at 10:14 AM, Daniel Kulp <dk...@apache.org> wrote:
>
> I have a feeling your are referring to all the "reader/writer" things that
> Axis2 likes to generate for everything.   If that's the case, then the answer
> pretty much is "there isn't a way".   That's really not how JAX-WS and JAXB
> (and thus CXF) work.   Things are much more dynamic.
>
> The CLOSEST thing is the SXC project at codehaus.   The latest stuff (0.7.3)
> has a maven plugin that will take the JAXB classes and generate
> readers/writers for it's stuff.   That requires the SXC runtime as well.
>
> Dan
>
>
>
> On Fri February 6 2009 4:55:21 am -wil- wrote:
>> hi,
>>
>> (i'm relatively new to CXF (which i find great (so far)).
>>
>> My case:
>> I'd like to avoid generating the (dynamic proxied) Service- and
>> SEI-implementation at runtime.
>> The reason is that i can't maintain the object references in the calling
>> client.
>>
>> This is my setup:
>> (actually almost the same as the Hello World example at:
>> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html, "WSDL2Java
>> generated Client")
>>
>> - i have a WDSL (url) provides by one of our clients (so, i don't own it,
>> and hence cannot change it)
>> - i used CXF's wsdl2java to generate the necessary stubs en client code.
>> This is the command:
>>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
>> <my_target_dir> clientx.wsdl
>> - service (a Service subclass), porttype(-interface) and a specific client
>> is generated, which is great.
>> - i then use the Client which works fine ...
>>
>> But (of course) a dynamic proxy is created every time which takes a lot of
>> time (including a bunch of HTTP GET's for getting WSDL and related XSD's).
>> The service has a bunch of operations, but i only call 1 operation at a
>> time. Actually executing the operation takes about 20% of the time,
>> generating the dynamic client stuff 80%.
>>
>> The WSDL is pretty static, so it would be nice to generate the 80% client
>> stuff (, package it in a jar) and use that code directly for within the
>> client at runtime.
>>
>> I know i can do it with apache axis2, but i like CXF so far, so please keep
>> me on that path :-)
>>
>> TIA!
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>

Re: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Posted by Daniel Kulp <dk...@apache.org>.
I have a feeling your are referring to all the "reader/writer" things that 
Axis2 likes to generate for everything.   If that's the case, then the answer 
pretty much is "there isn't a way".   That's really not how JAX-WS and JAXB 
(and thus CXF) work.   Things are much more dynamic.

The CLOSEST thing is the SXC project at codehaus.   The latest stuff (0.7.3) 
has a maven plugin that will take the JAXB classes and generate 
readers/writers for it's stuff.   That requires the SXC runtime as well.

Dan



On Fri February 6 2009 4:55:21 am -wil- wrote:
> hi,
>
> (i'm relatively new to CXF (which i find great (so far)).
>
> My case:
> I'd like to avoid generating the (dynamic proxied) Service- and
> SEI-implementation at runtime.
> The reason is that i can't maintain the object references in the calling
> client.
>
> This is my setup:
> (actually almost the same as the Hello World example at:
> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html, "WSDL2Java
> generated Client")
>
> - i have a WDSL (url) provides by one of our clients (so, i don't own it,
> and hence cannot change it)
> - i used CXF's wsdl2java to generate the necessary stubs en client code.
> This is the command:
>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
> <my_target_dir> clientx.wsdl
> - service (a Service subclass), porttype(-interface) and a specific client
> is generated, which is great.
> - i then use the Client which works fine ...
>
> But (of course) a dynamic proxy is created every time which takes a lot of
> time (including a bunch of HTTP GET's for getting WSDL and related XSD's).
> The service has a bunch of operations, but i only call 1 operation at a
> time. Actually executing the operation takes about 20% of the time,
> generating the dynamic client stuff 80%.
>
> The WSDL is pretty static, so it would be nice to generate the 80% client
> stuff (, package it in a jar) and use that code directly for within the
> client at runtime.
>
> I know i can do it with apache axis2, but i like CXF so far, so please keep
> me on that path :-)
>
> TIA!

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog