1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Using AdvancedSearch webservice to send a query to Stellent/Oracle UCM

Discussion in 'Oracle Webcenter Suite (formerly Oracle ECM)' started by PowerPaul86, Jul 3, 2009.

  1. PowerPaul86

    PowerPaul86 Active Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    65
    Location:
    Germany, Karlsruhe
    Hi there,

    i am trying to use the webservice of an Oracle UCM server to search for a specific document.

    All i am trying to do is a search in the following pseudosqlcode:

    Code (Text):
    WHERE 'dDocTitle' = "testBild4Nagios.png"
    I can successfully call the AdvancedSearch webservice and perform a search with the following code:

    Code (Text):
    $result = $soap->AdvancedSearch(array(  
                                            'queryText'=>""
    ));
    That way i get all documents as a search result.

    Now how do I add the before mentioned WHERE clause?

    I know that all parameters must be XML encoded, so I tried out:

    Code (Text):
    $queryText = 'dDocType <Substring> "testBild4Nagios"';
    But I still get the error message:

    Code (Text):
    [statusMessage] => The query could not be executed. Invalid character in the query position 9: "dDocType <Substring> "testBild4Nagios""
    Position 9 is the first blank in the queryText.

    I also tried out urlencode to remove the blank character but still no success.

    Could you help me with this?
    Do I need to configure the UCM server to accept blank characters?


    Thanks in advance!
     
  2. PowerPaul86

    PowerPaul86 Active Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    65
    Location:
    Germany, Karlsruhe
    As usual I found the solution right after I posted this ...

    I didn't tried

    Code (Text):
    $queryText = "dDocTitle <substring> `testBild4Nagios.png`";
    without urlencode ...

    Now it works as it should.

    Maybe someone else can use my php script:
    http :// pastebin. org / 31
     
  3. markH

    markH Forum Advisor

    Messages:
    88
    Likes Received:
    10
    Trophy Points:
    180
    Location:
    Kansas
    i suggest instead of substring to use like operator and % character. Something like this

    Code (Text):
    $queryText = 'dDocType like &quot;%testBild4Nagios%&quot;';
     
  4. markH

    markH Forum Advisor

    Messages:
    88
    Likes Received:
    10
    Trophy Points:
    180
    Location:
    Kansas
    oh.. great...
     
  5. PowerPaul86

    PowerPaul86 Active Member

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    65
    Location:
    Germany, Karlsruhe
    Another question is it somehow possible to delete a document with a call of a webservice?

    I am frequently checking in a document to simulate a user interaction.
    Now I want to remove this / or all testdocuments.
    I got all the information (dDocName, dID etc.) about the testdocument thorugh the AdvanceSearch webservice.

    I could checkin the test files in a special group, so I could delete that group folder in the weblayout, but I also would need to delete the corresponding entries in the oracle database.

    Is there a simpler way to do this?


    Thanks in advance!
     
  6. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Sure you can. All UCM functionlities are service calls so why can't you delete!

    You need to use the DELETE_REV service call to delete a particular revision. You may like to read this chapter from Bex's book to get more details:

    http://books.google.com/books?id=TiUzMYbpg2MC&pg=PA373&dq=stellent+services

    and btw that's a cool Avatar!