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 - Portal Integration

sreerajav - Monday, August 8, 2011 2:29 AM:

I'm trying to Integrate ARAS with Liferay Portal Sever. I have lot of questions regarding this..

I downloaded and installed ARAS Innovator in my local system. I have MS SQL 2005 and IIS server installed in my windows XP Service Pack 3 - Version 2002 machine.

When i click on Aras Innovator Icon from my desktop, a browser window opened and showing an eroor message, saying..

Server Error in '/InnovatorServer/Client' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.

Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly"/>
</system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

 

 

Please help me to fix the error...

I just want to see how ARAS works and later i need to integrate ARAS features with Liferay Portal using  Web services..

Thanks



sreerajav - Thursday, August 25, 2011 3:46 AM:

Hi,

         I fixed this problem by  installing  ARAS in windows 2003-SP2 machine. Now i'm able to use the ARAS System..I installed .NET frame work suggested by the ARAS innovator (.net frameworks 3.5, 3.0, 2.0). I'm using MS SQL 2008 as the database server and windows explorer 7 as the browser. 

 

I integrated ARAS with Liferay Portal using web services published by ARAS innovator.

----------------------------------------------------------------------------------------------------------------------

1. I Created a new ItemType (NOUSPart) and published web services from ARAS innovator. (I got a .asmx link, but i need a wsdl link so i added ?wsdl at the end of the web service link )

2. Used NetBeans:(Tried with eclipse IDE  but no luck :( )

         2.1. Created a java application (not java web application. since i'm using java application i have a main class  (ARAS ) to run and test my application easily).

         2.2. Created web service client using the webservice link provided by the ARAS innovator. (Got some error in the created java class files, but its stil running without any problems :) )

         2.3. I created a new custom class (ARASWebServiceUtil) and inside that a static method (getPart()) from there i'm calling web service methods for authentication and then retrieving data from innovator. (I think this is a very important part of integration, many times we get "you are not logged into the innovator" error message, so i have mentioned here how you can send request to innovator with authentication)

           /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nous.aras;


import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.handler.MessageContext;
/**
 *
 * @author sreerajav
 */
class ARASWebServiceUtil {

    public static void getPart(){

        try {
            java.lang.String userName = "admin";
            java.lang.String userPassword = "innovator";
            java.lang.String locale = "";
            java.lang.String timeZone = "";
            java.lang.String aml = "<AML><Item type="NOUSPart" action="get" ><item_number>1000</item_number></Item></AML>";

            com.nous.ws.NOUSPart service =new com.nous.ws.NOUSPart();
            com.nous.ws.NOUSPart_Service ser= new com.nous.ws.NOUSPart_Service();
            com.nous.ws.NOUSPartSoap port = ser.getNOUSPartSoap12();
            port.logOn(userName, userPassword, locale, timeZone);
            Map<String, List<String>> headers = (Map<String, List<String>>) ((BindingProvider) port).getResponseContext().get(MessageContext.HTTP_RESPONSE_HEADERS);
           
            String sessionId = headers.get("Set-cookie").get(0).split(";")[0];
            List cookies = new ArrayList<String>();
            cookies.add(sessionId);
            headers.clear();
            headers.put("Cookie", cookies);

            ((BindingProvider) port).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, headers);
          
            com.nous.ws.ArrayOfNOUSPart results =port.getNOUSPartByAml(aml);
            for(com.nous.ws.NOUSPart part:results.getNOUSPart() ){
                System.out.print("Item Number: " + part.getItemNumber());
                System.out.print(" Item Name: " + part.getItemName());
                System.out.print(" Item Description: " + part.getItemDescription());
                System.out.print(" Item Cost: " + part.getItemCost());   
                System.out.print(" Item Image: " + part.getItemImage());
               
               
               
            }           
           
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
   
}

    2.4 Called getPart() method from my main class.

 

 

Thanks.