ashu_vik - Thursday, August 20, 2009 7:40 AM:
I wish to create/update parts through AML by giving requests to the Innovator server. As per my understanding AMl files are files with XML extension. I am able to find the AML code to create/get/update a part/document but i am not able to figure out at what location do i need to place these AML(.xml) files on my machine. Also, what is the URL i would need to invoke these AML files?
Can somebody help me with this issue please?
PeterSchroer - Thursday, August 20, 2009 7:54 AM:
Please read the Forum thread http://www.aras.comhttp://www.aras.com/Community/forums/t/648.aspx this discusses the Web Services. AML is Aras tag set for transacting all actions with the server. When you have created a good AML string, you need to send this to the Innovator Server as a SOAP message (or use a structured WSDL, but this is explained in the other post).
Another good trick when you are starting to learn Aras Innovator development is the NASH tool. This is a very lean client with 2 boxes: you paste the AML you have created in one box, hit the submit button, and see the resulting XML/AML from the server in the bottom box. NASH is just a web page inside your Aras Innovator installation: The url should look similar to localhost/.../NASH.aspx
ashu_vik - Thursday, August 20, 2009 8:18 AM:
Thanks for the quick response. It is really helpful and gave a direction to my thought process. NASH tool seems to be amazing. Can you please tell me the location of the other post(about using structured WSDL) you mentioned in your reply.
PeterSchroer - Thursday, August 20, 2009 9:18 AM:
Try this link - it is a post in the same Developers Forum: http://www.aras.comhttp://www.aras.com/Community/forums/t/648.aspx
ashu_vik - Monday, August 24, 2009 3:14 AM:
In the post (http://www.aras.comhttp://www.aras.com/Community/forums/p/648/1951.aspx#1951)some sample projects on the Community site that show how to send SOAP messages from JS or a Windows App. Can you provide me the link to those sample projects so that i may access them.
PeterSchroer - Monday, August 24, 2009 1:35 PM:
Here is a small sample of JS that creates an XMLHTTP object, sends a message to the Innovator server, and then consumes the result. In the sample, you can see some ASPX substitutions for the username, password, etc. coming from a XML config file that is loaded when the page is initiated. If you don't want to use ASPX to load these, you can hard-code the values in JS. This was a piece of sample code I wrote several yearsa go for a company that wanted a SVG dashboard on their intranet page. Zip file is linked here. [ don't foget tha tthe passwords must be encrypted before sending over the wire, you can add functions for hashing the password to the JS).
var http = new ActiveXObject("ServerSafe.SafeXMLHTTP");
http = http.XMLHTTP_Object;
http.open('POST', '<%=InnovatorServer%>', false);
http.setTimeouts(0, 0, 0, 0);
var body = '<Item type="Project" action="get" levels="0" select="project_customer"><state>Active</state></Item>';
var soap = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ';
soap += 'encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">';
soap += '<SOAP-ENV:Body>' + body + '</SOAP-ENV:Body></SOAP-ENV:Envelope>';
var Result = new ActiveXObject("Msxml2.DOMDocument.4.0");
Result.loadXML( http.responseText );
For a Windows example, I recommend that you look at this project: http://www.aras.com/communityProjects/default.aspx?projectid=ECD00D5392A84CBFA8A9E29E97793CA5 this is a Windows Service that watches a folder for new data files, and then uses XML/SOAP messages to send this data to the Innovator server.