0 Replies Latest reply on Jun 13, 2012 2:56 AM by timb51700799

    Custom component - How to set type within Array

    timb51700799

      I have a LiveCycle service which is exposed as a webservice. The service contains a custom component that puts the XML into a data structure. This last component was developped because the software that uses the webservice couldn't handle the initial output (the entire xml was put as one big blob in the WSDL).

      With the custom component, it was achieved that all output types are shown as a complex type. But with the List, the type within the list is "anyType", where it is supposed to be a complex type of type MarketingAttribute.

       

      Below is the output of the WSDL definition. The piece in red is the one I want to change to another complex type.

       

      <complexType name="Account">
      <sequence>
      <element name="city" nillable="true" type="xsd:string"/>
      <element name="country" nillable="true" type="xsd:string"/>
      <element name="iD" nillable="true" type="xsd:string"/>
      <element name="level" nillable="true" type="xsd:string"/>
      <element name="name" nillable="true" type="xsd:string"/>
      <element name="postalCode" nillable="true" type="xsd:string"/>
      <element name="street" nillable="true" type="xsd:string"/>
      </sequence>
      </complexType>
      
      <complexType name="MyArrayOf_xsd_anyType">
      <sequence>
      <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:anyType"/>
      </sequence>
      </complexType>
      
      <complexType name="Contact">
      <sequence>
      <element name="account" nillable="true" type="impl:Account"/>
      <element name="bDBusiness" nillable="true" type="xsd:string"/>
      <element name="city" nillable="true" type="xsd:string"/>
      <element name="country" nillable="true" type="xsd:string"/>
      <element name="departmentICWC" nillable="true" type="xsd:string"/>
      <element name="fax" nillable="true" type="xsd:string"/>
      <element name="firstName" nillable="true" type="xsd:string"/>
      <element name="houseNR" nillable="true" type="xsd:string"/>
      <element name="lastName" nillable="true" type="xsd:string"/>
      <element name="mail" nillable="true" type="xsd:string"/>
      <element name="marketingAttributes" nillable="true" type="impl:MyArrayOf_xsd_anyType"/>
      <element name="organisationICWC" nillable="true" type="xsd:string"/>
      <element name="pOBox" nillable="true" type="xsd:string"/>
      <element name="postalCode" nillable="true" type="xsd:string"/>
      <element name="street" nillable="true" type="xsd:string"/>
      <element name="telephone" nillable="true" type="xsd:string"/>
      <element name="title" nillable="true" type="xsd:string"/>
      <element name="titleAcademic" nillable="true" type="xsd:string"/>
      </sequence>
      </complexType>
      

       

       

       

      This is the data-types piece of my component.xml

       

      <data-types>
              <data-type id="com.livecycle.datatype.Contact" title="Contact" standard="true"/>
              <data-type id="com.livecycle.datatype.Account" title="Account" standard="false"/>
              <data-type  id="com.livecycle.datatype.MarketingAttribute" title="MarketingAttribute" standard="false"  />
       </data-types>
      

       

      This is the get/set method for the list within the Java class

       

      public List<MarketingAttribute> getMktAttrList() {
              return mktAttrList;
      }
          public void setMktAttrList(List<MarketingAttribute> mktAttrList) {
              this.mktAttrList = mktAttrList;
      }
      

       

      I have tried with List, ArrayList, overriding the ArrayList and using as a normal array[]. All of them resulting in the same.