All pastes #455047 Raw Edit

_Bradders

public java v1 · immutable
·published 2007-04-23 23:36 UTC
rendered paste body
 private boolean poll(XmlCommandProcessor processor)    {        trace.trace("poll");                	          //  ask the application what changed and build a command document to        //  publish the changes to DirXML               String s;    	Object[] results;    	String spml = null;    	        try {            		if (debug)    			trace.trace("AJB: Polling MYOB");	        Client client = new Client(new URL("http://192.168.0.20:8080/MYOBConnector/services/MYOBService?wsdl"));	    	        // Push all Customer changes	        results = client.invoke("push", new Object[] {"Customers"});	        if (results[0] == null) {	        		        	this.disconnect();	        	this.connect();	        }	        	        else {	        	spml = (String) results[0];	        }	        	        if (debug)	        	System.out.println((String) results[0]);    		            	    	    	    	}        catch (ConnectException ce) {        	this.connected = false;        	        	System.out.println("AJB: Unable to connect to Application Server during poll() call "+ce.toString());        	        }    	catch (Exception ex) {    		this.connected = false;	       	System.out.println("AJB: Error during poll() call "+ex.toString());	    	    }