1 Reply Latest reply on Jan 22, 2013 10:26 AM by $Nith$

    Unable to use component in workbench

    prasaxen Level 1

      Hi,

       

      I developed a sample component with a single service and 2 operations mapped to 2 methods of implementation class.

       

      Also  i tried using composite editors in component.xml and also used property-editor tags.

       

      Component gets installed properly and start properly.

       

      Even when i try to put operations on process map, both operations comes, but as soon as i click on process properties it gets hanged, nothing happens it shows Input and Ouput sections are loading but nothing happens....

       

      My component.xml file looks like as:-

       

      <component xmlns="http://adobe.com/idp/dsc/component/document">

       

       

          <component-id>com.tcs.sample.customer</component-id>

          <version>${project.version}</version>    <!--Pick up version from project pom.xml-->

          <!--<load-class>com.tcs.impl.CustomerServiceImpl</load-class> -->

          <bootstrap-class>com.tcs.BootstrapService</bootstrap-class>

          <lifecycle-class>com.tcs.LifecycleService</lifecycle-class>

          <descriptor-class>com.adobe.idp.dsc.component.impl.DefaultPOJODescriptorImpl</descriptor- class>

          <search-order>PARENT_LAST</search-order>

          <!--<class-path></class-path> Include external jar if you've dependencies-->

          <supports-export>true</supports-export>

       

       

          <export-packages>

              <package>com.tcs.impl</package>

              <package>com.tcs.model</package>

          </export-packages>

       

       

          <data-types>

              <data-type java-class="com.tcs.model.Customer" id="com.tcs.model.Customer" standard="true"/>

              <data-type java-class="com.tcs.model.GenderTypes" id="com.tcs.model.GenderTypes" standard="true"/>

          </data-types>

       

       

       

       

          <editors>

              <composite-editor id="CustomerEditorType">

                  <composite-type>com.tcs.model.Customer</composite-type>

                  <attributes>

                      <attribute name="firstName" title="First Name"/>

                      <attribute name="lastName" title="Last Name"/>

                      <attribute name="age" title="Age">

                          <property-editor editor-id="com.adobe.idp.dsc.propertyeditor.system.SpinnerPropertyEditorComponent"/>

                      </attribute>

                      <attribute name="dob" title="Date of Birth">

                          <property-editor editor-id="com.adobe.idp.dsc.propertyeditor.system.CalendarPropertyEditorComponent"/>

                      </attribute>

                  </attributes>

              </composite-editor>

          </editors>

       

       

          <services>

              <service name="customer" title="Customer Service" orchestrateable="true">

                  <implementation-class>com.tcs.impl.CustomerServiceImpl</implementation-class>

                  <request-processing-strategy>SINGLE_INSTANCE</request-processing-strategy>

                  <supported-connectors>REST,SOAP</supported-connectors>

                  <specifications>

                      <specification spec-id="com.tcs.CustomerService"/>

                  </specifications>

                  <hint>customer service custom component</hint>

                  <auto-deploy category-id="Customer" service-id="customer" minor-version="0" major-version="1"/>

                  <config-parameter name="sample" type="java.lang.String" title="Sample config param for customer">

                      <hint>sample config param</hint>

                  </config-parameter>

                  <operation-config>

                      <operation-name>*</operation-name>

                      <transaction-type>Container</transaction-type>

                      <transaction-propagation>Supports</transaction-propagation>

                  </operation-config>

                  <operations>

                      <operation anonymous-access="true" name="createCustomer" method="createCustomer">

                          <input-parameter name="customer" type="com.tcs.model.Customer" title="customer">

                              <property-editor editor-id="CustomerEditorType"/>

                              <supported-expr-types>Variable</supported-expr-types>

                          </input-parameter>

                          <input-parameter name="genderTypes" type="com.tcs.model.GenderTypes" title="gender">

                              <property-editor editor-id="com.adobe.idp.dsc.propertyeditor.system.Enum"/>

                              <supported-expr-types>Variable</supported-expr-types>

                          </input-parameter>

                          <output-parameter name="customerId" type="int"/>

                      </operation>

                      <operation anonymous-access="true" name="getCustomerName" method="getCustomerName">

                          <input-parameter name="customerId" type="int" title="customerId">

                              <supported-expr-types>Literal,XPath,Template,Variable</supported-expr-types>

                          </input-parameter>

                          <output-parameter name="name" type="java.lang.String"/>

                      </operation>

                  </operations>

              </service>

          </services>

      </component>

       

      And contract of project is as

       

      public interface CustomerService {

       

       

          public int createCustomer(Customer customer, GenderTypes genderTypes);

          public String getCustomerName(int customerId);

      }

       

      And model class is Customer with proper getters and setters for firstName,lastName,age,gender,dob

      GenderTypes is a ENUM with Male, Female as values.

       

       

      Please help me.

       

      Thanks,

      Prashast

        • 1. Re: Unable to use component in workbench
          $Nith$ Level 4

          I hope you have created a basic (simple) DSC component.

           

          In the xml you have mentioned about two more class definitions "bootstrap-class" and "lifecycle-class".

           

          have you created those classes?

           

          If not, just remove those entries from the xml and deploy the component again. For a basic DSC you need not write any bootstrap/lifecycle implementations.

           

          Thanks,

          Nith