So, this layer is responsible for parsing the XML and is being called by
StatementForwardingManagementAction. If I pass xml back
to StatementForwardingManagementAction, it won't know what to do with it.

I'm thinking I could throw an exception in the event of an error which can
be caught by StatementForwardingManagementAction. (And put details in the
exception more descriptive than "error." :) )


On Tue, Oct 29, 2013 at 11:16 AM, Tim Edwards <notifications@github.com>wrote:

> In
> src/com/rusticisoftware/hostedengine/client/StatementForwardService.java:
>
> > +		request.getParameters().add("sourcePassword", sPassword);
> > +		request.getParameters().add("destinationURL", dURL);
> > +		request.getParameters().add("destinationUsername", dUsername);
> > +		request.getParameters().add("destinationPassword", dPassword);
> > +		
> > +	    Document response = request.callService("rustici.statementForward.AddForwardingPath");
> > +	    NodeList importResultNodes = response.getElementsByTagName("addforwardingpathresult");
> > +	    Element resultElement = (Element)importResultNodes.item(0);
> > +	    boolean wasSuccessful = Boolean.parseBoolean(resultElement.getAttribute("successful"));
> > +	    String result;
> > +	    if (wasSuccessful) {
> > +	    	result = resultElement.getAttribute("id");
> > +        }
> > +        else
> > +        {
> > +        	result = "error";
>
> It would be nice to have something more descriptive than 'error'. When an
> error does occur, we will end up with a ticket that just says "I called
> AddPath and I get back error".
>
> Maybe just return the entire xml response regardless of success ?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/RusticiSoftware/SCORMCloud_JavaLibrary/pull/2/files#r7284469>
> .
>