This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Web services - WSDL

morenton - Wednesday, August 19, 2009 9:05 AM:

Hi,

Where can I find documents about the "out of the box" ARAS web services ? And what is the URL of the WDSL document for a standard ARAS server ?

I'm making some tries on using the ARAS web services and I want to adapt to ARAS the windchill/catia RIALTO macro :

www.plmlab.fr/index.php

If you have already done such a work with ARAS and any CAD system, your help will be very welcome.

Regards,

--

Pascal Morenton

[email protected]

 



Bill - Wednesday, August 19, 2009 10:15 AM:

The best documentation to start is in the Just Ask Innovator help installed with Aras Innovator.

From the main menu, select Help --> Just Ask Innovator and them look under Innovator AdministrationWeb Services in the Contents of the help.

-Bill

 



morenton - Wednesday, August 19, 2009 10:35 AM:

Bill,

Many thanks for your quick answer. I found the web services help you mentioned.

But do standard ("out of the box") web services already exist for each new ARAS server ? Or do I create all the web services I'll need for my application ?

I successfully made the test with the example which is given in the section 11.3 of the programmer's guide. This example uses the "ApplyItem" web service which was already created. Do another web services exist ? Can I discover them with a WSDL document ?

Regards,

--

Pascal



ashu_vik - Monday, August 24, 2009 1:47 AM:

Hi Bill,

I am not able to find the Web-Services  help at the following location :

Help --> Just Ask Innovator and them look under Innovator AdministrationWeb Services in the Contents of the help.

I have attached the screen shot of the contents visible in help from my instance of Aras.

 



PeterSchroer - Wednesday, August 19, 2009 10:52 AM:

Pascal,

Essentially all of Aras Innovator is exposed at   ./server/InnovatorServer.aspx    but there is no WSDL.     This is a standard interface,  that you can use with the Innovator that you downloaded.       But because there is only one object ("Item") exposed,  it did not make sense to create a WSDL for this interface.     However this one Item is an abstract for all of the business objects inside Innovator,  so this is really a powerful concept.  

You have 2 choices,   create a WSDL following the instructions for any specific business objects you want to interface with.   This WSDL can be used in any IDE to simply build a nice integration....   or  spend an extra day or two learning the Aras AML tag set and how to send a SOAP message to InnovatorServer.aspx,  and then all of Aras Innovator is open to you.  

I have some sample projects on the Community site that show how to send SOAP messages from JS or a Windows App.   THere is also a PHP example available.   

Peter



morenton - Monday, August 24, 2009 1:45 PM:

Hi,

Even you can create new web services, within a ARAS innovator "out of the box", only one web service is available : "ApplyItem". Using this web service allows sending a set of <AML> tags via a SOAP message . That way you can *** almost *** invoke all the methods of the API.

You'll find an example in VBa (for CATIA but don't care of that) there :

http://www.plmlab.fr/uploads/RIALTO/aras_ws.txt

It works fine and you can test your own <AML> sets with the NASH interface which is really a fancy and very usefull tool to discover <AML>.

But some methods seem to be not available thru the "Apply Item" web service. For example, the "checkout" method for a "File" Item can't be invoked via the web service. And it's a disaster for me because I want to create a file vault system thru ws :-).

As I'm a new comer in ARAS world, maybe I'm wrong. I hope so !

Regards

--

Pascal

 

 



morenton - Wednesday, August 19, 2009 11:14 AM:

Peter,

Ok, I get it !

Thanks for your help.

I assume that the "Arras Innovator Programmer's Guide" is the best document to discover the ARAS AML tag set. Isn't it ?

Regards,

--

Pascal



RobMcAveney - Monday, August 24, 2009 2:37 PM:

Hi Pascal -

When dealing with file checkin/checkout, it's important to understand that there can be multiple vault servers associated with a single Aras Innovator server.  File requests should be sent directly to the vault server, which does the file operation then forwards the AML request to the application server.  The normal client uses a .NET control to read/write to the client file system and send requests to the vault server.  You could try re-using that control or form the multipart requests manually.  Let me know which route you'd like to try and I'll see if I can dig up an example for you.

Regards -

Rob

 



Bill - Wednesday, August 19, 2009 11:41 AM:

Yes, the Programmer's Guide is the best place to start.  This has a rather in good technical explination how AML is constructed.

You may also want to attend one of our API classes.  http://www.aras.com/university/

-Bill



morenton - Monday, August 24, 2009 4:40 PM:

Hi Rob,

Many thanks for these informations.

