Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
String url= "http://yourstore.com/api/v2_soap/?wsdl";
routines.Mage_Api_Model_Server_V2_HandlerPortType portType = null;
String sessionId = null;
SalesOrderEntity[] entity = null;
portType = new routines.MagentoServiceLocator().getMage_Api_Model_Server_V2_HandlerPort(new java.net.URL(url));
sessionId = portType.login(context.userName,context.password);
//Filters to get orders in a certain status
AssociativeEntity ae1 = new AssociativeEntity("status", "Processing");
AssociativeEntity[] ae = {ae1};
ComplexFilter cof1 = new ComplexFilter("status", ae1);
ComplexFilter[] cof = {cof1};
Filters filters = new Filters(ae,cof);
entity = portType.salesOrderList(sessionId,filters);
for(int i = 0 ; i < entity.length; i++)
{
SalesOrderEntity orderInfo = portType.salesOrderInfo(sessionId, entity.getIncrement_id());
output_row.orderID = entity.getIncrement_id();
}