facebook

xfire client stub

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #269884 Reply

    tom jansto
    Participant

    evening 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

    #269889 Reply

    tomeksz
    Member

    Try to setup the same namespace as on server side.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: xfire client stub

You must be logged in to post in the forum log in