Error while bringing up ATG REST Webservice

Hi,
I am trying to bring a REST Webservice using ATG 9.3 version.I am getting the below errors in the startup of the instance.I have added "REST" module in the Manifest file and am able to see the entry " C:\ATG\ATG9.3\REST\config\config.jar" in CONFIGPATH(Please let me know if there are other ways to find if the service has come up properly).I am trying to connect to the server using JAVA based REST Client as given below.Also,i have placed the jar files in the CLASSPATH of the module.I am hoping that the webservice have not come up properly because of these startup errors.Please help me out to resolve this issue.
STARTUP EXCEPTION SEEN IN SERVER
========================
2012-06-25 06:20:36,815 INFO [STDOUT] Unable to create class atg.rest.servlet.HeadRestServlet for configuration /atg/dynamo/servlet/dafpipeline/HeadRestServlet java.lang.ClassNotFoundException: No ClassLoaders found for: atg.rest.servlet.HeadRestServlet
2012-06-25 06:21:56,325 INFO [nucleusNamespace.atg.userprofiling.sso.PassportAuthorityService] Starting passport authority service
2012-06-25 06:21:56,460 INFO [STDOUT] **** Error
2012-06-25 06:21:56,460 INFO [STDOUT]      
2012-06-25 06:21:56,460 INFO [STDOUT] Mon Jun 25 06:21:56 EDT 2012
2012-06-25 06:21:56,460 INFO [STDOUT]      
2012-06-25 06:21:56,460 INFO [STDOUT] 1340619716460
2012-06-25 06:21:56,460 INFO [STDOUT]      
2012-06-25 06:21:56,460 INFO [STDOUT] /
2012-06-25 06:21:56,460 INFO [STDOUT]      
2012-06-25 06:21:56,460 INFO [STDOUT] Unable to set configured property "/atg/dynamo/servlet/Initial.initialServices" atg.nucleus.ConfigurationException: Unable to resolve component /atg/dynamo/servlet/dafpipeline/HeadRestServlet
2012-06-25 06:22:06,528 INFO [STDOUT] Unable to create class atg.rest.RestConfiguration for configuration /atg/rest/Configuration java.lang.ClassNotFoundException: No ClassLoaders found for: atg.rest.RestConfiguration
2012-06-25 06:22:06,528 INFO [STDOUT] **** Error
2012-06-25 06:22:06,528 INFO [STDOUT]      
2012-06-25 06:22:06,528 INFO [STDOUT] Mon Jun 25 06:22:06 EDT 2012
2012-06-25 06:22:06,528 INFO [STDOUT]      
2012-06-25 06:22:06,528 INFO [STDOUT] 1340619726528
2012-06-25 06:22:06,528 INFO [STDOUT]      
2012-06-25 06:22:06,528 INFO [STDOUT] /
2012-06-25 06:22:06,528 INFO [STDOUT]      
2012-06-25 06:22:06,528 INFO [STDOUT] Unable to set configured property "/atg/rest/Initial.initialServices" atg.nucleus.ConfigurationException: Unable to resolve component /atg/rest/Configuration
CLASSPATH ENTRY
============
<classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/atg-rest-1.0.jar"/>
     <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/commons-fileupload-1.2.1.jar"/>
     <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/commons-io-1.4.jar"/>
     <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/dom4j-1.6.1.jar"/>
     <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/log4j-1.2.15.jar"/>
     <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/client-lib/java/atg-rest-client-1.0.jar"/>
