Unsuccessful trying to use AXL API 9.1

I am developing 3-rd party application in C#/Framework 4.5 project and trying to use AXL API 9.1 sending “addUser” requests to the Call Manager. It is not recognizing that I am trying to use 9.1 version and working like I am using version 6.1 or something like this.
Our firm have VM ESXI 5.0.0 and CUCM 9.0 on it. We are using SPA504G, 7975G, 7940G for testing.
I took the example of SOAP envelope from Cisco development cookbook:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axl=http://www.cisco.com/AXL/API/9.1"> ….
If I am using old version of fields, like this:
<lastname>MySoname</lastname>
I’ll receive the response: 
…<axl:getUserResponse xmlns:axl=http://www.cisco.com/AXL/API/6.1…
If I’ll try to use fields like it described in the 9.1 Cisco Unified CM AXL Schema Reference,  that means:
<lastName>MySoname</lastName>
I’ll receive the error response that the null can’t be placed in mandatory field.
It will be great if somebody can help me to understand what is wrong.

Ok.  I found the possibility to add http header using HttpWebRequest class like Aaron suggest me.
Here it is:
HttpWebRequest_Instance.Headers.Add("SOAPAction", "CUCM:DB ver=9.1");
In case of declaring version 9.1 the server returns error 599. In case of version 8.5 - error 500. If I am declaring version 7.1 it works but ones more I can't use schema 9.1. I must go with fields from 7.1 schema.
Anybody? Any suggestions why it is not working?

