AQ table for complex type creation

I have a type containing nested tables, it looks like that:
create or replace type aq_student_reg_queue_type as object (
XML_ID varchar2(16),
trigger_name varchar2(32),
tm_transaction_id varchar2(30),
tm_transaction_type varchar2(30),
person aq_person_tm_type,
resources aq_community_resource_list);
aq_community_resource_list is table of aq_community_resource
aq_community_resource is another type containing table of resources
When I'm trying to create queue table for such payload I have an error that I have to specify nested table column or attribute. How to do that ? I can't find it somehow.

The problem is that you need to specify a storage clause for nested tables when you use a nested table inside a database table. When creating a queue, a table is created under the hood, which lacks a storage clause for the nested table. I don't know a way to provide this clause to AQ. A workaround is to use varrays instead. See this example:
SQL> create or replace type aq_community_tm_type as object(
  2  resource_code varchar2(30)
  3  );
  4  /
Type is aangemaakt.
SQL> create or replace type aq_community_tm_list as table of aq_community_tm_type;
  2  /
Type is aangemaakt.
SQL> create or replace type aq_community_resource as object(
  2  subscriber varchar2(30),
  3  resource_list aq_community_tm_list
  4  );
  5  /
Type is aangemaakt.
SQL> create or replace type aq_community_resource_list as table of aq_community_resource;
  2  /
Type is aangemaakt.
SQL> create or replace type aq_person_tm_type as object (
  2  PERSON_LDAP varchar2(30),
  3  FIRST_NAME varchar2(30),
  4  MIDDLE_NAME varchar2(30),
  5  SURNAME varchar2(30),
  6  GENDER varchar2(1),
  7  TITLE varchar2(16),
  8  DATE_OF_BIRTH date,
  9  PREFERRED_EMAIL varchar2(100),
10  PREFERRED_PHONE varchar2(20),
11  ORIGINATING_GROUP varchar2(50),
12  SUB_GROUP varchar2(2000),
13  LMS_DOMAIN_ID integer,
14  LMS_ROLE_ID integer,
15  COURSE_CODE varchar2(16),
16  COURSE_INSTANCE_CODE varchar2(16),
17  COURSE_INSTANCE_DATE date,
18  REGISTRATION_DATE date,
19  REF_OBJECT_ID number
20  );
21  /
Type is aangemaakt.
SQL> create or replace type aq_person_queue_tm_type as object (
  2  XML_ID varchar2(16),
  3  trigger_name varchar2(32),
  4  tm_transaction_id varchar2(30),
  5  tm_transaction_type varchar2(30),
  6  person aq_person_tm_type,
  7  resources aq_community_resource_list
  8  );
  9  /
Type is aangemaakt.
SQL> begin
  2    dbms_aqadm.create_queue_table
  3    ( queue_table        => 'my_queue_table'
  4    , queue_payload_type => 'aq_person_queue_tm_type'
  5    );
  6  end;
  7  /
begin
FOUT in regel 1:
.ORA-22913: must specify table name for nested table column or attribute
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2830
ORA-06512: at "SYS.DBMS_AQADM", line 58
ORA-06512: at line 2This probably is the error you are experiencing (hint: next time please provide it with your question).
When you use varrays, it will work:
SQL> drop type aq_person_queue_tm_type
  2  /
Type is verwijderd.
SQL> drop type aq_person_tm_type
  2  /
Type is verwijderd.
SQL> drop type aq_community_resource_list
  2  /
Type is verwijderd.
SQL> drop type aq_community_resource
  2  /
Type is verwijderd.
SQL> drop type aq_community_tm_list
  2  /
Type is verwijderd.
SQL> drop type aq_community_tm_type
  2  /
Type is verwijderd.
SQL> create or replace type aq_community_tm_type as object(
  2  resource_code varchar2(30)
  3  );
  4  /
Type is aangemaakt.
SQL> create or replace type aq_community_tm_list as varray(100) of aq_community_tm_type;
  2  /
Type is aangemaakt.
SQL> create or replace type aq_community_resource as object(
  2  subscriber varchar2(30),
  3  resource_list aq_community_tm_list
  4  );
  5  /
Type is aangemaakt.
SQL> create or replace type aq_community_resource_list as varray(10) of aq_community_resource;
  2  /
