Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
routines.Mage_Api_Model_Server_V2_HandlerPortType portType = new routines.MagentoServiceLocator().getMage_Api_Model_Server_V2_HandlerPort(new java.net.URL(url));
portType.catalogCategoryCreate(sessionId, parentId, categoryData, storeView);
portType.catalogCategoryDelete(sessionId, categoryId);
Hey Ruben,
I have done connections for a few magento stores. This post will not answer your question, but it will give you another way to connect to a magento store.
First make sure that you have the WSDL enabled at the store. What I have done is....
Basic Settings
tWebserviceInput
WSDL: "http://yourstore.com/api/v2_soap/" (depending on your magento version you might have to add a ?wsdl at the end)
Method name: "" (I leave it empty)
Edit Schema add whichever rows you want to output (for example: orderID)
Advanced Settings
check advanced used checkmark
Then click the WSDL2Java button. This will generate the code based on the WSDL from the store. Keep in mind different versions of magento have different WSDL.
In the code section:
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();
}
Then you can output out of your tWebserviceInput to another component.
This is how I have been doing it but if anyone else has any input I'm all ears.
Hope this helps.