I want to download a file already created in a vault and I want to do that using a web service (ws).

To create the File and its document, the following <AML> tags set is sent with the "applyItem" ws

    <Item type='Document' action='add'>
    <item_number>myNumber</item_number>
    <name>myName</name>
    <description>myDescription</description>
    <Relationships>
    <Item type='Document File' action='add'>
    <related_id>
    <Item type='File' action='add'>
    <actual_filename>completePathToTheFile</actual_filename>
    <filename>cadFile</filename>
    <Relationships>
    <Item type='Located' action='add'>
    <related_id>
    <Item type='vault' action='get'></Item>
    </related_id>
    </Item>"
    </Relationships>
    </Item>
    </related_id>
    </Item>
    </Relationships>
    </Item>

This set works fine : the document and the file items are created and my local file is uploaded to the vault. 

My need now is to be able to download the file with a ws. But the "checkout" method can't be used in a <AML> tags set. For example, the following set doesn't work :

<AML>
<Item type="File" action="checkout"><id>54E3C58A9B4A439EA33AA920F1B76CAA</id></Item>
</AML>

I'm probably wrong because downloading a file from a vault is a basic service for a PDM system. Such a web service must be present in ARAS innovator !

Anyway, your help will be very welcome.

Regards,

--

Pascal

 



morenton - Wednesday, August 19, 2009 1:23 PM:

 

I made some tests which worked fine.

Now, next step for me is discovering the main data model for my need which is related to CAD data management. The administration section of innovator can help me to find the main ItemTypes and RelashionTypes I have to use.  But a view of your conceptual data model (that you called IOM ?) would be also very helpful ! Even if  the data model is not purely object oriented (as mentionned in the guide), a UML class diagram - for example - could represent the main "classes" (ItemTypes) and relationshipsTypes as Part, Part BOM, Document etc. If anyone can help me to identify the main types I have to use, he'll be very welcome !

--

Pascal

 



RobMcAveney - Monday, August 24, 2009 7:04 PM:

Hi Pascal -

You are absolutely correct that downloading a file from the vault is a basic service that PLM must provide.  Aras Innovator does provide this, not in InnovatorServer.aspx, but in VaultServer.aspx.  There is of course a very good reason for this -- most companies run only one application server, but may run multiple vault servers (usually one for each site).  Let's say your company was based in Tokyo, but you are located in Paris.  It would be fine to transfer a relatively small amount of XML back and forth to Tokyo, but it would be silly to download a large file across the internet when the file is available on a local vault server.

