Integrations and APIs for Service

Get Involved. Join the Conversation.

Posts

  • Yogesh Patil
    Query execution via SOAP API throwing exception :...
    Topic posted January 6, 2016 by Yogesh Patil 
    Title:
    Query execution via SOAP API throwing exception : org.apache.axiom.om.OMException: SOAP message MUST...
    Content:

    I am trying to query one object using RightNow SOAP client. For most of the objects it returns expected value, however for some objects it is throwing exception. 

    Code works fine for most of the case however for some objects it is throwing this exception : 

    Jan 06, 2016 2:11:55 PM org.apache.axis2.builder.BuilderUtil getSOAPBuilder
    INFO: OMException in getSOAPBuilder
    org.apache.axiom.om.OMException: SOAP message MUST NOT contain a Document Type Declaration(DTD)
        at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createDTD(StAXSOAPModelBuilder.java:455)
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:282)
        at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:198)
        at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
        at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:140)
        at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:686)
        at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:197)
        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:108)
        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
        at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
        at com.rightnow.ws.wsdl.RightNowSyncServiceStub.queryObjects(RightNowSyncServiceStub.java:6043)

    If there is issue with client code I am using it should not work for any of the object. I am not sure what is causing this problem.

    Kindly help if anyone know what is the issue.

    Thank you in advance.

    Regards,

    Yogesh

    Code Snippet:
  • rishikant thapliyal
    Multilingual Labels for custom columns
    Topic posted January 4, 2016 by rishikant thapliyal 
    Title:
    Multilingual Labels for custom columns
    Content:

    I've a requirement to extract multilingual labels for custom columns which are added to Incident object. Using the api getMetadataForClass i've extracted the list of custom fields (under IncidentCustomFieldsc) and scanned their properties, but there is not property which gives the Label Name. Can someone provide sample code to get the label name for custom columns ?

    Version:
    1.2.14.8
  • Marcela Romero
    Chaining between Incident and a Custom Object API SOAP5.0
    Topic posted December 12, 2015 by Marcela RomeroGreen Ribbon: 100+ Points 
    Title:
    Chaining between Incident and a Custom Object API SOAP
    Content:

    Greetings,

    I am trying create a Custom Object and a Incident using Chaining and Batch.

    When I create the Custom Object, I write the following lines:

    ChainSourceID _chainPolizaID = new ChainSourceID();
    _chainPolizaID.setVariableName("Poliza");

    c.setID(_chainPolizaID);

     

    Then, I try to create the Incident, and I don'w know how do the relation for Chaining.

    I try with this code:

    List<GenericField> fields = new ArrayList<GenericField>();

    ....

    GenericField poliza = this.createGenericField("id_poliza", this.createNamedIDChainDataValue("Poliza"), DataTypeEnum.NAMED_ID);
    fields.add(this.makeGenericField(poliza));

    where function makeGenericField is defined as:

    private GenericField makeGenericField(GenericField genericField){
            GenericObject go2 = new GenericObject();        
            RNObjectType objType2 = new RNObjectType();
            objType2.setTypeName("IncidentsCustomFieldsc");        
            GenericField[] fields2 = new GenericField[1];
            fields2[0] = genericField;
            go2.setGenericFields(fields2);
            go2.setObjectType(objType2);
            
            GenericField gf = new GenericField();
            gf.setName("c");
            gf.setDataType(DataTypeEnum.OBJECT);
            gf.setDataValue(this.createObjectValue(go2));
            
            return gf;
        }

     

    And I got this error:

    UNKNOWN_EXCEPTION->Could not find property for given key: id_poliza
    While processing Incident->CustomFields(rng_v1_3::GenericObject).

    Could be because I create field poliza_id in the "Object designer" (as a Poliza relation) and not like a Incident's Custom Field ?

    Please, I would be very happy if you can help me.

    Best regards

     

     

     

     

     

     

    Version:
    August 2015
  • Allan Schrum
    ROQL::queryObjects() vs ROQL::query()5.0
    Topic posted September 8, 2015 by Allan SchrumGold Crown: 30,000+ Points 
    Title:
    ROQL::queryObjects() vs ROQL::query()
    Content:

    A common topic is: when do I use QueryObjects versus using QueryCSV in Connect Web Services for SOAP. The equivalent question in Connect for PHP is: when do I use ROQL::queryObjects() versus using ROQL::query(). I'll use ROQL::queryObjects() and ROQL::query() for this discussion as it comes up more in the context of Connect for PHP.

    First, what is the difference between ROQL::query() and ROQL::queryObjects()? Perhaps some pseudo code will demonstrate how ROQL::queryObjects() works:

    $result = RNCPHP\ROQL::queryObjects( "SELECT Contact FROM Contact WHERE Organization.LookupName = 'Oracle' " );

    becomes

    $result = array();
    $rrs = RNCPHP\ROQL::query( "SELECT ID FROM Contact WHERE Organization.LookupName = 'Oracle' " );
    while ( $rrs && $rr = $rrs->next() )
    {
        while ( $row = $rr->next() )
        {
            $result[] = RNCPHP\Contact::fetch( $row['ID'] );
        }
        unset( $rr );
    }
    unset( $rrs);

    As you can see there is a flurry of activity created by the ROQL::queryObjects() request. So what is the advantage of this approach? Sure, you have the whole object, but do you need the whole object? If you are only trying to find out the first and last name of the Contact this seems like a large penalty to pay when a simple ROQL::query() would suffice:

    $rrs = RNCPHP\ROQL::query( "SELECT Name.First, Name.Last FROM Contact WHERE Organization.LookupName = 'Oracle' ");

    Another point I often hear is: I like to use objects - I support object oriented programming. Therefore, ROQL::queryObjects() is the API to use.

    In general, I agree, but I temper that with how the objects are used for the purpose at hand. Suppose I wanted to make The Cool Web Page that shows all those Contacts that belong to Oracle? I just want to display their first and last name in a paged format with 500 people per page. I'll ORDER BY ID so that I get a repeatable output that pages easily. For that first page to be displayed, what would the two different approaches look like? And what is the cost of each?

    Using ROQL::queryObjects() it would be something like (and I'll leave the HTML output as an exercise for you):

    $results = RNCPHP\ROQL::queryObjects( "SELECT Contact FROM Contact WHERE Organization.LookupName = 'Oracle' ORDER BY ID" );

    Now that I have my result I iterate over each object and output each first and last name. How much work was done? The resource that really embodies the concept of "work" is the database, so let's look at it from that point of view. Using the pseudo-code above, I need 1 query for the list of IDs, followed by 500 Contact::fetch() calls, each call returning information using a query from the database. Thus this approach has a "cost" of 501 queries. That seems like a lot given this is a page of simple data. What's the cost of the ROQL::query() approach?

    $rrs = RNCPHP\ROQL::query( "SELECT Name.First, Name.Last FROM Contact WHERE Organization.LookupName = 'Oracle' ORDER BY ID" );

    One query. Same information. That is 501 vs. 1 in terms of cost. As there is nothing for free it would make sense that the approach that costs less is the approach that should be chosen. ROQL::query() wins!

    So usage is the big driver of why we would want to use ROQL::queryObjects() instead of ROQL::query(). My "Rule of Thumb" for its use is this: are you calling save() on these objects?

    If you are trying to save() these objects by making bulk changes, then ROQL::queryObjects() make sense. Otherwise, use ROQL::query() as you'll then get the data you need with the most efficient set of queries possible.

    Regards,

    -Allan

     

    Version:
    All since 10.5 when Connect was first released
  • Builta Group
    RunAnalyticsReport operation not available when using...5.0
    Topic posted August 26, 2015 by Builta Group Blue Ribbon: 750+ Points 
    Title:
    RunAnalyticsReport operation not available when using generic WSDL
    Content:

    Why is the RunAnalyticsReport operation not included in the Partner WSDL? (https://<your_site>/cgi-bin/<your_interface>.cfg/services/soap?wsdl=generic)

     

  • Heena Karir
    All Columns of the Table in one Report...5.0
    Topic posted September 9, 2014 by Heena KarirBronze Trophy: 5,000+ Points 
    Title:
    All Columns of the Table in one Report...
    Content:

     Hi All,

    Is there any way to add all the columns of a table to the report apart from manual drag and drop method? 

    Thanks,

    Heena Karir

  • Angeliki Kanavaru
    Javascript API -Problem with onbeforesave()5.0
    Topic posted July 19, 2013 by Angeliki KanavaruGreen Ribbon: 100+ Points 
    Title:
    Javascript API -Problem with onbeforesave()
    Content:

    Hello all,

    I'm trying to validate  the input for a custom field (the birthdate text field) using the Javascript API and the onbeforesave() function.

    The onbeforesave() function is called when I open an existing contact and modify data and then trying to save them only the first time.

    For example if I change the birthdate and press Save the onbeforesave() function is called, validates my input and prompts a message.

    Lets say that the abovementioned input was wrong and I change its value and press Save again,  the onbeforesave() function isn't called, thus the validation doesn't occur.

    What I'm trying to say is that the onbeforesave() function is called only ony the first time I press Save  for a record (either new or existed) and not every time I press Save.

    Here is the code I'm using :

    <script type="text/javascript">
     
     
    function onbeforesave()
    {
       var date = window.external.Contact.GetCustomFieldByName("c$birthdate");
     
    if(date!=null)
    {
    var reg=/^(0[1-9]|1[0-2])[/](0[1-9]|[1-2][0-9]|3[0-1])[/](19|20)\d\d$/;
    var check = false;
     
    if( reg.test(date))
    {
    document.write("Valid value");
    var success = true;
    // execute the response
    window.external.beforesavecomplete(success, "Save OK!");}
     
    else
    {
     
    document.write("Invalid value");
    var success = false;
    window.external.beforesavecomplete(success, "Invalid value for Birth Date");}
     
     
    }
    else
    {document.write("Not set yet!");}  
    }
    </script>
    Any ideas?
  • Shreyas Pandhari
    Putting the standard text by clicking a button in a...5.0
    Topic posted July 5, 2013 by Shreyas PandhariSilver Medal: 2,000+ Points 
    Title:
    Putting the standard text by clicking a button in a workspace
    Content:

     

    Hi,
    Hope all are doing fine.

    I am designing a business scenario as below:
    In an incident workspace, on a tab (say Tab1) I want to put a button "Insert Standard Text" on Tab1. After clicking on this button I want invoke standard text window from where I can select the standard text. The selected standard text should come into the Text area.

    Can this be achieved in RightNow. If yes then how?

    If it can be achieved using Add-ins then please elaborate more on this.

    Please find attached screenshot describing the requirement.

    Thanks,
    Shreyas

    Version:
    Feb13
    Image:
  • Marv Ferrer
    Is it possible to run an Ajax script within the...5.0
    Topic posted May 16, 2013 by Marv FerrerSilver Trophy: 7,500+ Points 
    Title:
    Is it possible to run an Ajax script within the "onbeforesave" and "onsave" events? I'm trying to do...
    Content:

    Is it possible to run an Ajax script within the "onbeforesave" and "onsave" events? I'm trying to do that now but the Ajax function does not run or is being omitted. We're in Aug 11 release.

    Below is a sample Ajax function:

    function RunAjax() {
        if (window.XMLHttpRequest)
          {// code for IE7+, Firefox, Chrome, Opera, Safari
          xmlhttp=new XMLHttpRequest();
          }
        else
          {// code for IE6, IE5
          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        xmlhttp.onreadystatechange=function()
          {
          if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
            document.getElementById('myDiv').innerHTML=xmlhttp.responseText;        
            }
          }
        xmlhttp.open("POST","http://mywebsite.com/ajax_test.php",true);
        xmlhttp.send();        
    }
    

    My onbeforesave function is defined below. When I save a ticket, the "Not saved!" message does not popup.

    function onbeforesave() {
        RunAjax();
        window.external.beforesavecomplete(false,'Not saved!');    // - for testing purposes only
    }
    

    Any help is very much appreciated.

     

  • Prajna Parmita
    Rightnow Analytics through OBIEE5.0
    Topic posted January 26, 2013 by Prajna Parmita 
    Title:
    Rightnow Analytics through OBIEE
    Content:

    Hi Experts,

     

    We are trying to generate Rightnow analytics report through OBIEE. For that we will need to connect to the RightNow database.

     

    Can anyone please tell me how to get the connection details of RightNow  database.

     

    Thanks

Filter by Date

< < November 2019 > >
S M T W T F S
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Filter by Type