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 pierre betz <pi...@gmail.com> on 2008/08/07 08:54:12 UTC

problem using a proxy client inside jboss and tomcat

Hi everyone,

Today my problem is about a proxy client used for a web service :
My web service have the service part deployed inside axis2(1.4) in tomcat
(5.5.9).

I can access to the services throught SOAP requests, everything work fine.
These requests are send to an application server : Jboss 4.3.2.GA, used to
excecute the query requests by EJB session and entity.
For a request sent to tomcat, redirected to jboss, eveything works.

My problem is when I want to use a sort of proxy client in tomcat...
Sorry I don't really understand everything as I just took a project from a
person who did not explain anything to me... :)

So as I understand, we have a proxy client to create just 1 instance of some
services, to make it run faster ? ..
Please see the code to help me understand what is the use of the classes and
how make them work :


First : let say I have two services un tomcat : serviceA and serviceB
We always call the serviceA through http (soap requests) : so I just have
the skeleton used, and I can delete the stubs right ?

Now, the serviceA call Jboss, who will call the serviceB after.   We never
call directly the serviceB (so no skeleton, just the stubs)

My problem is, in tomcat I need to change the endpointreference to put it
locally, and so no call the web service again.
I think it's like we create a sorte of instance of stub the first time, and
we use this instance at every call. It seems more faster no ?
I don't really understand what is a proxy client in fact :( :(.. no so easy
to find documentation on internet.

But, as I understood, in the way to make the stuff work, I need to change
the target endpoint of the stub to put it locallly, and so not calling the
webservice by http/soap again.
in fact the idea is that :

in jboss we create a new proxy class. this class will create a stub to
communicate with tomcat directly (don't send a "http request").
so, the stub need to be created, and the endpoint reference changed to point
to the tomcat service no ?

sorry.. i'm totally lost this time and don't know what to write to make me
understanding..

just : create the stub in jboss, change the endpoint (why do I have to
change?), and call the function in tomcat.


to set the end point, I do :

    public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
        if (userBase != null)
            userBase._getServiceClient()
                         .setTargetEPR( new
org.apache.axis2.addressing.EndpointReference( _endpoint) );
    }

in fact it does not work...

does someone understant why I try to do? and can explain a little more about
proxy client.. and/or give me some documentation  .. and/or fix my problem ?



thanks a lot for all the work you do !!


Regards,
Pierre Betz