In a simple, unsecured vault installation, viewing a file is as simple as forming the right URL (e.g. localhost/.../vaultserver.aspx Checkin and checkout are accomplished by sending a request to the vault server.  The file operation is done there, then the AML is forwarded to the application server.  Based on the code you posted, I assume you want to form these requests manually.  I don't have an example of this in VB since most people just use IOM or the .NET control to perform vault operations.  However, I did get the assignment a while back to manually form a checkin request in Java for use with an integration with an older CAD system.  Below is the code I came up with (please excuse my rusty Java).  Hopefully you can read it well enough to figure out what you need to do, but the key is forming a multipart request with both the AML and the file data and sending it to the vault server.

import java.net.*;
import java.io.*;
import java.security.*;
import java.math.*;

class filecheckin
{

    public static String calcMD5(String s) {
        MessageDigest m = null;
        try {
            m=MessageDigest.getInstance("MD5");
            m.update(s.getBytes(),0,s.length());
        }
        catch (NoSuchAlgorithmException e) {
            System.err.println("Invalid algorithm");
            System.exit(-1);
        }
        return (new BigInteger(1,m.digest()).toString(16));
    }


    public static void main(String args[])
{
    try {
        URL u = new URL("localhost/.../VaultServer.aspx");
        URLConnection uc = u.openConnection();
        HttpURLConnection connection = (HttpURLConnection) uc;

        String boundary = "-------------------------BRdnIy5hBONlyI";
        String docPath = "C:\testdoc.txt";

        connection.setDoOutput(true);
        connection.setRequestMethod("POST");
        connection.setRequestProperty("Content-Type", "multipart/form-data; boundary="+boundary);

        OutputStream os = connection.getOutputStream();
        File file = new File(docPath);
        FileInputStream is = new FileInputStream(file);
        String content = "--"+boundary +" Content-Disposition: form-data; name="SOAPACTION"; Content-Type: text/plain ApplyItem ";
        os.write(content.getBytes());
        content = "--"+boundary +" Content-Disposition: form-data; name="AUTHUSER"; Content-Type: text/plain admin ";
        os.write(content.getBytes());
        content = "--"+boundary +" Content-Disposition: form-data; name="AUTHPASSWORD"; Content-Type: text/plain "+calcMD5("innovator")+" ";
        os.write(content.getBytes());
        content = "--"+boundary +" Content-Disposition: form-data; name="DATABASE"; Content-Type: text/plain solutions91 ";
        os.write(content.getBytes());
        content = "--"+boundary +" Content-Disposition: form-data; name="XMLDATA"; Content-Type: text/plain ";
        content += "<SOAP-ENV:Envelope xmlns:SOAP-ENV='schemas.xmlsoap.org/.../'>";
        content += " <SOAP-ENV:Body>";
        content += "  <ApplyItem>";
        content += "   <Item type='Document' id='76126C1815DA441B80E11492ACF437A4' action='add'>";
        content += "    <item_number>X-1001</item_number>";
        content += "    <name>Test</name>";
        content += "    <locked_by_id keyed_name='admin'>30B991F927274FA3829655F50C99472E</locked_by_id>";
        content += "    <Relationships>";
        content += "     <Item type='Document File' id='A311B7E4A1414BF9971F01867E919A43' action='add'>";
        content += "      <related_id>";
        content += "       <Item type='File' id='534007B45DBA48249AC49C8F90A26DF4' action='add'>";
        content += "        <filename>testdoc.txt</filename>";
        content += "        <checkedout_path>C:</checkedout_path>";
        content += "        <new_version>1</new_version>";
        content += "        <file_size>11</file_size>";
        content += "        <checksum>FB53A94DDC6855BA4DCB9E9BD10E0AC0</checksum>";
        content += "        <Relationships>";
        content += "         <Item type='Located' id='78FF03607AAA4926B80E5CE628729AF5' action='add'>";
        content += "          <source_id keyed_name='testdoc.txt'>534007B45DBA48249AC49C8F90A26DF4</source_id>";
        content += "          <related_id keyed_name='Default'>67BBB9204FE84A8981ED8313049BA06C</related_id>";
        content += "         </Item>";
        content += "        </Relationships>";
        content += "       </Item>";
        content += "      </related_id>";
        content += "      <source_id keyed_name='X-1001'>76126C1815DA441B80E11492ACF437A4</source_id>";
        content += "     </Item>"    ;
        content += "    </Relationships>";
        content += "   </Item>";
        content += "  </ApplyItem>";
        content += " </SOAP-ENV:Body>";
        content += "</SOAP-ENV:Envelope> ";
        os.write(content.getBytes());
        content = "--"+boundary +" Content-Disposition: form-data; name="534007B45DBA48249AC49C8F90A26DF4"; filename="testdoc.txt"; Content-Type: text/plain ";
        os.write(content.getBytes());
        byte[] buffer = new byte[4096];
        int bytes_read;
        while((bytes_read = is.read(buffer)) != -1) {
            os.write(buffer, 0, bytes_read);
            content = " --"+boundary+"--";
            os.write(content.getBytes());
        }
        os.flush();
        os.close();

        InputStream in = connection.getInputStream();
        int c;
        while ((c = in.read()) != -1) System.out.write(c);
        in.close();

    }
    catch (IOException e) {
        System.err.println(e);
    }
    }
}

Rob



mogo_nem - Thursday, August 20, 2009 7:24 AM:

Hello Pascal,

if you are only interested in accessing/customizing the parts of the Innovator solution responsible for product and CAD data management, the following simplified UML class diagram extracted from the innovator document (Just Ask Innovatro/Product engineering/Part) might help you:

As you can see above, a product consists of a set of models, each of which has a link to the part at the top of the BOM for this model. The class Part represents both a simple part and an assembly. The BOM is defined as a relation between parts (Part BOM). Further, a Part has a list of documents, which have associated files. Your native CAD files will therefore be loaded inside the Innovator server as a file-object and you can used the containing document -object to link them to a part in a BOM. The abstract class ItemType is the root for every classes in the diagram and defines some common attributes.

From another point of view, if you are interested in having deeper insight into the concepts used in Innovator, you should keep in mind that everything in Innovator is an Item, which in turn is an Instance of an Itemtype. So, i tried for a couple of months to define a metamodel for the modeling constructs used in Innovator. The following UML class diagram summarizes it:

The most impportant metaclasses are: ItemType and RelationshipType. An ItemType can be conceptually though of as been an abstract type, since each concrete ItemType has its implementation_type attribute set to either Single, Federated or Poly Item. A RelationshipType manages links to the related and the relating ItemType (the source of the relation) of the relationship as well as a link to an additional ItemType (the relationship ItemType), which can be used to store additional information on the RelationshipType. Conceptually a RelationshipType can be mapped to an association class in UML.

You will find in the programmer guide additional information as well as samples on how to access an ItemType and navigate through its structure. I hope, the diagrams above addressed your needs and will help you getting start with your application. For additional questions, feel free to ask.

 

 

 



morenton - Tuesday, August 25, 2009 11:33 AM:

Hi Rob,

Many thanks for taking time to answer to my question and for digging up a solution.

I'll try to use such a solution.

Regards,

--

Pascal



morenton - Thursday, August 20, 2009 8:19 AM:

Dear Fabrice (Am I right ? Is it your first name ?)

 

Many thanks for giving these informations and your UML diagrams which are very useful. I'm very glad of that and I'll examine in details your meta-model diagram.

On my side, I propose below an UML class diagram which maybe completes yours :

Am I right ? I guess that the next step will be : taking account of the versions of the items in this diagram.

Now, I have to discover how I can create "File" items and "Part File" relationship and upload the file content into the vault with using web serivces and AML. In fact, I want to complete that structure that were generated from a CATIA V5 cad model :

Can you help me or tell me where I can find informations on these topics ?

 

Regards,

--

Pascal



morenton - Wednesday, August 26, 2009 1:10 PM:

Hi,

To download a file, the URL pointing to the vault server works fine and is very easy to use. Thanks for the example.

I have another question (!) :

How can I upload a file into the vault "manually" (= without using the .Net API) ? The web service and the AML tags can create a new file and set the meta-data of the file but doesn't allow uploading the content of the file to the vault server.

Uploading a file into the ARAS vault is the last step to have a bidirectionnal connector for my CAD system ! Hope it's possible.

Regards,

--

Pascal



mogo_nem - Friday, August 21, 2009 2:52 AM:

Hello Pascal,

you are right. Fabrice is my first name :D. Thank you too for the more specific diagram. You guess it right, relationshiptype in Innovator are the same as association class in UML.

For creating, and loading files into an Innovator server,  the following methods of an Item representing a file should help you:

checkout() --> Checkout a file to a directory

attachPhysicalFile() --> Load a file into a specified Vault inside an Innovator Server.

May be the first hurdle for you will be understanding how to access and navigate an Item programmatically. For that, try to read the programmer guide. If you already master it,  having a reference to a document you want to add a file to, use the Innovator.newItem("File","add") method to create an file Item, then set its filename and actual_filename properties properly, then use the attachPhysicalFile method to load your native CAD-File in a specific vault. I think it should work. 

Additionally, i found surfing the internet a document about an intregation of Aras Innovator and CATIA. Here is the link to the file:

http://www.aras.com/Partners/xPLM/xPLM%20Innovator-Catia-EN-2008-11-26_A4.pdf

Regards,

Fabrice 

 

 



PeterSchroer - Wednesday, August 26, 2009 1:32 PM:

To upload a file "manually",   you need to create the AML transaction that adds the file,  and then send this AML,  along with a byte stream of the file to the VaultServer.aspx.    The VaultServer will save the file in the correct folder,  and then re-send the AML to the InnovatorServer.aspx to update all the meta data records.  

I have sample code in VB  and  C#.    Which language are you most comfortable with?

Peter.



morenton - Friday, August 21, 2009 5:51 AM:

Hi Fabrice,

Thanks for these informations and for the link to the xPLM connector which looks great.

For my previous question, keep in mind that I want only to use web services and a set of AML tags not the specific API I think you mentioned.

With web services and a set of AML tags, I already succeed in uploading a CAD model from CATIA V5 to the ARAS vault. It's very simple and I do appreciate this simplicity and the NASH interface to test some AML sets !

Now, I want to download the CAD model from the ARAS vault to the CATIA V5 session, still with web services and a set of AML tags. I have already the file ID. I guess I have to ask the server for an URL where I can download the file and launch a get HTTP request within this URL. But I found nothing in the documentation to do that.

Regards,

--

Pascal



morenton - Wednesday, August 26, 2009 1:46 PM:

Hi Peter,

Thanks for your proposal.

I prefer the VB example.

Regards,

--

Pascal



rvdijk - Thursday, March 22, 2012 11:15 AM:

Hi Peter,

I ran into this thread uploading files manually. My company is rolling out ARAS and I am one of the key players in this. Since we have a history of 6 years of developing / creating CAD files, PARTS, Manufacturing Parts, BOMs, etc before implementing ARAS you can imaging the workload to get everything in ARAS.

Where we are now; we managed to upload everything by using AMLStudio except (CAD) file-upload. So I am very interested in the code mentioned in your post above. Can you please help me with this?

BR,

Rob

[email protected]



parepalli - Monday, February 4, 2013 12:43 AM:

Hi Peter

Can you please post the sample C# code to upload a file manually ?

Thanks

Tharun



Rajnikant - Tuesday, January 5, 2016 3:44 AM:

Hi,

I need C# code for this. Please send the code ASAP.

 

Thank you



scottmahr - Wednesday, August 11, 2010 12:39 PM:

Hi, this has been a very useful thread so far, I have a question though.  I used the AML query 

 

<AML>

<Item type='Document' action='add'>

<item_number>00001</item_number>

<name>testdocument</name>

<description>myDescription</description>

<Relationships>

<Item type='Document File' action='add'>

<related_id>

<Item type='File' action='add'>

<actual_filename>C:ArasVaultgoldline.pdf</actual_filename>

<filename>cadFile</filename>

<Relationships>

<Item type='Located' action='add'>

<related_id>

<Item type='vault' action='get'><state>Released</state></Item>

</related_id>

</Item>

</Relationships>

</Item>

</related_id>

</Item>

</Relationships>

</Item>

</AML>

I used this from NASH, and everything worked but it doesn't seem to upload the file.  I saw earlier you said a bytestream was neccessary.  Is this possible from the NASH interface?
Thanks, 
Scott



PeterSchroer - Thursday, March 22, 2012 11:44 AM:

Looks like there have been several questions.   I'll give a quick summary answer first.

Aras Innovator architecture has 2 Servers  (Application Server and Vault Server).  of course these are both within IIS.  Can be same machine or separate servers, and for most customers the configuration uses multiple vault servers (distributed or replicated data).

When you want to interact with with the Aras Servers,  you send AML to the Application Server  (InnovatorServer.aspx).   When you want your transaction to handle a File in the payload,   this transaction needs to be sent to a VaultServer instead.      Why?      In order to create a highly scalable distrbuted vaulting configuration,  you do not want to send Files to the App Server and then have that server re-send the files to the correct Vault Server.   We really want to send the file from the client to the "closest" Vault Server to minimize check-in time and network bandwidth utilization.    

Typical sequence...   

1) your client code interacts with the Application Server,  and asks,  for this user, this type of file,   which Vault Server is preferred.

