- This topic has 1 reply, 2 voices, and was last updated 17 years, 6 months ago by tomeksz.
-
AuthorPosts
-
tom janstoParticipantevening folk,
i have a web service that is returning a custom object (it merely contains string objects and a hashmap object). when invoked from the web services explorer, all runs fine and the result object is populated properly. when i invoke it via a client test harness, the returned container object is non null, but all the member objects are null. if i turn up the debugging, i can see in the commons-clienthttp packages the data returned on the wire, and it is correct. it acts like the client side is having problems properly reconstituting the on-the-wire data back into the object. i can provide traces and other info, but this seems too simple to be this difficult to determine what is going wrong. the client stub is contained here:public static Data callSearchWS(long userId, String searchFor,
String serviceURL) throws MalformedURLException, ConnectException,
Exception {
// create a metadata of the service
Service serviceModel = new ObjectServiceFactory().create(Search.class);
LogMessage.write(“WSClient.callSearchWS(): got service model for .” +
searchFor + ” user id ” + userId, Severity.DEBUG);
// create a proxy for the deployed service
XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
Search client = null;
Data erd = null;
try {
client = (Search) factory.create(serviceModel, serviceURL);
} catch (MalformedURLException e) {
LogMessage.write(“WSClient.callSearchWS(): EXCEPTION: ”
+ e.toString(), Severity.ERROR);
}
// invoke the service
try {
erd = client.search(userId, searchFor);
} catch (Exception e) {
LogMessage.write(“WSClient.callSearchWS(): EXCEPTION: ”
+ e.toString(), Severity.ERROR);
}
// return the response
return erd;
}i’ve been looking at this far too long for it to be something major (i think), and i have other clients that work and can access the services just fine.
thanks for any considerations of help,
tom
tomekszMemberTry to setup the same namespace as on server side.
-
AuthorPosts