Similar Messages

  • Associate a device with a DN using AXL API

    Hi guys,
    I am trying to add a DN to an existing phone device using AXL API via Java. I keep getting this error:
    Devices can only be associated with DNs, Route Patterns and Hunt Pilots.
    I have two existing lines on this device which I added through call manager, but now I am trying to add a third one using AXL API. This is what I did to get this error and I am not sure why:
    XDirn dn = new XDirn();
    dn.setPattern("6340");
    XPhoneLine phoneLine = new XPhoneLine();
    phoneLine.setDirn(dn);
    phoneLine.setAsciiLabel("TESTING - 6340");
    phoneLine.setDisplay("TESTING - 6340");
    phoneLine.setDisplayAscii("TESTING - 6340");
    phoneLine.setLabel("TESTING - 6340");
    phoneLine.setBusyTrigger("2");
    phoneLine.setIndex("3");
    phoneLine.setMaxNumCalls("4");
    UpdatePhoneReq updatePhone = new UpdatePhoneReq();
    updatePhone.setName("SEPD824BDBBCAF1");
    UpdatePhoneReq.Lines newLine =  new UpdatePhoneReq.Lines();
    newLine.getLine().add(phoneLine);
    updatePhone.setLines(newLine);
    port.updatePhone(updatePhone);
    the error occurs at the last line when I try to push the update.
    Thanks

    I just tried to execute SQL commands through the API and that is not working well either. The Axlsoaptoolkit.java file works fine but not through the API. this what I have done:
    ExecuteSQLQueryReq sqlReq = new ExecuteSQLQueryReq();
    sqlReq.setSql("select * from device");
    ExecuteSQLQueryRes sqlRes = port.executeSQLQuery(sqlReq);
    System.out.println(sqlRes.getReturn().getRow().get(0));
    System.out.println(sqlRes.getReturn().getRow().get(1));
    System.out.println(sqlRes.getReturn().getRow().get(2));
    This returns null on the first 3 rows where I have more than a 1500 entries in that table. I verified using the Axlsoaptoolkit.java app

  • Correct way to use AXL API with complex types css, partition, etc. involving: JAXBElement XFkType ?

    I am trying to figure out how to use the AXL API once exploded with the wsimport as explained here...
    https://developer.cisco.com/site/collaboration/management/axl/learn/how-to/axl-java-sample-application.gsp
    ...to use complex types (partition, css, etc). 
    --> What is the correct way to do it?
    Example 1: UpdatePhone
    When incorporing a complex type into the addition or update of a component, for instance RoutePartitionName, DevicePoolName or CallingSearchSpaceName.
    his function is not working:
    public void actualizarPhone(LPhone lPhone) {
            try {
                UpdatePhoneReq axlParams = new UpdatePhoneReq();
                axlParams.setName(lPhone.getName());
                axlParams.setDescription(lPhone.getDescription());
                axlParams.setDevicePoolName(lPhone.getDevicePoolName());
                axlParams.setCallingSearchSpaceName(lPhone.getCallingSearchSpaceName());
                StandardResponse response = axlPort.updatePhone(axlParams);
                //return response.getReturn()a.toString();
            } catch (Exception e) {
                logger.error(e);
                //return new ArrayList<LPhone>();
    It seems the right thing to do set as parameter for the "set" the result of the "get" in line: setDevicePoolName(lPhone.getDevicePoolName());
    but it says: "The method setDevicePoolName(JAXBElement<XFkType>) in the type UpdatePhoneReq is not applicable for the arguments (XFkType)"
    Example 2: AddLine
    I also have this problem when adding line. 
    And I've tried at least 3 approaches, no success yet:
    1)** Using factory object to obtain an R object
    ObjectFactory factory = new ObjectFactory();
    RRoutePartition rRoutePartition = factory.createRRoutePartition();
    rRoutePartition.setName("autodial");
    2) ** Trying to create the demanded object: JAXBElement<XFkType> myself.
    JAXBElement<XFkType> jaxbElement= new JAXBElement<XFkType>(new QName ("http://www.cisco.com/AXL/API/8.5","XRoutePartition"),XFkType.class,partition);
    jaxbElement.setValue(partition3);
    line.setRoutePartitionName(jaxbElement);
    3)** Using X Objects
    XCallForwardBusy fwdBusy = new XCallForwardBusy();
    fwdBusy.setForwardToVoiceMail("true");
    AddLineReq newLine = new AddLineReq();
    XLine line = new XLine();
    line.setAlertingName("ALerting Name");
    line.setAsciiAlertingName("Alerting Name ASCII");
    line.setCallForwardBusy(fwdBusy);
    line.setDescription("Description");
    line.setPattern("5555");
    I would appreciate a clean example about how to add a line setting a partition, and an explanation about how to use JAXBElement<XFkType> objects.
    regards!

    I am trying to figure out how to use the AXL API once exploded with the wsimport as explained here...
    https://developer.cisco.com/site/collaboration/management/axl/learn/how-to/axl-java-sample-application.gsp
    ...to use complex types (partition, css, etc). 
    --> What is the correct way to do it?
    Example 1: UpdatePhone
    When incorporing a complex type into the addition or update of a component, for instance RoutePartitionName, DevicePoolName or CallingSearchSpaceName.
    his function is not working:
    public void actualizarPhone(LPhone lPhone) {
            try {
                UpdatePhoneReq axlParams = new UpdatePhoneReq();
                axlParams.setName(lPhone.getName());
                axlParams.setDescription(lPhone.getDescription());
                axlParams.setDevicePoolName(lPhone.getDevicePoolName());
                axlParams.setCallingSearchSpaceName(lPhone.getCallingSearchSpaceName());
                StandardResponse response = axlPort.updatePhone(axlParams);
                //return response.getReturn()a.toString();
            } catch (Exception e) {
                logger.error(e);
                //return new ArrayList<LPhone>();
    It seems the right thing to do set as parameter for the "set" the result of the "get" in line: setDevicePoolName(lPhone.getDevicePoolName());
    but it says: "The method setDevicePoolName(JAXBElement<XFkType>) in the type UpdatePhoneReq is not applicable for the arguments (XFkType)"
    Example 2: AddLine
    I also have this problem when adding line. 
    And I've tried at least 3 approaches, no success yet:
    1)** Using factory object to obtain an R object
    ObjectFactory factory = new ObjectFactory();
    RRoutePartition rRoutePartition = factory.createRRoutePartition();
    rRoutePartition.setName("autodial");
    2) ** Trying to create the demanded object: JAXBElement<XFkType> myself.
    JAXBElement<XFkType> jaxbElement= new JAXBElement<XFkType>(new QName ("http://www.cisco.com/AXL/API/8.5","XRoutePartition"),XFkType.class,partition);
    jaxbElement.setValue(partition3);
    line.setRoutePartitionName(jaxbElement);
    3)** Using X Objects
    XCallForwardBusy fwdBusy = new XCallForwardBusy();
    fwdBusy.setForwardToVoiceMail("true");
    AddLineReq newLine = new AddLineReq();
    XLine line = new XLine();
    line.setAlertingName("ALerting Name");
    line.setAsciiAlertingName("Alerting Name ASCII");
    line.setCallForwardBusy(fwdBusy);
    line.setDescription("Description");
    line.setPattern("5555");
    I would appreciate a clean example about how to add a line setting a partition, and an explanation about how to use JAXBElement<XFkType> objects.
    regards!

  • Best practice for development using REST API - OData

    Hi All, I am new to REST. I am a developer who works mostly in server-side code using Visual Studio. Now that Microsoft is advocating to write code using REST API instead of server-side code or client side object model, I am trying to use REST API.
    I googled and most of the example shows to write a code and put it on Content Editor/Script Editor. How to organize code and deploy to the staging/production in this scenario? Is there any Best Practice or example around this?
    Regards,
    Khushi

    If you are writing code in aspx or cs it does not mean that you need to deploy it in the SharePoint server, it could be any other application running from your remote server. What I mean it you can use C# & Rest API to connect to SharePoint server.
    REST API in SharePoint 2013 provides the developers with a simple standardized method of retrieving information from SharePoint and it can be used from any technology that is capable of sending standard HTTP requests.
    Refer to the following blog that provide your more details about comparison of the major features of these programming choices/
    http://msdn.microsoft.com/en-us/library/jj164060.aspx#RESTODataA
    http://dlr2008.wordpress.com/2013/10/31/sharepoint-2013-rest-api-the-c-connection-part-1-using-system-net-http-httpclient/
    Hope this helps
    --Cheers

  • Using fileConnection API on j9

    Hi,
    I am trying to use fileconnection API on IBM j9 but there is no success. I have successfully installed WSDD on my PC and j9 on PDA (WM 2003 SE). Then I updated to include optional package of PDAP-FC for both wm2003 and windows x86 as mentioned. After that I copied fileconn.dll and fileconn.jar to right place on PDA.
    But still now, on my PC, as soon as I type javax.microedition.io.file, wsdd start showing at as an error. Could anyone, who has an experience of using FCAPI, please throw some light on it.
    Regards,
    push

    Hi Dan,
    Thanks for posting!
    According to error message, the process of audience may be occurred something wrong on azure platform. And consider to suspicious nature of the request, I suggest you could try oath to verify your account. So you could try this method supported by google
    (https://developers.google.com/gdata/docs/auth/oauth?csw=1 ). Also, I think this same thread may helpful, please refer to it (http://stackoverflow.com/questions/7471024/accessing-google-docs-with-gdata).
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can I modify the LineStatus and OpenQty fileds in POR1 using DI API?

    Hi, guys,
    The addon under development will run on SBO 2005B PL35. I tried to use DI API to directly modify the values of LineStatus and Openqty in POR1 throught following codes. No error come up but the values of LineStatus and Openqty in POR1 didnot changed.
    Something wrong in the codes? Or such action is not allowed in SBO 2005B?
    Thanks for your reply!
    TRY
    sSQL = "SELECT * FROM POR1 T0 where DocEntry = " & poEntryNo & " and LineNum = " & oPOLine
    oDataTable.ExecuteQuery(sSQL)
    oDTSize = oDataTable.Rows.Count
    Offset = oDataTable.Rows.Offset
    If (oDTSize > 1) Then
            oLineStatus = oDataTable.GetValue("LineStatus", Offset)
            If oLineStatus = "O" Then
                   oOpenQty = oDataTable.GetValue("OpenQty", Offset) - CInt(omatrix.Columns.Item("col_Qty").Cells.Item(row).Specific.string)
                   If oOpenQty > 0 Then
                           oDataTable.SetValue("OpenQty", Offset, oOpenQty)
                   Else
                           oDataTable.SetValue("OpenQty", Offset, 0)
                           oDataTable.SetValue("LineStatus", Offset, "C")
                   End If
           End If
    End If
    CATCH ex as exception
           sbo_application.message(ex.exception)
    End TRY

    hi
    In your code, I didn't find a code which update the LineStatus value in the database.
    You are just updating the DataTable object. Which will not reflect in the database.
    Use the SAPbobsCOM.Documents object if you need to update the LineStatus.
    In Documents object there is a Lines subobject available. Update the LineStatus property.
    Anoop

  • Using user API in Midlets

    i am trying to use my API's to use in midlets but i m facing problem where i place these apis pachage so that my class files can import them and work properly
    Please give me the possible solution .......
    thanks in advance .............:-)
    BR,
    rashad.

    Are you compiling it with right versions of oimclient and other supporting jars? You don't need xlAPI.jar to compile your adapter class but just the following jars. Copy these jars from the server to make sure that the version is correct.
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e14309/apis.htm#BCFEIBHH
    -BB

  • Getting wierd error when trying to getting phone IP address using AXL

    I am current trying to use the AXL serviceability API to get phone IP
    address information. I looked the developers guide and used the Java example to create a
    SSL Socket connection to send the SOAP message to. The message I send is as follows:
    POST: 8443/axl/ HTTP/1.0
    Accept: application/soap+xml, application/dime, multipart/related, text/*
    Host:localhost:8443
    Authorization: Basic **************
    Content-type: text/xml
    SOAPAction: "http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice"
    Content-length: 610
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <SelectCmDevice sequence="123456">
    <CmSelectionCriteria>
    <Class>Phone</Class>
    <Model>255</Model>
    <NodeName>10.248.140.11></NodeName>
    <SelectBy>Name</SelectBy>
    <MaxReturnedDevices>10</MaxReturnedDevices>
    <SelectItems soapenc:arrayType="SelectItems[1]">
    <Item>SEP001E4A3FAAAA</Item>
    </SelectItems>
    </CmSelectionCriteria>
    </SelectCmDevice>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The response I get back after about 30 seconds is as follows:
    HTTP/1.1 400 Invalid URI
    Content-Length: 0
    Date: Wed, 12 Mar 2008 19:28:43 GMT
    Server: Apache-Coyote/1.1
    Connection: close
    Could someone point me in the right direction as to what is going wrong?
    Thanks
    Mitch

    well, getting closer. Of course you were correct. After changing it, I now get an http 500 error after a lenghty timeout.
    POST /axl/ HTTP/1.0
    Accept: application/soap+xml, application/dime, multipart/related, text/*
    Host:localhost:8443
    Authorization: Basic ***********
    Content-type: text/xml
    SOAPAction: "http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice"
    Content-length: 610
    <?xml version="1.0" encoding="utf-8"?>
    http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding">
    Phone
    255
    10.248.140.11>
    Name
    10
    SEP001E4A3FAAAA
    HTTP/1.1 500 Internal Server Error
    Content-Type: text/html;charset=utf-8
    Content-Length: 4566
    Date: Thu, 13 Mar 2008 02:15:53 GMT
    Server: Apache-Coyote/1.1
    Connection: close

  • Trying to create Invoice using the API,however i am not able to create the customer accounts in the front end

    when creating invoice using the API AR_INVOICE_AP_PUB.Create_Single_invoice Am Getting the below Error:
    Transaction type is invalid with current transaction date
    invalid transaction type
    either an inventory item description must be provided
    Kindly help me here

    Hi Team,
    I  tried creating the invoice and I got the above errors, however, when updated the batch source ID I am now getting this following error only, i am just left with the following Error only
    Either an inventory item or description must be provided.
    Please help me on this.

  • I am Trying to update Item category by using Standar API .. But no Updating .. and it show some erros message.. INV INV_VALID_CAT error message

    Hi 
      I am using Standard API to Update Item category. But it was not updating.any value  what passing to paramenter in API But iwas through some.. error mesage INV INV_VALID_CAT
    Regards,
    Sam

    Please see if (PA_PROJECT_PUB.create_project Errors - The Class Category Is Invalid (Doc ID 1323904.1)) helps.
    Thanks,
    Hussein

  • How to use excel api in java?

    I need to use excel api in Java to generate data in excel format. Can any one tell any of the use ful Excel api that we can down load from net? i have read about Apache's POi-hssf-Java api. But the jar i downloaaded from Apache site is not working ? Can anybody please send me the jar for taht Api ?

    Hi,
    In fact i was not clear about whcih jar file to download from the apache site. i found one folder structure like this
    -parent
    -bin
    -src
    All these folders contained some zip files. i took the zip files and extracted them. And i set teh class path also . But when i tried to import in java programs ,these jar files are giving compilation errors

  • Trying to use newer Xerces

    I am trying to use a newer version of Xerces (2.5.0) with my web application.
    I've tried all sorts of things that haven't worked. I first started off trying
    the XML scoping feature using a .ear file but could never get that working (see
    my earlier post).
    I'm now trying to simply include the jar files in /WEB-INF/lib directory of my
    war file here is what is happening
    1) xercesImpl.jar and xml-apis.jar in /WEB-INF/lib using prefer-webinf-classes
    flag in weblogic.xml -
    java.lang.ClassCastException
    at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
    2) xercesImpl.jar only in /WEB-INF/lib using prefer-webinf-classes flag
    javax.servlet.ServletException: loader constraints violated when linking org/xml/sax/XMLReader
    class
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:906)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3191)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:31
    3) xercesImpl.jar only in /WEB-INF/lib not using prefer-webinf-classes flag as
    suggested here
    http://e-docs.bea.com/wls/docs81/faq/xml.html#741640
    2003-10-21 13:29:16,942 [  ] FATAL com.avaya.elat.webapp.InitPlugin - INITIALIZATION
    ERROR:
    com.avaya.elat.webapp.InvalidJAXPFactoryException: JAXP factory "SAXParserFactory"
    is set to "weblogic.xml.j
    axp.RegistrySAXParserFactory", required value is "org.apache.xerces.jaxp.SAXParserFactoryImpl"
    at com.avaya.elat.webapp.InitPlugin.checkAndLogJAXPSettings(InitPlugin.java:135)
    Any ideas how to get this working? Weblogic has been far more unpleasant to get
    this stuff working than Jakarta Tomcat. And its FREE!

    I'm using WLS 8.1 w/ Java 1.4.2
    BTW - I'm doing all SAX, not DOM
    Also, my webapp works on Tomcat 4.1.24...
    Don Ferguson <[email protected]> wrote:
    What VM are you using, and what version of WLS? If you are running
    under J2SE 1.4, the problem may be that J2SE 1.4 rt.jar ships with an
    older version of the org.w3c.dom classes than Xerces 2.5 (which supports
    DOM level 3), and this may be the source of the incompatibility.
    tbardzil wrote:
    I am trying to use a newer version of Xerces (2.5.0) with my web application.
    I've tried all sorts of things that haven't worked. I first startedoff trying
    the XML scoping feature using a .ear file but could never get that working(see
    my earlier post).
    I'm now trying to simply include the jar files in /WEB-INF/lib directoryof my
    war file here is what is happening
    1) xercesImpl.jar and xml-apis.jar in /WEB-INF/lib using prefer-webinf-classes
    flag in weblogic.xml -
    java.lang.ClassCastException
    at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(UnknownSource)
    2) xercesImpl.jar only in /WEB-INF/lib using prefer-webinf-classes flag
    javax.servlet.ServletException: loader constraints violated when linkingorg/xml/sax/XMLReader
    class
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:906)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3191)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:31
    3) xercesImpl.jar only in /WEB-INF/lib not using prefer-webinf-classesflag as
    suggested here
    http://e-docs.bea.com/wls/docs81/faq/xml.html#741640
    2003-10-21 13:29:16,942 [  ] FATAL com.avaya.elat.webapp.InitPlugin- INITIALIZATION
    ERROR:
    com.avaya.elat.webapp.InvalidJAXPFactoryException: JAXP factory "SAXParserFactory"
    is set to "weblogic.xml.j
    axp.RegistrySAXParserFactory", required value is "org.apache.xerces.jaxp.SAXParserFactoryImpl"
    at com.avaya.elat.webapp.InitPlugin.checkAndLogJAXPSettings(InitPlugin.java:135)
    Any ideas how to get this working? Weblogic has been far more unpleasantto get
    this stuff working than Jakarta Tomcat. And its FREE!

  • How can i pass array as argument in magento api method calling using sudzc API in iphone Native APP

    0down votefavorite
    I am implementing magento standard api method in native iphone app. I use webservice generated by sudzc. To call method I use:
    [service call:self action:@selector(callHandler:) sessionId:@" " resourcePath:@" " args:@""];
    When I used methods e.g. cart.info or product.info in which I have to pass one parameter; it gives valid response. But when I used method e.g. cart_product.add in which I have to pass an argument as value of array it gives error
    SQLSTATE[42000]: Syntax error or access violation:
        1064 You have an error in your SQL syntax;
        check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
    I have tested in SOAP UI also. There also it gives me same error. But same method works in PHP file. Even I tried by creating same soap request which I created using JavaScript but still it doesn't work.
    Can anyone help me to pass array as a parameter using sudzc api to call magento web services?

    There is an error in your SQL.

  • How to access an External LDAP on a weblogic server using OPSS APIs.

    Hi,
    Can anyone let me know how I can access an External LDAP configured on a weblogic server using OPSS APIs( or alternative APIs).
    I'm currently using the below snippet and I'm getting only the Users and groups from the DefaultAutheticator on the weblogic server and not the external LDAP Server.
    I've verified the providers, users and groups on the weblogic server console and can see that external LDAP server content is being picked, but my below code does not query them.
    import oracle.security.idm.IMException;
    import oracle.security.idm.IdentityStore;
    import oracle.security.idm.Role;
    import oracle.security.jps.JpsContext;
    import oracle.security.jps.JpsContextFactory;
    import oracle.security.jps.JpsException;
    import oracle.security.jps.service.idstore.IdentityStoreService;
    List<Role> rowData = null;
    JpsContextFactory ctxf = JpsContextFactory.getContextFactory();
    JpsContext ctx = ctxf.getContext();
    IdentityStoreService storeService = ctx.getServiceInstance(IdentityStoreService.class);
    IdentityStore idStore = storeService.getIdmStore();
    rowData = this.getRoles(idStore, "*");
    Any help or pointers are highly appreciated.
    Thanks,
    Bhasker

    Can anyone please provide any suggestions. I trying to google around but still not able to find any solution.
    Thanks,
    Bhasker

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

Maybe you are looking for