Type is aangemaakt.
SQL> create or replace type aq_person_tm_type as object (
  2  PERSON_LDAP varchar2(30),
  3  FIRST_NAME varchar2(30),
  4  MIDDLE_NAME varchar2(30),
  5  SURNAME varchar2(30),
  6  GENDER varchar2(1),
  7  TITLE varchar2(16),
  8  DATE_OF_BIRTH date,
  9  PREFERRED_EMAIL varchar2(100),
10  PREFERRED_PHONE varchar2(20),
11  ORIGINATING_GROUP varchar2(50),
12  SUB_GROUP varchar2(2000),
13  LMS_DOMAIN_ID integer,
14  LMS_ROLE_ID integer,
15  COURSE_CODE varchar2(16),
16  COURSE_INSTANCE_CODE varchar2(16),
17  COURSE_INSTANCE_DATE date,
18  REGISTRATION_DATE date,
19  REF_OBJECT_ID number
20  );
21  /
Type is aangemaakt.
SQL> create or replace type aq_person_queue_tm_type as object (
  2  XML_ID varchar2(16),
  3  trigger_name varchar2(32),
  4  tm_transaction_id varchar2(30),
  5  tm_transaction_type varchar2(30),
  6  person aq_person_tm_type,
  7  resources aq_community_resource_list
  8  );
  9  /
Type is aangemaakt.
SQL> begin
  2    dbms_aqadm.create_queue_table
  3    ( queue_table        => 'my_queue_table'
  4    , queue_payload_type => 'aq_person_queue_tm_type'
  5    );
  6  end;
  7  /
PL/SQL-procedure is geslaagd.
SQL> begin
  2    dbms_aqadm.drop_queue_table('my_queue_table');
  3  end;
  4  /
PL/SQL-procedure is geslaagd.Hope this helps.
Regards,
Rob.

