You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Faz <ar...@gmail.com> on 2013/09/19 20:47:24 UTC

Timeout and CXF

Hi All,I have the below piece of code which I was trying,Basically, am just
trying to hold the current thread for about 100 secs (cos in real time, my
query will take nearly a minute to execute and return the value). So just to
replicate this, when i tried the above, WS is throwing exception saying
'could not send message' and "Read Timed out".I even tried setting the
request and connection timeout variables as below in my CLient,        But
no luck, it throeing the error message in a few seconds and if i remove the
Sleep stuff, it works fine.. Please advice!



--
View this message in context: http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Timeout and CXF

Posted by Jason Pell <ja...@pellcorp.com>.
Since its all just XML the shortest answer is yes even if you have to hand
code it :-)

However any web service framework worth using should have WS security
support.

Just a matter of reading the docs for your chosen frameworks.

Nothing Cxf is doing on server side would preclude that.

But as we are all mostly java and cxf people on this list asking about
specifics of c and .net framework support is not going to get you more than
vague answers as we probably have not used these other frameworks.

Have you identified which libraries you are using for the c client? Is this
for a Linux desktop or something? In which case gnome and kde probably have
soap web service support !?

Sent from my Android phone
On 22/09/2013 2:55 AM, "Faz" <ar...@gmail.com> wrote:

> Thanks Jason for the nice response.
> Have one more query, well like you said the cxf jaxws server produces a
> standard soap web service that we can use any standards compliant soap web
> services framework for client. But, i have implemented WS-securitry policy
> along with CXF service that expects username and password from the
> Client(c,.net.java) being sent to Java service provider. Is this possible ?
>
> to be precise, in Java I have a client config  like
>
> Can we have some thing similar to this in other prog. languages (c,.net)
> using cXF ? Please suggest!
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286p5734332.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Re: Timeout and CXF

Posted by Faz <ar...@gmail.com>.
Thanks Jason for the nice response.
Have one more query, well like you said the cxf jaxws server produces a
standard soap web service that we can use any standards compliant soap web
services framework for client. But, i have implemented WS-securitry policy
along with CXF service that expects username and password from the
Client(c,.net.java) being sent to Java service provider. Is this possible ?

to be precise, in Java I have a client config  like
            
Can we have some thing similar to this in other prog. languages (c,.net)
using cXF ? Please suggest!




--
View this message in context: http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286p5734332.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Timeout and CXF

Posted by Jason Pell <ja...@pellcorp.com>.
The http conduit is a cxf abstraction for configuring a http URL connection
so its not anything magical. You cannot  use this in a non cxf client.

For a c or .net client you would make use of whatever http or web service
client frameworks that are available

The thing to remember is that between the client and server its just XML
using a cxf client and cxf server is just a convenience.

You could use a cxf server with a metro client for instance.

So that's the long answer short is no you cannot use http conduit stuff
from cxf on c or .net or metro client.

But since a cxf jaxws server produces a standard soap web service you can
use any standards compliant soap web services framework for client.

Sent from my Android phone
On 20/09/2013 10:09 PM, "Faz" <ar...@gmail.com> wrote:

> Okie, to be more precise..
>
> Actually we will have multiple clients accessing our WS created via CXF. By
> multiple clients, it can be clients written in diff. programming languages
> i.e C, .Net, Java etc. So from Java prespective am pretty much fine with
> this setup. All I need to know is, can this cxf option (http-conduit) be
> used/coded in C,.Net the similar way. or is there any specific set-up that
> needs to be followed?
>
> Thanks for ur patience!
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286p5734309.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Re: Timeout and CXF

Posted by Faz <ar...@gmail.com>.
Okie, to be more precise..

Actually we will have multiple clients accessing our WS created via CXF. By
multiple clients, it can be clients written in diff. programming languages
i.e C, .Net, Java etc. So from Java prespective am pretty much fine with
this setup. All I need to know is, can this cxf option (http-conduit) be
used/coded in C,.Net the similar way. or is there any specific set-up that
needs to be followed?

Thanks for ur patience!



--
View this message in context: http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286p5734309.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Timeout and CXF

Posted by Aki Yoshida <el...@gmail.com>.
i thought it was a typo. but when you say it was not, that doesn't
really clarify the situation.

if you are writing a C based client from scratch and creating sockets
by yourself, you are the one to decide whether to reuse the same
configuration option as cxf (i.e., the http-conduit configuration),
which means to read these properties and set the corresponding socket
properties in your code or to use another configuration option of your
own.


2013/9/20 Faz <ar...@gmail.com>:
> By C, I mean the client being written in C program. Just to rephrase, can the
> http-conduit setting be done using the C program , as this is what will
> consume my Java service?Hope its clear now, please let me know if u need
> further info!
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286p5734302.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: Timeout and CXF

Posted by Faz <ar...@gmail.com>.
By C, I mean the client being written in C program. Just to rephrase, can the
http-conduit setting be done using the C program , as this is what will
consume my Java service?Hope its clear now, please let me know if u need
further info!



--
View this message in context: http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286p5734302.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Timeout and CXF

Posted by Aki Yoshida <el...@gmail.com>.
not sure what you meant by the "C client".
you need to configure the relevant connection properties for your client.

and the http-conduit setting is for cxf and it can be configured in
xml (spring or blueprint) or programmatically in java, as described in
the page that I mentioned.
regards, aki


2013/9/20 Faz <ar...@gmail.com>:
> Thanks Aki, I will give it a try.Meanwhile, I'm planning to have a C client
> for the Java service, would the http-conduit config in xml be the same for
> that as well or do we need to do anything specific. Please suggest!
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286p5734298.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: Timeout and CXF

Posted by Faz <ar...@gmail.com>.
Thanks Aki, I will give it a try.Meanwhile, I'm planning to have a C client
for the Java service, would the http-conduit config in xml be the same for
that as well or do we need to do anything specific. Please suggest!



--
View this message in context: http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286p5734298.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Timeout and CXF

Posted by Aki Yoshida <el...@gmail.com>.
hi,
you need to set the timeout at your http conduit configuration.
there are various ways to set this property depending on how you
configure your client, which are described at
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html

regards, aki

2013/9/19 Faz <ar...@gmail.com>:
> Hi All,I have the below piece of code which I was trying,Basically, am just
> trying to hold the current thread for about 100 secs (cos in real time, my
> query will take nearly a minute to execute and return the value). So just to
> replicate this, when i tried the above, WS is throwing exception saying
> 'could not send message' and "Read Timed out".I even tried setting the
> request and connection timeout variables as below in my CLient,        But
> no luck, it throeing the error message in a few seconds and if i remove the
> Sleep stuff, it works fine.. Please advice!
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Timeout-and-CXF-tp5734286.html
> Sent from the cxf-user mailing list archive at Nabble.com.