You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Claudio Miranda <cl...@claudius.com.br> on 2006/01/02 15:58:49 UTC

Moving from jax-rpc ri to axis

    Hi all, 

    I have a simple application running on top of application server J2EE 1.4, JAX-RPC RI, the client uses static stubs. Sometimes when the overall system is under high load, the ws client take much time to do its job. Then a timeout is needed to put to the ws client, but jax rpc doesn't have a way to set timeouts. 
    I verified Axis has Stub.setTimeout, so, I decided to move the ws client implementation to axis, but that raised some questions, I found hard to answer alone without a lot of research and test, and I am very new to WS.

my code has a createProxy method, see:

    private static Stub createProxy() {
        staticstub.Music_Impl mImpl = new staticstub.Music_Impl();
        return (Stub) mImpl.getMusicSuggestionPort();
    }

    as axis has Stub.setTimeout, how can I just add "stub.setTimeout(1000)" line of code ? Of course there is a lot of generated code specific to the JAX-RPC RI, made by Sun AppSever 8 wscompile tool, how change this to use axis2 ? 
    To develop the code I used J2EE 1.4 tutorial, chapter 8 "building webservices" http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXRPC3.html#wp115211
     I found to use static stubs the easiest way to use axis in place of jaxrpc ri.

thanks for your time and patience.
--
  Claudio Miranda
_______________________________________________________________
  http://www.claudius.com.br/blog              http://www.summa-tech.com
  http://www.soujava.org.br

Re: Moving from jax-rpc ri to axis

Posted by iksrazal <ik...@gmail.com>.
A couple quick tips: 

First, use [axis2] in the subject. 

To set a timeout using axis2...

            Options options = stub._getClientOptions();
            options.setAction("your_soap_action");
            options.setTimeOutInMilliSeconds(new Long(60000));

The setAction part shouldn't be necessary in the .94 release comming soon. 

Converting from jax-rpc to axis2, make sure your not using soapenc but rather 
wrapped document literal for your wsdl. soapenc is planned to be supported 
somewhat, but soapenc arrays may never be. wrapped document literal is in 
general the way things are headed. 

For moving to wsdl2java, try this tutorial: 

http://ws.apache.org/axis2/CodegenToolReference.html

HTH,
iksrazal
http://www.braziloutsource.com/

Em Segunda 02 Janeiro 2006 12:58, o Claudio Miranda escreveu:
>     Hi all,
>
>     I have a simple application running on top of application server J2EE
> 1.4, JAX-RPC RI, the client uses static stubs. Sometimes when the overall
> system is under high load, the ws client take much time to do its job. Then
> a timeout is needed to put to the ws client, but jax rpc doesn't have a way
> to set timeouts. I verified Axis has Stub.setTimeout, so, I decided to move
> the ws client implementation to axis, but that raised some questions, I
> found hard to answer alone without a lot of research and test, and I am
> very new to WS.
>
> my code has a createProxy method, see:
>
>     private static Stub createProxy() {
>         staticstub.Music_Impl mImpl = new staticstub.Music_Impl();
>         return (Stub) mImpl.getMusicSuggestionPort();
>     }
>
>     as axis has Stub.setTimeout, how can I just add "stub.setTimeout(1000)"
> line of code ? Of course there is a lot of generated code specific to the
> JAX-RPC RI, made by Sun AppSever 8 wscompile tool, how change this to use
> axis2 ? To develop the code I used J2EE 1.4 tutorial, chapter 8 "building
> webservices"
> http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXRPC3.html#wp115211 I
> found to use static stubs the easiest way to use axis in place of jaxrpc
> ri.
>
> thanks for your time and patience.
> --
>   Claudio Miranda
> _______________________________________________________________
>   http://www.claudius.com.br/blog              http://www.summa-tech.com
>   http://www.soujava.org.br

--