Similar Messages

  • Table for account types

    Hi ,
    What is the table for Account types and Texts for account types.
    Thanks in advance.

    Hi
    The tables for account types is T071
    Regards.
    Jeetendra.
    Edited by: JEETENDRA CHOUDHARY on Jul 21, 2008 12:12 PM

  • JSR 172 marshal exception for complex type

    Hi,
    Im trying to run a JSR 172 webservice but i always get marshall exception for complex types, below is my code:
    WSDL:
    <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. -->
    <definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://newsletter.kp/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://newsletter.kp/" name="NewsService">
        <ns1:Policy xmlns:ns1="http://www.w3.org/ns/ws-policy" wsu:Id="NewsPortBinding_getNewslettersRemote_WSAT_Policy">
            <ns1:ExactlyOne>
                <ns1:All>
                    <ns2:ATAlwaysCapability xmlns:ns2="http://schemas.xmlsoap.org/ws/2004/10/wsat"></ns2:ATAlwaysCapability>
                    <ns3:ATAssertion xmlns:ns4="http://schemas.xmlsoap.org/ws/2002/12/policy" xmlns:ns3="http://schemas.xmlsoap.org/ws/2004/10/wsat" ns1:Optional="true" ns4:Optional="true"></ns3:ATAssertion>
                </ns1:All>
            </ns1:ExactlyOne>
        </ns1:Policy>
        <types>
            <xsd:schema>
                <xsd:import namespace="http://newsletter.kp/" schemaLocation="http://localhost:8080/NewsService/News?xsd=1"></xsd:import>
            </xsd:schema>
        </types>
        <message name="getNewslettersRemote">
            <part name="parameters" element="tns:getNewslettersRemote"></part>
        </message>
        <message name="getNewslettersRemoteResponse">
            <part name="parameters" element="tns:getNewslettersRemoteResponse"></part>
        </message>
        <portType name="News">
            <operation name="getNewslettersRemote">
                <ns5:PolicyReference xmlns:ns5="http://www.w3.org/ns/ws-policy" URI="#NewsPortBinding_getNewslettersRemote_WSAT_Policy"></ns5:PolicyReference>
                <input message="tns:getNewslettersRemote"></input>
                <output message="tns:getNewslettersRemoteResponse"></output>
            </operation>
        </portType>
        <binding name="NewsPortBinding" type="tns:News">
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
            <operation name="getNewslettersRemote">
                <ns6:PolicyReference xmlns:ns6="http://www.w3.org/ns/ws-policy" URI="#NewsPortBinding_getNewslettersRemote_WSAT_Policy"></ns6:PolicyReference>
                <soap:operation soapAction="getNews"></soap:operation>
                <input>
                    <soap:body use="literal"></soap:body>
                </input>
                <output>
                    <soap:body use="literal"></soap:body>
                </output>
            </operation>
        </binding>
        <service name="NewsService">
            <port name="NewsPort" binding="tns:NewsPortBinding">
                <soap:address location="http://localhost:8080/NewsService/News"></soap:address>
            </port>
        </service>
    </definitions>Stub:
    public class NewsService_Stub implements NewsService, javax.xml.rpc.Stub {
        private String[] _propertyNames;
        private Object[] _propertyValues;
        public NewsService_Stub() {
            _propertyNames = new String[] { ENDPOINT_ADDRESS_PROPERTY };
            _propertyValues = new Object[] { "http://localhost:8080/NewsService/News" };
        public void _setProperty( String name, Object value ) {
            int size = _propertyNames.length;
            for (int i = 0; i < size; ++i) {
                if( _propertyNames.equals( name )) {
    _propertyValues[i] = value;
    return;
    String[] newPropNames = new String[size + 1];
    System.arraycopy(_propertyNames, 0, newPropNames, 0, size);
    _propertyNames = newPropNames;
    Object[] newPropValues = new Object[size + 1];
    System.arraycopy(_propertyValues, 0, newPropValues, 0, size);
    _propertyValues = newPropValues;
    _propertyNames[size] = name;
    _propertyValues[size] = value;
    public Object _getProperty(String name) {
    for (int i = 0; i < _propertyNames.length; ++i) {
    if (_propertyNames[i].equals(name)) {
    return _propertyValues[i];
    if (ENDPOINT_ADDRESS_PROPERTY.equals(name) || USERNAME_PROPERTY.equals(name) || PASSWORD_PROPERTY.equals(name)) {
    return null;
    if (SESSION_MAINTAIN_PROPERTY.equals(name)) {
    return new Boolean(false);
    throw new JAXRPCException("Stub does not recognize property: " + name);
    protected void _prepOperation(Operation op) {
    for (int i = 0; i < _propertyNames.length; ++i) {
    op.setProperty(_propertyNames[i], _propertyValues[i].toString());
    public newsletter[] getNewslettersRemote() throws java.rmi.RemoteException {
    Object inputObject[] = new Object[] {
    Operation op = Operation.newInstance( qnameoperation_getNewslettersRemote, typegetNewslettersRemote, typegetNewslettersRemoteResponse );
    _prepOperation( op );
    op.setProperty( Operation.SOAPACTION_URI_PROPERTY, "getNews" );
    Object resultObj;
    try {
    resultObj = op.invoke( inputObject );
    } catch( JAXRPCException e ) {
    Throwable cause = e.getLinkedCause();
    if( cause instanceof java.rmi.RemoteException ) {
    throw (java.rmi.RemoteException) cause;
    throw e;
    return newsletter_ArrayfromObject((Object[])((Object[]) resultObj)[0]);
    private static newsletter[] newsletter_ArrayfromObject( Object obj[] ) {
    if(obj == null) return null;
    newsletter result[] = new newsletter[obj.length];
    for( int i = 0; i < obj.length; i++ ) {
    result[i] = new newsletter();
    Object[] oo = (Object[]) obj[i];
    result[i].setBody((String )oo[0]);
    result[i].setId((Long )oo[1]);
    result[i].setImageLocation((String )oo[2]);
    result[i].setTitle((String )oo[3]);
    return result;
    protected static final QName qnameoperation_getNewslettersRemote = new QName( "http://newsletter.kp/", "getNewslettersRemote" );
    protected static final QName qnamegetNewslettersRemote = new QName( "http://newsletter.kp/", "getNewslettersRemote" );
    protected static final QName qnamegetNewslettersRemoteResponse = new QName( "http://newsletter.kp/", "getNewslettersRemoteResponse" );
    protected static final Element typegetNewslettersRemote;
    protected static final Element typegetNewslettersRemoteResponse;
    static {
    typegetNewslettersRemote = new Element( qnamegetNewslettersRemote, _complexType( new Element[] {
    }), 1, 1, false );
    typegetNewslettersRemoteResponse = new Element( qnamegetNewslettersRemoteResponse, _complexType( new Element[] {
    new Element( new QName( "", "return" ), _complexType( new Element[] {
    new Element( new QName( "", "body" ), Type.STRING, 0, 1, false ),
    new Element( new QName( "", "id" ), Type.LONG, 0, 1, false ),
    new Element( new QName( "", "imageLocation" ), Type.STRING, 0, 1, false ),
    new Element( new QName( "", "title" ), Type.STRING, 0, 1, false )}), 0, Element.UNBOUNDED, true )}), 1, 1, false );
    private static ComplexType _complexType( Element[] elements ) {
    ComplexType result = new ComplexType();
    result.elements = elements;
    return result;
    }I tested the web service with the following xml
    input:<?xml version="1.0" encoding="UTF-8"?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Header/>
    <S:Body>
    <ns2:getNewslettersRemote xmlns:ns2="http://newsletter.kp/"/>
    </S:Body>
    </S:Envelope>
    output:bq. <?xml version="1.0" encoding="UTF-8"?> \\ <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> \\ <S:Body> \\ <ns2:getNewslettersRemoteResponse xmlns:ns2="http://newsletter.kp/"> \\ <return> \\ <body>teste</body> \\ <id>1</id> \\ <imageLocation>testes</imageLocation> \\ <title>teste</title> \\ </return> \\ <return> \\ <body>mau</body> \\ <id>2</id> \\ <imageLocation>mau</imageLocation> \\ <title>mau</title> \\ </return> \\ <return> \\ <body>mau</body> \\ <id>3</id> \\ <imageLocation>mau</imageLocation> \\ <title>mau</title> \\ </return> \\ <return> \\ <body>mau</body> \\ <id>4</id> \\ <imageLocation>mau</imageLocation> \\ <title>teste</title> \\ </return> \\ <return> \\ <body>2</body> \\ <id>5</id> \\ <imageLocation>2</imageLocation> \\ <title>2</title> \\ </return> \\ <return> \\ <body>corpo</body> \\ <id>6</id> \\ <imageLocation>imagem</imageLocation> \\ <title>Titulo</title> \\ </return> \\ <return> \\ <body>corpos</body> \\ <id>7</id> \\ <imageLocation>imagem</imageLocation> \\ <title>Titulo</title> \\ </return> \\ <return> \\ <body>teste</body> \\ <id>8</id> \\ <imageLocation>teste</imageLocation> \\ <title>teste</title> \\ </return> \\ <return> \\ <body>rweqrrq</body> \\ <id>9</id> \\ <imageLocation>rwe</imageLocation> \\ <title>rewq</title> \\ </return> \\ </ns2:getNewslettersRemoteResponse> \\ </S:Body> \\ </S:Envelope> \\ but i always get a:
    java.rmi.MarshalException: Invalid URI From Server: , expected: http://schemas.xmlsoap.org/soap/envelope/
            at news.NewsService_Stub.getNewslettersRemote(NewsService_Stub.java:73)
            at hello.HelloMIDlet.getTextField(HelloMIDlet.java:168)
            at hello.HelloMIDlet.getForm(HelloMIDlet.java:132)
            at hello.HelloMIDlet.startMIDlet(HelloMIDlet.java:56)
            at hello.HelloMIDlet.startApp(HelloMIDlet.java:205)
            at javax.microedition.midlet.MIDletProxy.startApp(MIDletProxy.java:43)
            at com.sun.midp.midlet.Scheduler.schedule(Scheduler.java:374)
            at com.sun.midp.main.Main.runLocalClass(Main.java:466)
            at com.sun.midp.main.Main.main(Main.java:120)
    Can you please help me find the problem?
    Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hello,
    A bit late, but I'm sure others will use this answers. We encountered the same problem in our development and after some hours playing with our WSDL we found the source of the problem.
    The problem is having a field named "body" in the Object this apparently doesn't work well with SOAP we guess because of the Envelope having also a Body.
    So the solution is changing the field body to something like msgBody.
    Regards,
    Raanan Nevet

  • Wrong condition table for condition type

    Hi,
    I have a big problem during pricing. while creating the sales order the system takes the wrong condition table for the specified condition type (I have created a new condition table and changed the access seq, did the initial load and in customizing everything looks fine). To picture the customing i have created ZXXX access seq with a 901 cindition table (sales org, dist ch. and product hierarchy 2 with a standard field PRODH2) unfortunately I had to change the field to ZPRODH2 I decided to create a new table 902 with the Z field. The new access seq has now 902 table in customizing. In CRM the two condition tables and view exists for 901 and 902. Acording to customizing the system should take the 902 condition table but insteed he takes the old 901 which shouldn't be used.
    Do anybody has some ideas why the system responds like that ? I have tried to delete the old table with the standard report and it didn't worked.
    What can I do ?
    Thanks for some ideas !!
    BR
    Tomasz

    Hi Tomasz
    Please check assignment of that new access seq to c.type in v/06
    That table might hv used somewhere in another acc.seq so unable to delelte
    Regards
    Sachin

  • NESTED Tables for Sub-types when creating table for Super-type

    If I create the following types, as an example:
    Person with subtypes: Employee and Customer
    Appointment
    CREATE OR REPLACE TYPE Person_OT AS OBJECT (
    person#                         NUMBER,
    personSurname                    VARCHAR2(50),
    personForenames               VARCHAR2(50),
    personDateOfBirth               DATE,
    personAddress                    Address_OT,
    ) NOT FINAL ;
    CREATE OR REPLACE TYPE Employee UNDER Person_OT (
    empSalary               NUMBER,
    empNoSales          NUMBER,
    makes               Appointment_List_OT
    ) FINAL ;
    CREATE OR REPLACE TYPE Appointment_OT AS OBJECT (
    some attributes
    CREATE OR REPLACE TYPE Appointment_List_OT AS TABLE OF REF Appointment_OT ;
    When creating the table to hold objects of Person type, how can the requisite nested table for representing 'makes' be declared? The below approach is not correct, however the table will not compile without naming the nested tables.
    CREATE TABLE Person_TBL OF Person_OT (
    Person#     PRIMARY KEY)
    NESTED TABLE makes STORE AS Appointment_List_NTBL;
    Advice very much appreciated!

    CREATE TABLE Person_TBL OF Person_OT(
    Person# PRIMARY KEY)
    NESTED TABLE TREAT(SYS_NC_ROWINFO$ AS EMPLOYEE).MAKES STORE AS Appointment_List_NTBL
    Table created.
    SQL> select * from user_nested_tables
      2  /
    TABLE_NAME                     TABLE_TYPE_OWNER
    TABLE_TYPE_NAME                PARENT_TABLE_NAME
    PARENT_TABLE_COLUMN
    STORAGE_SPEC                   RETURN_TYPE          ELEMENT_SUBSTITUTABLE
    APPOINTMENT_LIST_NTBL          SCOTT
    APPOINTMENT_LIST_OT            PERSON_TBL
    TREAT(SYS_NC_ROWINFO$ AS "SCOTT"."EMPLOYEE")."MAKES"
                           DEFAULT                VALUE                         N
    SQL>  SY.

  • Table for document type Number Range interval

    Hi,
    I want to know the number range interval for document type in the production system but I do not have authorisation for SPRO in the prd system.
    Kindly let me know the table name to check this number range interval for the document type.
    Table T003 stores only the number range and not the interval.
    Thanks
    Suresh

    Hi,
    The table which has document types is T003 but the number ranges are stored in a Structure IRDP. The number ranges are maintained directly in the production system.
    regards,
    radhika
    Edited by: kolipara radhika on Aug 25, 2008 6:01 AM

  • Parsing xml for complex type using sax

    I have an xsd of below type:
    <xs:complexType name="itemInfo">
        <xs:sequence>
          <xs:element name="displayLineNumber" type="xs:string" minOccurs="0"/>
          <xs:element name="lineNumber" type="xs:integer" minOccurs="0"/>
          <xs:element name="parentLineNumber" type="xs:integer" minOccurs="0"/>
       <xs:element name="service" type="serviceInfo" minOccurs="0" maxOccurs="unbounded"/>
       </xs:sequence>
    </xs:complexType>
    <xs:complexType name="serviceInfo">
        <xs:sequence>
          <xs:element name="displayLineNumber" type="xs:string" minOccurs="0"/>
          <xs:element name="lineNumber" type="xs:integer" minOccurs="0"/>
          <xs:element name="serviceName" type="xs:string" minOccurs="0"/>
          <xs:element name="serviceDescription" type="xs:string" minOccurs="0"/>
          <xs:element name="subscriptionBand" type="subscriptionBandInfo" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="subscriptionBandInfo">
        <xs:sequence>
          <xs:element name="min" type="xs:long"/>
          <xs:element name="max" type="xs:long"/>
          <xs:element name="duration" type="xs:string" minOccurs="0"/>
          <xs:element name="price" type="xs:decimal"/>
        </xs:sequence>
      </xs:complexType>
    I have written a handler and able to handle simple type but how I can handle serviceInfo and subscriptionBandInfo as itemInfo is my root element.
    My handler class is:
    public class ProductHandler
      extends DefaultHandler
      //List to hold ProductInfo object
      private List<ProductInfo> productList = null;
      private ProductInfo product = null;
      public List<ProductInfo> getProductList()
        return productList;
      boolean bDisplayLineNumber = false;
      boolean bLineNumber = false;
      boolean bParentLineNumber = false;
      @Override
      public void startElement(String uri, String localName, String qName, Attributes attributes)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
        { //create a new ProductInfo and put it in Map
          //initialize ProductInfo object and set id attribute
          product = new ProductInfo();
          //initialize list
          if (productList == null)
            productList = new ArrayList<ProductInfo>();
        else if (qName.equalsIgnoreCase("name"))
          //set boolean values for fields, will be used in setting ProductInfo variables
          bName = true;
        else if (qName.equalsIgnoreCase("displayLineNumber"))
          bDisplayLineNumber = true;
        else if (qName.equalsIgnoreCase("lineNumber"))
          bLineNumber = true;
        else if (qName.equalsIgnoreCase("parentLineNumber"))
          bParentNumber = true;
      @Override
      public void endElement(String uri, String localName, String qName)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
          //add ProductInfo object to list
          productList.add(product);
      @Override
      public void characters(char ch[], int start, int length)
        throws SAXException
       if (bDisplayLineNumber)
          product.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
          bDisplayLineNumber = false;
       else if (bLineNumber)
          product.setLineNumber(Integer.parseInt(new String(ch, start, length)));
          bLineNumber = false;
        else if (bParentNumber)
          product.setParentNumber(Integer.parseInt(new String(ch, start, length)));
          bParentNumber = false;
      @Override
      public void endElement(String uri, String localName, String qName)
        throws SAXException
        if (qName.equalsIgnoreCase("item"))
          //add ProductInfo object to list
          productList.add(product);
    My ProductInfo class is:
    import com.vpc.schema.ServiceInfo;
    import java.util.ArrayList;
    import java.util.List;
    public class ProductInfo
      private String category, family, subGroup, size, productType, availability;
      private String displayLineNumber;
      private int lineNumber;
      private int parentNumber;
    private List<ServiceInfo> serviceInfo;
      public int getLineNumber()
        return lineNumber;
      public int getParentNumber()
        return parentNumber;
      public List<ServiceInfo> getServiceInfo()
        if (serviceInfo == null)
          serviceInfo = new ArrayList<ServiceInfo>();
        return serviceInfo;
      public void setServiceInfo(List<ServiceInfo> serviceInfo)
        this.serviceInfo = serviceInfo;
    I am able to do parsing for my simple type but when a complex type comes I am not able to do it. So please suggest how I can add complex type

    I suppose the posting of xsd is to show the structure of the xml...
    In any case, I can suggest a couple of things to do for the purpose.
    [1] If you still follow the same line of reasoning using some boolean like bDisplayLineNumber etc to identify the position of the parser traversing the document, you can complete the logic adding bItem (which you did not need under simplified consideration) and bService and bSubscriptionBand to identify at the parent or the grandparent in the case of the "complexType" serviceInfo and even the great-grand-parent in the case of arriving to the complexType subscriptionBandInfo...
    [1.1] With those boolean value, you determine bDisplayLineNumber etc under item directly, and then as well say bDisplayLineNumber_Service under the service etc and then bMin_SubscriptionBand etc under subscriptionBand etc. You just expand the number of those variables to trigger the setting of those fields in the object product, service in the serviceList and subscriptionBand in the subscriptionBandList etc etc.
    [1.2] All the reset of those booleans should be done in the endElement() method rather than in characters() method. That is logically more satisfactory and has a bearing in case there is a mixed content type.
    [1.3] Then when arriving at startElement of service, you make sure you initiate the serviceList, same for subscriptionBand the subscriptionList...
    [1.4] Then when arriving at endElement of service, you use setServiceInfo() setter to pass the serviceList to product and the same when arriving at endElement of serviceBand, you use setSubscriptionBand() setter to pass the subscriptionBand to service.
    ... and then basically that's is it, somewhat laborious and repetitive but the logical layout is clear. (As a side-note, you shouldn't use equalsIgnoreCase(), why should you? xml is case sensitive.)
    [2] Actually, I would suggest a much neater approach, especially when you probe many more levels of complexType. It would be even appear cleaner when you have two levels of depth already...
    [2.1] You maintain a Stack (or an implementation class of Deque, but Stack is largely sufficient here) of element name to guide the parser identifying its whereabout. By such doing, you get ride of all those bXXX's.
    This is a rewrite of the content handler using this approach and I only write the code of capturing service. Adding serviceBand is a matter of repetition of how it is done on service. And it is already clear it appears a lot neater as far as I'm concerned.
    public class ProductHandler extends DefaultHandler {
    Stack<String> tagstack=new Stack<String>();
    private List<ProductInfo> productList = null;
    private ProductInfo product = null;
    private List<ServiceInfo> serviceList=null;
    private ServiceInfo service=null;
    public List<ProductInfo> getProductList() {
      return productList;
    public List<ServiceInfo> getServiceList() {
      return serviceList;
    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes) {
      if (qName.equals("item")) {
       product = new ProductInfo();
       //initialize list
       if (productList == null) {
        productList = new ArrayList<ProductInfo>();
      } else if (qName.equals("service") && tagstack.peek().equals("item")) {
       service=new ServiceInfo();
       if (serviceList==null) {
        serviceList=new ArrayList<ServiceInfo>();
      tagstack.push(qName);
    @Override
    public void endElement(String uri, String localName, String qName) {
      if (tagstack.peek().equals("item")) {
       //add ProductInfo object to list
       productList.add(product);
      } else if (tagstack.peek().equals("service") && tagstack.search("item")==2) {
       serviceList.add(service);
       product.setServiceInfo(serviceList);
      tagstack.pop();
    @Override
    public void characters(char ch[], int start, int length) throws SAXException {
      String currentName=tagstack.peek();
      int itemPos=tagstack.search("item");
      int servicePos=tagstack.search("service");
      if (currentName.equals("name") && itemPos==2)  {
       product.setName(new String(ch, start, length));
      } else if (currentName.equals("displayLineNumber") && itemPos==2) {
       product.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("lineNumber") && itemPos==2) {
       product.setLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("parentLineNumber") && itemPos==2) {
       product.setParentLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("displayLineNumber") && servicePos==2 && itemPos==3) {
       service.setDisplayLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("lineNumber") && servicePos==2 && itemPos==3) {
       service.setLineNumber(Integer.parseInt(new String(ch, start, length)));
      } else if (currentName.equals("serviceName") && servicePos==2 && itemPos==3) {
       service.setServiceName(new String(ch, start, length));
      } else if (currentName.equals("serviceDescription") && servicePos==2 && itemPos==3) {
       service.setServiceDescription(new String(ch, start, length));

  • Procedure to Purge data from WF tables for Item Type POERROR

    Hi,
    I have executed concurrent program "Purge Obsolete Workflow Runtime Data" to purge old data for Item Type "REQAPPRV". After execution of the concurrent program i re-query to WF_ITEMS table to get the count of the records for "REQAPPRV" but all records did not get purged as "REQAPPRV" is present as PARENT_ITEM_KEY for Item Type "POERROR" in WF_ITEMS table.
    Now to purge records of "REQAPPRV" i need to first Purge records of "POERROR". Now the problem is END_DATE of those POERROR records is NULL at WF_ITEMS table that is why concurrent program "Purge Obsolete Workflow Runtime Data" does not able to purge them. How can i resolve this issue?? Please guide..
    Regards,
    Priyanka

    Hi,
    I have already gone thorugh MOS doc, cross checked the queries provided in document and found that status of PARENT_ITEM_TYPE [REQAPPRV] is "COMPLETE" and the status of Chilld ITEM_TYPE [POERROR] is "ACTIVE". I want to close or Purge the child ITEM_TYPE. Can you guide how can we achive that ??
    Regards,
    Priyanka

  • How to generate wsdl for complex type using wscompile?

    Hi
    Since couple of days I am trying to generate the the wsdl for following classes
    abstract class Key implements serializable{
    class sikeKey extends Key{
    int siteKey;
    class AddressKey extends siteKey{
    int addressId;
    class Model{
    AddressKey key = new AddressKey();
    }I am using following ant script for wscompile
          <wscompile
              fork= "true"
              base="${dest.dir}/war/WEB-INF/classes"
              server="true"   
              features="wsi"
              mapping="${dest.dir}/war/WEB-INF/Address_Mapping.xml"
              sourceBase="${war.dir}/WEB-INF/classes"
              optimize="false"
              debug="true"
              keep="false"
              verbose="true"
              xPrintStackTrace="true"
              config="${acws-config-dir}/Address_Config.xml">
              <classpath>
                            <pathelement path="${acws.classpath}"/>
                            <pathelement path="${war.dir}/WEB-INF/classes"/>
                   </classpath>
          </wscompile>
    <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
        <classpath path="${acws.classpath}"/>
    </taskdef>It generates the wsdl but without all complex type.
    <complexType name="AddressWebServiceModel">
    <sequence>
    <element name="addKey" type="tns:AddressKey" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="AddressKey">
    <sequence>
    <element name="siteID" type="string" nillable="true"/>
    <element name="addressID" type="int"/>
    </sequence>
    </complexType>Here it should create the right mapping for classes siteKey so that the webservice call can be mapped with the response of this Model.
    Any one know how to configure the above script for proper mapping of complex type?

    Add the concrete subclasses of Key in an <AddtionalType> element in your config.xm. file.

  • Table for Process type with BP Number of sold to party

    Hi Friends,
    Please share me Table name where i'll get the Process Type (Transaction Type) and Sold to Party Number or BP Guid of the transaction.
    I want to create Target group for BP's who are involve in Particular Transaction.
    For infoset creation i have already tried Table CRMD_ORDERADM_H and CRMD_ORDER_INDEX but not able to join exact conditions.
    Regards,
    DD's

    HI frieds,
    Thanks for u r support i have created Infosets using table CRMD_ORDERADM_H, CRMD_LINK & CRMD_PARTNER and, made joining link between them (Actually both Guids in CRMD_LINK and CRMD_PARTNER are not maching)
    Next step is i have created Datasource using my infoest and created Attribute list for same.
    After all this excercise i tried to Create target group for BP's who are involved in particular transaction(Process type) but in target group count come to ZERO !!!!!!!!! why this happening ???
    Please understand my final expected output which is in bold
    Regards,
    DD's

  • Table for output type

    Dear All
    Pl help me.
    I have a very peculiar situation.
    For a particular order type, the billing document printout should show the discount for that order type only when the discount is manually entered during sales order creation. A condition type has already been created in the pricing procedure for the order typr for manual entry. But the problem is with the printing of invoice. At present the discount does not appear on the print preview of the billing document and the billing document has its own output type. where should i validate for that output type. In which standard table can i get the relation between a sales document or a billing document and output type.

    Hi,
    Just check in copy controls VTFA, select Source and Target Document Type, click on item (LHS of screen), choose relevant item category and see in "Pricing type" what you have assigned. Whwenver prices are redetermined, manaul conditions entered in previous document will not taken back. So choose "Copy manual pricing...." option in this.
    Hope I've understood your question and duly answered it.
    Reward points, if so
    Regards
    SD

  • Table for output type of a delivery document

    Hi guys,
    Would you know where could I find the output type of a delivery document espcially after I posted a GI in Shipment? Basically, It should reflect in devlivery document. So I am not sure if I should look at the delivery tables or goods issue.
    Help me guys!
    POints for the helpful ideas.
    THanks!

    Hi,
    There are 2things to be noted here.
    1. If your output type was already triggered once, then it should be visible in display mode also, with a Green colour button (if it is processed and the print out  is obtained). The fact that the output type is not seen in display  mode, says that the output type so far has nto been triggered.
    2. Seeing the output type coming in yellow colour in change mode of delivery document is expected. This means that the output is getting triggered now.If you save teh document now, you will get the print out.When you go in display mode again after a gap of say 1min, you can see the same output in Green colour as mentioned earlier.
    I hope this clarifies your doubt.Please let me know if you need some more info
    You can reward me if it helped you

  • Techical field ( and Table ) for Promotion type for a particular Customer

    Hi All,
    Where can I find the promotion type for a particular Customer?
    Thanks,
    Sanjeet

    Hi Suman,
    I think you are talking about Transaction VB33.
    Table - KONA (Rebate Agreements)
    Field - KNUMA (Agreement (various conditions grouped together))
    Structure - RV13A (Input/Output Fields for Price Element Maintenance)
    Field - KNUMA_PI (Promotion)
    And if you want based on particular customer..
    Table - KOTE003 (Customer)
    Field - KNUMA (Agreement (various conditions grouped together))
    Table - KOTE004 (Customer Hierarchy)
    Field - KNUMA (Agreement (various conditions grouped together))
    Best Regards,
    Sayak

  • FM or BAPI for Output Type Creation mannually

    Hi All,
    Is there any FM or BAPI to create output type after creation of Inbound Delivery for that delivery, Normally it is automatically assigned, but I will stop the same , and wanted to create Output type mannualy through  ABAP program. Therfore can any one help me on this.
    best regards
    tanmay

    Hi,
    Try using FM WS_LM_TRANSFER_ORDER_CREATE.
    I hope this is available in ur system
    Thanks

  • CRM Table for Condition Type value

    Hi All,
    Can you please let me know the table name from where I can get the value of the pricing condition EK02 in CRM.
    I have a document number from which i can manage to get the item guid. From this I need to get the value of the EK02 condition type that we can see from the Item Condition screen.
    Hence i need a table which maintains a relation between Item Guid + EK02 + value.
    Thanks in advance,
    Regards,
    Pradeep

    Hi,
    My requirement is that I want to dynamically update the EK02 value when a quotation is sent for costing. In CRM, costing is not in standard for quotations. Hence I want to call the costing module of CO from CRM when a quotation is saved, this module will return me the EK02 value. So with the quotation screen open, will the data be available in some buffer so that I can pump in this value to the pricing structure?
    I also came accross the function modules which aid in updating pricing elements of an order. Some of them are as below:
    PRC_PD_ITEM_CHANGE_COND
    PRC_PD_ITEM_CHANGE_COND_MULTI
    PRC_PD_ITEM_CHANGE_MULTI
    PRC_PD_ITEM_CONFIGURED_MULTI
    PRC_PD_ITEM_CREATE
    PRC_PD_ITEM_CREATE_BY_IMPORT
    PRC_PD_ITEM_CREATE_BY_IMPORTM
    PRC_PD_ITEM_CREATE_MULTI
    PRC_PD_ITEM_CREATE_WITH_REF
    PRC_PD_ITEM_CREATE_WITH_REFM
    Which one of this should i use? The CRM version is 5.0 hence its IPC 5.0
    Thanks in advance.
    Regards,
    Pradeep

Maybe you are looking for

  • I can not open iphoto or itunes - message is that "the program quit unexpectedly"

    I am not able to open iphoto or itunes from our family computer. It attempts to open and then gives the message saying i photo quit unwxpectedly.

  • Cassette Tape to itunes

    I would like to put my old cassette tape collection into itunes and then burn CD and also add to my ipod . Any suggestions on the best way to do this ? R. Addis

  • Yahoo Wont go away even with other options.

    My yahoo will not go away, I click the firefox tab in the top right and click options and it shows all my tool bars, so I unchecked yahoo, but when I close down firefox, and start it again maybe the next day it appears again! I have also tried going

  • CP4 - View Current Frame of Captured Animation?

    Hello all, I'm a new CP4 user, so bear with me on this question. When editing, I was wondering how I can view the current frame under the playhead for a captured animation WITHOUT scrubbing? I have a bunch of captions to align to elements in the capt

  • Getting as close to a lossless conversion as possible

    I posted another question a few weeks ago that wasn't answered. It concerned my Sony HDD camcorder and the back that it's mpeg2 files it records (though imported fine through iMovie 08) resulted in slightly jerky footage compared to a pure burn using