Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Help me with my client!!!
Help me with my client!!! [message #119888] Tue, 12 July 2005 13:24
Eclipse UserFriend
Originally posted by: andreas140983.libero.it

Hi, I want create a generic soap client that can be useful in order to
invoke every web service...may it be possible?
For example this is my web service method interface:

public ProductInfo ActorSearchRequest(String author, int number);

where ProductInfo is so defined:

public class ProductInfo{
String TotalResults;
String TotalPages;
String ListName;
}

My client is defined in this way:

clientWS(Vector params, String urn, String methodName, URL url)
{
//params contain the parameter elements
Call call = new Call ();

// Service uses standard SOAP encoding
String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
call.setEncodingStyleURI(encodingStyleURI);

// Set service locator parameters
call.setTargetObjectURI (urn);
call.setMethodName (methodName);

// Create input parameter vector

call.setParams (params);

// Invoke the service ....
Response resp = call.invoke (url,"");

// ... and evaluate the response
if (resp.generatedFault ()) {
throw new Exception();
} else {
// Call was successful. Extract response parameter and return
result
Parameter result = resp.getReturnValue ();

At this point, how I can return a ProductInfo object and use its
elements(TotalResults, TotalPages,...)?
In other words...I want have:
ProductInfo element = (ProductInfo) result.getValue();

This object isn't defined in the java.lang.class and I want to pass it
when I call my client!
I won't to insert directly the previous line of code because I must create
a generic client!

Excuse me for my bad English but I 'm an italian boy!

Help me please!!!!!!

Andrea
Previous Topic:Ctrl-Shift-R shows files in .deployables
Next Topic:Client Address
Goto Forum:
  


Current Time: Sat Nov 09 23:12:38 GMT 2024

Powered by FUDForum. Page generated in 0.03215 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top