2) Now you have a URL to this "close" Vault Server.   Your client code creates the same AML,  but what you are sending is a multi-part HTML message that includes the AML (xml) and the file(s) Stream.   

3) Vault Server receives your request,  removes the file(s) from the multi-part message, stores them temporarily,  and then forwards the AML to the App Server.  

4) if The App Server approves the check-in,  it sends an OK back to the Vault Server,  who then permanently puts the file(s) into the correct folders.

The handshake between servers takes care of security etc.     if you are using the standard Aras client,   you don't worry about this,  just check-in the file,  the client code knows where to send the data.   If you are building your own client,  using the Aras provided IOM.DLL,  the IOM also takes care of directing the SOAP message to the correct server (if there is or not a file attached).        The AML tags, SOAP message, etc.  are well documented,  so you are free to create your own client or peer-server libraries for exchanging files with the Aras Servers...   just remember that when there is a File in the payload,  send the message to a Vault Server first.

 

If you are developing a BatchLoader to load a ton of CAD files,   I'd recommend writing a small Visual Studio program (C# or VB) using the Aras IOM,  and have it watch a folder for CAD files,   when one appears,  perform a check-in using the IOM.     I bet you'd need less than 200 lines of code to accomplish the whole thing. 

Post a more specific question about what you are doing,  and I'll try to help with sample code in C#, VB or even JAVA.

 

Peter.

 



mshen - Wednesday, December 1, 2010 12:33 PM:

Hi,

I have the same problem as Scott, anyone have an idea as to why it's not working correctly?  How do you get a file to upload to the vault through AML?



gchansc - Wednesday, September 30, 2015 10:52 AM:

l I just tested AML Query code in AML Studio 2.0 (Nash Interface).

Files cannot be uploaded thru AML Studio 2.0.

 

But If you have the subscribed BatchLoader, the same AML query code will work and will upload the file to the Vault server for you.

Hope this helps to anyone  is having trouble upload files thru AML Studio 2.0