Good Afternoon Stan--
 
CLIENT
lets say for the sake of argument your client's packagename is called
package samples.userguide.example2
and the class is called TestClient.java
after compiling the TestClient your TestClient.class should be located in
<BaseFolder>/samples/userguide/example2/TestClient.class
so in my case I have use Axis folder for the BaseFolder 
the class is located in
/Axis/samples/userguide/example2/TestClient.class
and the way I invoke the AxisClient is to
cd Axis
java -classpath .;$CLASSPATH samples.userguide.example2.TestClient
the TestClient main method as a reference to setendpoint as here
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
where endpoint is set to
once you invoke the WebService via
call.invoke( params)
the deployed service 'MessageWebService' Server has the ball and will call the associated stub classes (located on TOMCAT axis folder SERVER configuration)
SERVER configuration
from the package point of view the (assume previouslt generated stub) server classes are located in either one of 2 places
1)individual classes can be located in the classes folder as in
$TOMCAT_HOME/webapps/axis/WEB-INF/classes/PACKAGENAME/CLASSNAME
2)the library (jar file) can be located in lib folder as in the example
$TOMCAT_HOME/webapps/axis/WEB-INF/lib/*.jar

HTH
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.
 

 
----- Original Message -----
Sent: Monday, September 04, 2006 10:46 AM
Subject: RE: Forwarding a web service call...

Martin,

 

Thanks for your response, but to be perfectly honest, I didn’t understand a single word of that… I guess I am still a newbie….

 

I am not actually using any of the Axis api for the things I have done thus far, so, digging into the servlet and such are a little beyond me.

 

Is there not any way I can use a proxy (client) to another system to do what I want? I was thinking I could go through and change package names and such to differentiate the client from the actual (server side) implementation, but, I found this to be fairly difficult as well – not that I mind difficult. I just need to know what actually works.

 

Thanks again,

 

Stan

 


From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 02, 2006 9:19 AM
To: [email protected]
Subject: Re: Forwarding a web service call...

 

Good Morning Stan--


Far from it ..You're NOT mentally challenged at all..You're asking a valid question which SHOULD be asked!
As forwarding a response is a challenge I found earlier this week.. I countered the error by creating a few mutator methods in MessageContext notably

msgContext.setResponse and msgContext.setRequest to be set from within AxisServlet as soon (as the msgContext object is acquired)
Later in in your <WebService>Manager Stub class when you acquire the msgContext object
you will be able to re-acquire the original response and request objects via MessageContext accessor methods-
BTW When I originally posted this same question I did get a response from dims (Apache committer) as well as Luis (from IEEE)

 

I hope this helps your efforts-
Martin--

*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

 


 

----- Original Message -----

From: Hughes, Stan

Sent: Thursday, August 31, 2006 9:25 PM

Subject: Forwarding a web service call...

 

All,

 

I am using axis to run the same set of web services on several different servers.

 

One of the methods is called “getItem”. I am not sure if this makes sense or not, but, here goes.

 

If I call getItem on one server and the item does not exist in that database, I want the call to be “forwarded” to the next server in the chain. I tried creating a proxy class and changing the endpoint and passing the parameters to the next server, but this does not work…

 

Here is some sample code:

 

<pre>

public ItemInfo getItem(CredentialsInfo credentials,String itemId) {

 

…

 

    “get the item from the current database”

    If (theItem == null) {

         CETGServicesProxy proxy = new CETGServicesProxy();

         proxy.setEndpoint(“http://nextserver.com/cetgws/services/CETGServices”);

         ItemInfo item = proxy.getItem(credentials,itemId);

         return item;

   }

…

</pre>

 

Is this possible, or, am I just being mentally challenged?

 

Thanks for any help…

 

Reply via email to