REST CLIENT:
========
import java.util.HashMap;
import java.util.Map;
import atg.rest.client.RestClientException;
import atg.rest.client.RestComponentHelper;
import atg.rest.client.RestResult;
import atg.rest.client.RestSession;
public class RestClient {
RestSession mSession;
protected void execute() throws RestClientException {
     System.out.println("inside execute");
     mSession = RestSession.createSession("localhost", 8080, "<USERNAME>", "<PASSWORD>");
     mSession.setUseHttpsForLogin(false);
     try {
     mSession.login();
     System.out.println("Login Successful");
     catch (Throwable t) {
     System.out.println(t);
     finally {
     try {
     mSession.logout();
     System.out.println("Logout Successful");
     catch (RestClientException e) {
     System.out.println(e);
* @param args
public static void main(String[] args) {
     System.out.println("inside main");
     // TODO Auto-generated method stub
     RestClient testATGRest = new RestClient();
     try {
     testATGRest.execute();
     catch (Throwable t) {
     System.out.println(t);
REST CLIENT ERROR SEEN:
=================
atg.rest.client.RestClientException: java.io.IOException: Not Found http://localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser
atg.rest.client.RestClientException: This session is not logged in and cannot be logged out

I am trying to expose a method using REST Webservice and access the method using the browser.I have followed the steps specified in the thread:
http://ecomwriter.com/2012/03/19/building-restful-web-services-using-atg/ .Have added a component called ProfileRESTWebservice and have defined a method “getLoginInfo” in the class file. The following entry is placed in the restSecurityConfiguration.xml
<resource component="/atg/userprofiling/ProfileRESTWebservice" secure="true">
<method name="getLoginInfo" secure="false"></method>
</resource>
But, I am receiving the following exception when trying to access the method using http://localhost:8080/rest/bean/atg/userprofiling/ProfileRESTWebservice/getLoginInfo
10:07:33,147 ERROR [BeanServlet] Error code: 400
atg.beans.PropertyNotFoundException: Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
atg.rest.RestException: atg.beans.PropertyNotFoundException: Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
at atg.rest.output.RestOutputCustomizerImpl.outputBeanProperty(RestOutputCustomizerImpl.java:616)
at atg.rest.processor.BeanProcessor.doRESTGet(BeanProcessor.java:157)
at atg.rest.servlet.RestPipelineServlet.serviceRESTRequest(RestPipelineServlet.java:394)
at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:237)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:298)
at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:241)
Can you pl help me out on this?

Similar Messages

  • I am getting the below error while bringing up the Process Scheduler error

    Hello ,
    I am getting the below error while bringing up the Prcs Scheduler.
    Cannot open message catalog TMADMIN_CAT
    Starting Process Scheduler Server PSNT for Database FSUAT ...
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 752; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    INFO: BEA Tuxedo, Version 8.1, 32-bit, Patch Level 192
    NLS:4: Cannot open message catalog LIBTUX_CAT, set 1, num 1571; check TUXDIR=C:\
    bea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog LIBTUX_CAT, set 1, num 1570; check TUXDIR=C:\
    bea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 793; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    exec BBL -A :
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 820; check TUX
    DIR=C:\bea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 801; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    exec PSDSTSRV -p 1,600:1,1 -sPostReport -- -C psprcs.cfg -CD FSUAT -PS PSNT -A s
    tart -S PSDSTSRV :
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 1685; check TU
    XDIR=C:\bea\Tuxedo8.1, LANG=English_United States.1252
    tmboot: NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 827; check TUX
    DIR=C:\bea\Tuxedo8.1, LANG=English_United States.1252
    tmshutdown -y
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 753; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 916; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 907; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 936; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 948; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 775; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    Please suggest.

    Duplicate thread :
    Re: I am getting the attached error while bringing up the Prcs Scheduler
    Nicolas.

  • I am getting the attached error while bringing up the Prcs Scheduler

    I am getting the attached error while bringing up the Prcs Scheduler:
    Cannot open message catalog TMADMIN_CAT
    Starting Process Scheduler Server PSNT for Database FSUAT ...
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 752; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    INFO: BEA Tuxedo, Version 8.1, 32-bit, Patch Level 192
    NLS:4: Cannot open message catalog LIBTUX_CAT, set 1, num 1571; check TUXDIR=C:\
    bea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog LIBTUX_CAT, set 1, num 1570; check TUXDIR=C:\
    bea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 793; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    exec BBL -A :
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 820; check TUX
    DIR=C:\bea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 801; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    exec PSDSTSRV -p 1,600:1,1 -sPostReport -- -C psprcs.cfg -CD FSUAT -PS PSNT -A s
    tart -S PSDSTSRV :
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 1685; check TU
    XDIR=C:\bea\Tuxedo8.1, LANG=English_United States.1252
    tmboot: NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 827; check TUX
    DIR=C:\bea\Tuxedo8.1, LANG=English_United States.1252
    tmshutdown -y
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 753; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 916; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 907; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 936; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 948; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    NLS:4: Cannot open message catalog CMDTUX_CAT, set 1, num 775; check TUXDIR=C:\b
    ea\Tuxedo8.1, LANG=English_United States.1252
    Please advise, thank you

    Is that ever running ? Where/how did you installed tuxedo ? Which OS user was used for tuxedo install ?
    Nicolas.

  • Getting error response while trying to access REST webservice through Powerbuilder

    Hi Team,
    I am trying to access a rest webservice through powerbuilder 12.5(.net).The rest webservice is secured through basic authentication.I am passing the userid and password through powerbuilder to acess the service,But its returning an error .But while i am trying to accss the same REST webservice through SOAPUI, i am able to get the response.
    Please find the below line of code which i have written in powerbuilder.
    p_testcleint2 lp_rest
    string ls_string
    lp_rest=create p_testcleint2
    PBWebHttp.WebClientCredential lsCredential             //configure credentials
    lsCredential = create PBWebHttp.WebClientCredential
    lsCredential.AccessAuthentication = PBWebHttp.AuthenticationMode.Basic!
    lsCredential.Password='Pa$$word1!'
    lsCredential.Username='admin'
    lp_rest.restConnectionObject.ClientCredential = lsCredential  //add credentials to connection
    try
       lp_rest.PostMessage()
    catch (System.Exception ee)
      messagebox("Failure",string(ee.Message))
    end try
    Error i am getting as below :
    The remote server returned an error:(401) unauthorized.
    Can you please let me know why this error is coming or do i need to any extra paramert in the lsCredential to handle this.
    Thanks in advance.
    Regards
    Subrat

    Hi Chris,
    Thanks for the reply.
    Yes i checked -in fiddler, the basic authentication request is not generating in the fiddler.
    In the same Rest service if i turned off the basic authentication then call is happening in Powerbuilder and its displaying in fiddler also.
    Regards
    Subrat

  • Url service data control - problem while  POSTing to a restful webservice

    Hi,
    I am trying to call a restful webservice to add a new employee .I have created the url service data control. The service method consumes XML.
    When i am creating the url service datacontrol I selected the http method as POST and giving the servicepath and servicename as the source. After providing the xsd's path and all , when I test the url connection, I am getting the following error message:
    URL Test: Received Error: Method Not Allowed
    This might be because the clicking of the test url button is sending the get request, but the actual method is POST.
    Now under the data controls navigator, If i view the newly created data control, i could see the loadData(Object) method which i assume is for retrieving the data from the service. But since i have mentioned the method as POST, why such a method is created? Also if its there, can I use the same for insert and update? I have used this loadData (Object) method to create a button which calls the webservice upon click. Under the data control property inspector, i changed the supportsupdate attribute's value to true. But when i am trying to save the employee from the jspx page, I am getting the following message in the integrated weblogic's log
    Couldn't get access to the data source. Cause Unsupported Media Type exception in rest service
    And on the server side I am getting the following error message:
    No message body reader has been found for request class Employee, ContentType application/octet-stream.
    I think the request is not going as XML. But while creating the datacontrol i have specified the xsd document for the iput xml request. Does ADF automatically creates the XML from the input parametres? If it does not, then what could be done to achieve that? The default actionListener of the submit button is #{bindings.loadData.execute}. Do i have to override it to send the XML request? Or have I missed anything in trying to achieve what i intend?
    I had refered this link for reference :
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_53/jdtut_11r2_53.html
    Rampal
    Edited by: user12011868 on Jan 22, 2012 10:03 PM

    Hi Frank,
    I had specified the HTTP method as POST as well as PUT. But the same error is appearing in the both the cases.
    URL Test: Received Error: Method Not Allowed
    And when I am clicking on the 'Test URL Connection' , I can't see any option of selecting the HTTP method. This option only appears in the step 2 of creating the URL service data control where we mention the URL endpoint and the source.
    What could be the reason for the error.
    Rampal

  • Not able to print anything on ATG Rest webservices

    Hi..I am new to ATG Rest.. Just for the heads up, i followed following steps :-
    1 ) Added rest module to MANIFEST.MF
    2) Created a custom class which looks like this -
    package com.sgs.utils;
    import atg.nucleus.GenericService;
    public class SGSdummy extends GenericService {
      public void dummy() throws Exception {
        logDebug("sdbfhj");
    3) Mapped it to the property file -
    $class=com.sgs.utils.SGSdummy
    $scope=global
    loggingInfo=true
    4) Configured the security for above component in restSecurityConfiguration.xml
    <rest-security>
    <resource component="/atg/commerce/order/dummy" secure="false">
    <!--  <default-acl value="Profile$role$admin:read,write,execute"/> -->
      <method name="dummy" secure="false"/>
    </resource>
    </rest-security>
    I commented acl as i really didn't need it for a POC plus it was throwing 401 unauthorized.
    5) Now I am calling it from chrome's Advanced Rest Client. However, status is 200 OK but I am not able to print a logDebug or sysout in my SGSdummy class.
         When i check console, it says "Depth 0 is greater than maximum depth 0"
         I tried to change maxDepthAllowed in configuration.properties but in vain..I need help to proceed.

    Now I am trying to create a REST request using custom client. I believe it should be a POST request as I am trying to call a method. My custom client looks like this :-
    package atg.rest.client;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Map;
    import atg.rest.client.RestClientException;
    import atg.rest.client.RestComponentHelper;
    import atg.rest.client.RestResult;
    import atg.rest.client.RestSession;
    public class RestDemoClient {
      /** The m username. */
      private String mUsername;
      /** The m password. */
      private String mPassword;
      /** The m host. */
      private String mHost;
      /** The m port. */
      private int mPort;
      /** The m session. */
      private RestSession mSession = null;
       * Instantiates a new method call by rest.
      public RestDemoClient() {
       * Execute.
       * @throws RestClientException the rest client exception
      private void execute() {
       mSession = RestSession
         .createSession(mHost, mPort, mUsername, mPassword);
       mSession.setUseHttpsForLogin(false);
       Map<String,Object> params = new HashMap<String,Object>();
       params.put("atg-rest-input", "json"); 
       RestResult result = null;
       try {
        result = RestComponentHelper.executeMethod("/atg/rest/SGSdummy", "addOrder", new
          Object[] {}, params, mSession);
       } catch (RestClientException e1) {
        System.out.println(e1);
       try {
        if (result != null && result.getResponseCode() == 200) {
         System.out.println("Executed Successfully.");
        } else {
         System.out
           .println("Error while execution : Error Code ["
             + result.getResponseCode()
             + "] and Message ["
             + result.getResponseMessage() + "]");
       } catch (IOException e) {
        System.out.println("Error while execution Successfully.");
       * @param args
      public static void main(String[] args) {
       RestDemoClient stepUtils = new RestDemoClient(); 
       stepUtils.mUsername = "admin";
       stepUtils.mPassword = "admin";
       stepUtils.mHost = "localhost";
       stepUtils.mPort = 8080; 
       stepUtils.execute();
    But everytime i execute this, I get following exception :-
    atg.rest.client.RestClientException: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/rest/SGSdummy/addOrder
    Exception in thread "main" java.lang.NullPointerException
      at atg.rest.client.RestDemoClient.execute(RestDemoClient.java:64)
      at atg.rest.client.RestDemoClient.main(RestDemoClient.java:82)
    I tried different set of credentials but nothing seems to work out for me.
    However it always works fine for GET requests. I am able to see status as 200 OK but it never hits my addOrder() method in SGSdummy class, hence I am not able to print sysout in that method. For status 200 OK GET requests, my logs say "[JSONOutputCustomizer] Depth 0 is greater than maximum depth 0. Outputting object of class java.lang.String as string rather than continuing to nest."
    Can you give me some pointers how to run it without any errors plus it should print a random sysout in my custom class. Thanks

  • Error while using  soap adapter in webservice to sap system scenario

    Hi everybody,
    i got the error while using saop adapter in scenario(sender webservice----->sap system)
    error is
    HTTP error:couldnot post file
    '/XISOAPAdapter/MessageServlet:Channel=:BS1:SPA.&amp;
    version+3.0&amp;sender.Service=BS1&amp;interface=http%3ASP%5OUTBOUND'on server 'XI03'(500)

    check with ur basis people

  • Getting error while running CRS ATG 10.

    hi all,
    im getting this error whenever i hit home page of CRS
    Caused by (#2):java.lang.SecurityException: class "atg.commerce.order.OrderHolder$$EnhancerByCGLIB$$e7ef303c"'s signer information does not match signer information of other classes in the same package
         at java.lang.ClassLoader.checkCerts(ClassLoader.java:807)
         at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
         at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
    please let me know anything i need to configure...
    Sam

    ATG Install Notes:
    (DOC-166813) SecurityException errors can appear in ATG applications due to a problem with the
    JBoss cglib library.
    See the JBoss bug https://jira.jboss.org/jira/browse/JBPAPP-2971
    Workaround: Replace the jboss-eap-5.0/jboss-as/common/lib/cglib.jar with the unsigned
    version, which can be downloaded from the following URL:
    http://repository.jboss.com/maven2-brew/cglib/cglib/2.2/cglib-2.2.jar
    Edited by: user559013 on Jan 24, 2012 9:09 AM

  • ATG REST Webservices - XML response

    Hi,
    I need to build an ATG REST component which returns the response in XML format and it is done.
    The question that I have here is that, in the XML response, the response XML that I exactly want is embedded inside <atgResponse>..</atgresponse> tag.
    For ex:
    The actual response that I need in the client side.
    <address>
    <address1>123 Main st</address1>
    <address2>Apt 12</address2>
    <city>Attleboro</city>
    <state>MA</state>
    <zip>02073</zip>
    </address>
    The response that I am getting back from my REST component:
    <atgResponse>
    <address>
    <address1>123 Main st</address1>
    <address2>Apt 12</address2>
    <city>Attleboro</city>
    <state>MA</state>
    <zip>02073</zip>
    </address>
    </atgResponse>
    Do I need to handle the logic of taking the xml that I needed from the XML response that is coming from my REST component, in the client side only?
    The other concern that I have is, I do not want my client application to know that I am using ATG REST services.
    Appreciate any help in this.
    Thanks in advance,
    Gopinath Ramasamy

    I have not tried it but I would probably try to extend XMLOutputCustomizer and override sendToOutputStream(Object pDocument, DynamoHttpServletResponse pResponse) method as per the requirement. Here pDocument would actually be an instance of org.dom4j.Document so you can access and update its root element. You can also process other output elements as well by iterating through the elements and when done write the Document object through org.dom4j.Document to XMLWriter. Something like below:
    Document doc = (Document)pDocument;
    //process Document object
    org.dom4j.io.XMLWriter writer = new org.dom4j.io.XMLWriter(pResponse.getWriter(), createDefaultOutputFormat());
    writer.write(doc)Override the default /atg/rest/output/XMLOutputCustomizer configuration to refer your class and see if it serves your purpose.
    API reference for XMLOutputCustomizer:
    http://docs.oracle.com/cd/E24152_01/Platform.10-1/apidoc/atg/rest/output/XMLOutputCustomizer.html

  • Access ATG REST webservices from javascript..?

    Hi All,
    Can we access ATG REST web services from Javascript/jQuery..? If yes, then how..?
    Thanks,
    Vishnu

    Hi Nitin, I'm able to access /atg/dynamo/Configuration component's properties using REST services from following code -
    */atg/rest/security/restSecurityConfiguration.xml*
    <resource component="/rest/bean/atg/dynamo/Configuration">
         <default-acl value="[email protected]:read,write,execute"/>
         <property name="httpPort" secure="false"/>
    </resource>
    client Java code :
    public class RestClientRequest {
         public static void main(String[] args) {
              RestSession mSession = RestSession.createSession("localhost", 8180, "[email protected]", "chinna");
              mSession.setUseHttpsForLogin(false);
              try{
                   String loginStatus = mSession.login();
                   if(loginStatus == null || "null".equals(loginStatus)){
                        mSession=null;
                        System.out.println("Login failed");
                   else{
    RestResult result = RestComponentHelper.getPropertyValue("/atg/dynamo/Configuration", "httpPort", null, mSession);
    String test = result.readInputStream();
    System.out.println("\n\n"+result.readInputStream());
    but getting exception when i try to get repository item using the below code
    <rest-security>
    <resource component="/rest/repository/atg/commerce/catalog/ProductCatalog">
    <default-acl>[email protected]:read,write,execute"</default-acl>
    </resource>
    </rest-security>
    Client Java code:
    public class RestClientRequest {
         public static void main(String[] args) {
              RestSession mSession = RestSession.createSession("localhost", 8180, "[email protected]", "chinna");
              mSession.setUseHttpsForLogin(false);
              try{
                   String loginStatus = mSession.login();
                   if(loginStatus == null || "null".equals(loginStatus)){
                        mSession=null;
                        System.out.println("Login failed");
                   else{
    RestResult result = RestResult result = RestRepositoryHelper.getItems("/atg/commerce/catalog/ProductCatalog", "product", null, mSession);
    String test = result.readInputStream();
    System.out.println("\n\n"+result.readInputStream());
    Exception :
    Login successful
    Login Status : ATG3990000
    atg.rest.client.RestClientException: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8180/rest/repository/atg/commerce/catalog/ProductCatalog/product
         at atg.rest.client.RestSession.createHttpRequest(RestSession.java:755)
         at atg.rest.client.RestSession.createHttpRequest(RestSession.java:722)
         at atg.rest.client.RestRepositoryHelper.getItems(RestRepositoryHelper.java:188)
         at in.vcarve.RestClientRequest.main(RestClientRequest.java:26)
    Caused by: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8180/rest/repository/atg/commerce/catalog/ProductCatalog/product
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at atg.rest.client.RestSession.createHttpRequest(RestSession.java:745)
         ... 3 more
    Thanks,
    Vishnu

  • Connection issue while accessing a jersey restful webservice using aysynch callback method.

    Hi,
    I am having one consumer and producer application. Producer is a Jersey restful webservice deployed in a tomcat server. Consumer side I am using executor service to create one scheduler which will keep on polling and creates a new Thread where I am making a asynch callback req to the service(Producer). But the problem is after my asynch executor thread will die still I can see one connection in deployed server.
    I used yourkit profiler, I can see one thread in runnable state even when the asynch executor dies.
    I think bec of scheduler still there is a connection between client and service. I wanted to create multiple consumer to process multiple thread but because of thread leakage I am not able to proceed.
    Could you please help me on this?

    Err, close the connection?

  • Error While creating User using userservcenter Webservice

    Hi All,
    I have generated the java client stub from the um_workflowSaveCreateProfile.wsdl file successfully and I have developed one client code to call the web service to create user in Oracle Internet Directory.
    I am invoking one workflow for creation of the user which accepts four attributes (sn, cn, uid, userPassword),it is working fine when sn, cn, uid attributes are mandatory only, but if I make userPassord as mandatory, it is showing me error : Not all of the required parameters for this operation were specified.
    I am using the below client Code to call the service:
    package com.example;
    import java.util.Properties;
    import org.apache.axis.AxisFault;
    import com.oblix.CreateUser.*;
    public class CreateUserClient {
    public static void main(String Args[]) throws AxisFault{
    try{
    OblixIDXML_um_workflowSaveCreateProfile_ServiceLocator loc = new OblixIDXML_um_workflowSaveCreateProfile_ServiceLocator();
    OblixIDXMLPortType port = loc.getOblixIDXML_um_workflowSaveCreateProfile_Port();
    Authentication myauth = new Authentication();
    myauth.setLogin("orcladmin");
    myauth.setPassword("1111Aaaa");
    Request myrequest = new Request();
    myrequest.setFunction("workflowSaveCreateProfile");
    myrequest.setApplication("userservcenter");
    myrequest.setVersion("NPWSDL1.0");
    RequestParams myparams = new RequestParams();
    myparams.setObDomainName("dc=ad,dc=company,dc=com");
    //myparams.setObWorkflowName("obworkflowid=wfqs20090206T1424241321438,obcontainerId=workflowDefinitions,o=Oblix,dc=ad,dc=company,dc=com");
    myparams.setObWorkflowName("obworkflowid=wfqs20090206T170318571544,obcontainerId=workflowDefinitions,o=Oblix,dc=ad,dc=company,dc=com");
    java.math.BigInteger myint2 = new java.math.BigInteger("4");
    myparams.setNoOfFields(myint2);
    AttributeParams attributeParams = new AttributeParams();
    GenericAttribute []genericAttribute = new GenericAttribute[10];
    GenericAttribute mygenericattr = new GenericAttribute();
    mygenericattr.setAttrName("cn");
    mygenericattr.setAttrOperation("ADD");
    String[] cn = {"Akshay"};
    mygenericattr.setAttrNewValue(cn);
    genericAttribute[0] = mygenericattr;
    GenericAttribute mygenericattr1 = new GenericAttribute();
    mygenericattr1.setAttrName("sn");
    mygenericattr1.setAttrOperation("ADD");
    String[] sn = {"koul"};
    mygenericattr1.setAttrNewValue(sn);
    genericAttribute[1] = mygenericattr1;
    GenericAttribute mygenericattr3 = new GenericAttribute();
    mygenericattr3.setAttrName("uid");
    mygenericattr3.setAttrOperation("ADD");
    String[] uid = {"akshay_koul"};
    mygenericattr3.setAttrNewValue(uid);
    genericAttribute[2] = mygenericattr3;
    PasswordAttribute []pwdatrarr= new PasswordAttribute[1];
    PasswordAttribute pwdatr= new PasswordAttribute();
    pwdatr.setAttrName("userPassword");
    pwdatr.setAttrOperation("ADD");
    pwdatr.setAttrNewValue("abcd1234");
    pwdatr.setAttrConfirmValue("abcd1234");
    pwdatrarr[0] = pwdatr;
    System.out.println("the pwd is"+pwdatrarr.toString());
    attributeParams.setGenericAttribute(genericAttribute);
    attributeParams.setPasswordAttribute(pwdatrarr);
    myparams.setAttributeParams(attributeParams);
    myrequest.setParams(myparams);
    Oblix output = port.oblixIDXML_um_workflowSaveCreateProfile(myauth, myrequest);
    System.out.println("result of the request\n");
    System.out.println();
    //System.out.println("test:"+output.getObError().getObStatus());
    // System.out.println("test1:"+output.getObError().getObRequestInfo());
    System.out.println("test2:"+output.getObError().getObTextMessage()[0].toString());
    System.out.println("test2:"+output.getObError().getObTextMessage()[0]);
    System.out.println("test3:"+output.getObError().getObTextMessage(0));
    System.out.println("status is " + output.getObStatus());
    }catch(Exception e){
    System.out.println("the exception is:"+e.getMessage());
    e.printStackTrace();
    Please suggest me where i am wrong !!!
    Thanks in Advance
    Akshay

    Hi,
    I guess, create workflow does not accept the password attribute while creating user account.
    You have to create the account using createprofile web service then update the password using changeprofile web service.
    I think this limitation is strategic, if you have password policies enabled, policies are applied to the container of the accounts.
    So OAM needs to have the DN of the user account to check if there are any password policies associated with the container during password updates,
    which might not be possible while using createProfile web service.
    - Sandeep

  • Error while calling BI Publisher 11g webservice.URGENT

    I am trying to schedule existing report and pass parameter using web service API.
    This is soap envelope I am passing in the web service call:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <pub:scheduleReport xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
    <scheduleRequest>
    <deliveryChannels>
    <emailOptions>
    <emailBody>webservice test</emailBody>
    <emailFrom>[email protected]</emailFrom>
    <emailSubject>test report</emailSubject>
    <emailTo>xxx</emailTo>
    </emailOptions>
    </deliveryChannels>
    <reportRequest>
    <attributeFormat>excel2000</attributeFormat>
    <reportAbsolutePath>/~weblogic/List of Requests 3.xdo</reportAbsolutePath>
    <*paramNameValues>*
    *<paramNameValue>*
    *<name>P_REQUEST_ID</name>*
    *<multiValuesAllowed>false</multiValuesAllowed>*
    *<values>*
    *<value>166</value>*
    *</values>*
    *</paramNameValue>*
    *</paramNameValues>*
    </reportRequest>
    <userJobName>test_job</userJobName>
    </scheduleRequest>
    <userID>test</userID>
    <password>test123</password>
    </pub:scheduleReport>
    </soapenv:Body>
    </soapenv:Envelope>
    This is the response I am getting as the result of the call:
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXException: Invalid element in oracle.xdo.webservice.v2.ReportRequest - paramNameValues</faultstring>
    <detail><ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">xxx</ns1:hostname></detail></soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    So error message says: org.xml.sax.SAXException: Invalid element in oracle.xdo.webservice.v2.ReportRequest - paramNameValues
    I think there is a problem with the format of ParamNameValues, just don't know what exactly is the problem.
    Any ideas ?
    Thanks
    Mikhail
    Edited by: mike621062 on Nov 30, 2012 12:59 PM
    Edited by: mike621062 on Nov 30, 2012 1:00 PM
    Edited by: mike621062 on Nov 30, 2012 1:00 PM
    Edited by: mike621062 on Nov 30, 2012 4:27 PM
    Edited by: mike621062 on Dec 1, 2012 9:10 AM

    Hi, double check the documentation.
    I have the following elements to pass a parameter value:
         <sch:parameterNameValues>
                        <sch:listOfParamNameValues>
                             <sch:item>
                                  <sch:multiValuesAllowed>false</sch:multiValuesAllowed>
                                  <sch:name>g_SortBy</sch:name>
                                  <sch:refreshParamOnChange>false</sch:refreshParamOnChange>
                                  <sch:selectAll>false</sch:selectAll>
                                  <sch:templateParam>false</sch:templateParam>
                                  <sch:useNullForAll>false</sch:useNullForAll>
                                  <sch:values>
                                       <sch:item>C</sch:item>
                                  </sch:values>
                             </sch:item>
                        </sch:listOfParamNameValues>
         </sch:parameterNameValues>
    paulo.
    p.s. Ignore the XML namespace prefix sch: in my example.
    Edited by: ptravassos on Dec 17, 2012 9:10 AM

  • SOAPFaultException error while sending xml file to webservice

    hi I have a web service and client application.
    in my client application I am sending a xml file to web service. And it is getting xml and sending its content to database. I have two different xml file. One of them is always causing an error below. Please help thanks in advance.
    Exception in thread "AWT-EventQueue-0" javax.xml.ws.soap.SOAPFaultException: Unknown fault type:class java.lang.NoClassDefFoundError
    at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:171)
    at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:94)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:240)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
    at $Proxy29.loadXML(Unknown Source)
    at client.WSClient.sendXML2WS(WSClient.java:405)
    at client.Client.send2WS(Client.java:1806)
    at client.Client.btnSendActionPerformed(Client.java:1779)
    at client.Client.access$1000(Client.java:95)
    at client.Client$11.actionPerformed(Client.java:716)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6041)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5806)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4413)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4243)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2440)
    at java.awt.Component.dispatchEvent(Component.java:4243)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

    The HTTP response 504 means that the server, acting as a gateway, has not received a response from an upstream server in the time it expected.
    I think this is problem is due to the remote server that receives the XML and takes too long to return a response to the local application that posted the XML.
    Try HttpClient and set the timeout variable of the HttpClient instance used.
    Here http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/examples/PostXML.java?revision=480424&view=markup
    a Post XML sample.
    NB: HttpClient > setTimeout method is deprecated. See : http://jakarta.apache.org/commons/httpclient/apidocs/index.html for an alternative
    Hope That Helps

  • Error while Deploying WebApp in exploded form on 6.1

    Hi,
    I am trying to deploy a webapp named "test" in the exploded form on 6.1 and the following is what I have put in the config.xml file. I am using SP2.
    <Application Deployed="true" Name="test" Path=".\config\coolDomain\applications">
    <WebAppComponent Name="test" Targets="myserver" URI="test>
    </Application>
    I receive the following error while bringing up the server :
    <Feb 28, 2002 2:00:48 PM PST> <Error> <HTTP> <[test] Error reading Web applicatio
    n ".\config\coolDomain\applications\test"
    java.net.UnknownHostException: java.sun.com
    Any help would be appreciated.
    Thanks !

    Ok, I got it , My webapp now gets registered. Thanks !!!!
    Lata Rao <[email protected]> wrote:
    Hi,
    I am using 6.1 with Service pack 2.But this did not as yet solve the
    problem.
    Also weblogic_sp.jar included in the classpath which I suppose is the
    service pack jar is not available in the lib directory. Has the service
    pack been incorporated in some other jar ?
    Any insight into this will be appreciated.
    Thanks much.
    - Lata Rao.

Maybe you are looking for