Invoke search against AD, returning DSML

Hi.
I am trying to send a simple search to Active Directory which would return result of the search in DSML format. I am using the following code:
Properties props = new Properties();
props.setProperty("java.naming.ldap.version", "3");
props.setProperty(Context.SECURITY_PRINCIPAL, "[email protected]");
props.setProperty(Context.SECURITY_CREDENTIALS, "*********");
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dsmlv2.soap.DsmlSoapCtxFactory");
props.setProperty(Context.PROVIDER_URL, "ldap://ad-server:389/");
DirContext ctx = null;
NamingEnumeration results = null;
try {
    ctx = new InitialDirContext(props);
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    results = ctx.search("DC=podjetje,DC=local", "(objectclass=*)", constraints);
    while (results.hasMore()) {
        System.out.println(results.next());
} catch (NamingException e) {
    e.printStackTrace();
finally {
    try {
        if (results != null)
            results.close();
        if (ctx != null)
            ctx.close();
    } catch (NamingException e) {
        e.printStackTrace();
}This example code works while using "com.sun.jndi.ldap.LdapCtxFactory" provider as INITIAL_CONTEXT_FACTORY.
But in case of "com.sun.jndi.dsmlv2.soap.DsmlSoapCtxFactory" provider I am getting exception 23:36:39,640 ERROR [STDERR] 8.3.2007 23:36:39 com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection call
SEVERE: SAAJ0006: Bad URL (endPoint instance of String)
java.net.MalformedURLException: unknown protocol: ldap in line results = ctx.search("DC=podjetje,DC=local", "(objectclass=*)", constraints);How would I invoke searching against Active Directory and get back results in DSML?

I haven't played around with DSML, so I can't say for certain exactly what's wrong. After a quick perusal of the DSMLv2 stuff it appears there may be two "things" you may be trying to do.
The first would be just displaying the results using DSML. The sample named AuthSearch in the dsmlv2 zip file seems to be close what you are trying to achieve, and will return the results something like:<?xml version="1.0" encoding="UTF-8"?>
<dsml:batchResponse>
<dsml:searchResponse>
<dsml:searchResultEntry.....dn="cn=AlbertEinstein,ou=research,dc=Antipodes,dc=com">
<dsml:attr name="displayName">
<dsml:value>Albert Einstein</dsml:value>
</dsml:attr>
</dsml:searchResultEntry>
<dsml:searchResponse>
</dsml:batchResponse>Your code snippet differs somewhat from the AuthSearch sample.
The second thing you could be trying to do is submit a DSML request using SOAP over HTTP.
In this case you will need to install a DSML server, such as Microsoft's DSML Services for Windows (DSFW) which can be dowloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=37df79b8-6f2b-4c04-9744-49816baee8ae&DisplayLang=en
In that case your code will be substantially different, more like the UseWithSoap sample. If you were using Microsoft's DsFW then the URI that you would use would be something like:http://myDsFWServer:80/dsml/adssoap.dsmlxHowever I've just had a quick play with this, and I can't get it to work. Seems like DSFW doesn't like the DSML syntax that the Sun DSMLv2 provider spits out.
(DSFW barfs when parsing the request and complains that the derefAliases definition is not in the DTD). There are certainly some diffeences between the DSML included in the Microsoft samples and what the Sun DSML provider produces. If someone understands the nuances of the different DSML providers, then perhaps they can help our poor friend out.
Good luck.

Similar Messages

  • GR against a Return PO

    Hi Everyone,
    Please guide me for the following query:
    In the month of Jun 2010, we had received some material against a po in the legacy system.
    But now we want to return some of the material back to the vendor as the quality was not good (now we are in SAP MM).
    When i am creating a return PO(Against the Material Code Return flag is marked), and while doing GR against the return PO system is showing a message "no selectable items exists".
    Kindly suggest why system is showing this message and when i am explicitly giving Movement Type 161, then also the same message is being appeared.
    Please guide.
    Thanks and Best Regards

    Hello,
    As the stock was recieved under legacy system and now return needs to be managed under SAP. You need to first create stock in SAP.
    Step No : 1 Go to Transcation MB1C >> Enter Movement type as 561, plant and storage location.
    Storage location may be warehouse managed or inventory managed.
    If it is inventory managed your stock will be directly updated ,and you can create return PO, but in case of warehouse managed you need to transfer this tock to its stoareg bin via transfer order.
    Step No : 2 Now Go to LT01 taranscation , enter warehouse number, movement typr 561, material and quantity requested,this quantity should be same as that of your qty, plant , storage location which you entered in MB1C Step No.1
    Now press enter. Now here you need to enter the source stoarage type and bin and destination storage type and bin.
    If customization is doe, system will automatically find the values for storage types and bin mentioned above.
    Save the transfer order.
    Now Go to ME21N and try to create retrun purchase order with retrun indicator Ticked for the material as the stock is now correctly maintained.
    BR,
    Tushar

  • How to use standard Search Input Help (return 2 data code and desc) ?

    Hi,
    Please advise how to use standard Input Help provided by SAP and return 2 data (code and description) ? because the standard Input Help only return the code only ?
    Thank You and Best Regards
    Fernand

    >
    Saket  Abhyankar wrote:
    > Hi,
    >
    > I think you need to go for 'Search Help Exit' or OVS.
    >
    > Regards,
    >
    > Saket.
    That is not true that this is the only way.  The standard Data Dictory based search help can return more than one value as long as there are multiple exporting values defined in the search help, the search help is attached to a Data Dictionary Structure, and this same data dictionary structure is used as the source of the context node. You can read more about this in the online help:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm
    The Note section under Integration:
    If an input help structure is stored in a field in the ABAP Dictionary, and if you want to use the field mapping of search help parameters stored in the ABAP Dictionary as the field name for the structure for your Web Dynpro input help, then map your context nodes to this structure. This ensures that all components of the structure are available dynamically at runtime as attributes of the node.
    If the context node is not mapped to the structure, the data element's input help can be used if there is one.

  • Invoke web service to return binary file (image) using soap

    Dear all,
    Please I a problem when invoking a web service throgh soap protocol,
    this we service has two operations, the first one takes student id and return doctype of it's documents id's,
    the another operation takes the document id and return it's image ( this is like archiving system)
    NOTE:
    I use soap package from this link:
    [http://www.oracle-base.com/dba/miscellaneous/soap_api.sql|http://www.oracle-base.com/dba/miscellaneous/soap_api.sql]
    Also I tried to invoke the following web service but failed:
    [http://www.webservicex.net/WS/WSDetails.aspx?CATID=12&WSID=56]
    CREATE OR REPLACE PACKAGE BODY pkg_my_webservice IS
    vg_funciton_fnc VARCHAR2(256):='GetCitiesByCountry';
    vg_ws_address VARCHAR2(255):='http://www.webservicex.net/globalweather.asmx';
    FUNCTION call_myfunction(vp_parameter1 VARCHAR2,vp_parameter2 VARCHAR2)
    RETURN VARCHAR2 AS
    ol_req soap_api.t_request;
    ol_resp soap_api.t_response;
    BEGIN
    ol_req:=soap_api.new_request(vg_funciton_fnc,'xmlns="'||vg_ws_address||'"');
    soap_api.add_parameter(ol_req,'string1','partns:string',vp_parameter1);
    soap_api.add_parameter(ol_req,'string2','partns:string',vp_parameter1);
    ol_resp:=soap_api.invoke(ol_req,vg_ws_address,vg_funciton_fnc);
    RETURN soap_api.get_return_value(ol_resp,'result','xmlns:m="'||vg_ws_address||'"');
    END call_myfunction;
    END pkg_my_webservice;
    Please can any one tell me how to invoke this web service to achive this ?
    Thanks in advance

    I don't see a version number.
    I don't see any indication as to where the code you posted originated.
    I don't see any indication of whether it works or does not work (for example an error message).
    If you have questions about web services ask them in the correct forum.
    If you want someone to teach you how to use them all I can tell you is that the developers where I work use lots of SOAP and not one has written a procedure similar to what you posted.

  • 11g Search Index is returning duplicate entries

    We are building up our 11g environments in preparation for migrating over from 10g. In one of our env's (UAT), we have an issue where, if we do a search on a Metadata field or Full Text value, the search engine is returning duplicate results - i.e. each document is listed twice.
    I have done several full rebuilds, including one where I deleted the IdcColl1 folder before kicking it off. No luck at fixing the issue.
    The environment is configured for Full Text searching using Sql Server 2005.
    I am not worried so much about finding out why this is like it is, I just want to fix it because I am running short of time. Any ideas?
    Thanks,
    Alec

    Srinath
    Thanks for your suggestion. I tried the process you described and did a full Reindex (which took several hours). However, when I did the search again this morning, I am still getting the duplicates.
    I am now thinking of exporting all the content using Archiver, reindexing the empty environment and then chcking that the index is empty. This way I have aclean sheet to start with. I would then reimport the content and do another reindex. Hopefully then, the index should be clean. My suspision is that after I have done the export and reindex, that there will still be stuff in the index. Have to wait and see.....
    Cheers

  • cm:search is not returning any result when logical operator '!' is used.

    <cm:search is not returning any result when logical operator '!' is used.
    I am using BEA 9.1 content management services API. When I run the following query I am not receiving any results. Also no error or exceptions are seen in the weblogic or cmspi log.
    The query is <cm:search id="docs" query="!(object_name like 'Sport*')" />

    HI cam 
    Thanks for your reply, but i found the problem it was because my server administrator password has changed by network guys... and because of it crawler unable to access the content 
    I wrote my solution here i hope it will help other people 
    http://bvs-sharepoint.blogspot.com/2015/03/sharepoint-search-is-not-returning.html
    RB

  • Search message body returns empty

    I have deleted global-messages-db.sqlite and re-indexed my mail.
    It is an imap account.
    I have "Search subfolders" and "Run search on server" checked.
    I get empty results when searching (Body: Contains: "my search query")
    I am searching for text that I know is in the body of email messages.
    I have even opened up an email, copied the text and pasted it and get no results.
    Thunderbird 24.4.0
    Windows XP

    Yes. it is synchronized.
    Ctrl+Shift+F to open the Search Messages.
    Then for the criteria a I select {Body: Contains: "type in what i'm looking for"}
    I have tried - Search for messages in:
    root of the email account; Inbox; Sent; but I get no returns.
    Again I have the "Search subfolders and Run search on server" checked
    I get results returned when I do a search in the subject line
    {Subject: Contains: "type in what i'm looking for"}
    After trying many message body searches, I have just gotten a partial search return, but it is only emails that are replies with the original email quoted in them. The search does not return all messages containing this text nor the original sent email.

  • Could not invoke operation against the DB adapter due to BINDING. JCA-11812

    Hi,
    We are getting the following binding error BINDING. JCA-11812.
    Could not invoke operation against the DB adapter due to BINDING. JCA-11812 due to interaction processing error.
    Procedure(InputParameters,OutputParameters) ] Could not invoke operation against the 'Database Adapter' due to:
    BINDING.JCA-11812
    Interaction processing error.
    Error while processing the execution of the Procedure API interaction.
    An error occurred while processing the interaction for invoking the Procedure API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. This exception is considered not retriable, likely due to a modelling mistake.
    Can anyone let me know what caused this error?
    Thanks,
    Chandu

    Hi:
    This message : Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. This exception is considered not retriable, likely due to a modelling mistake.
    seems that what u r sending to the DBAdapter, does not conform to the XSD that represent the message on that particular operation.
    Could u pls double check that?
    thx
    best

  • Search help to return multiple values

    Hi all,
    I've created a search help and I'd like it to return several values to different fields, I don't want these fields to be seen on the selection screen.
    For example:
    1. User clicks on search help for FIELD1 and selects a value from the pop-up box
    2. Program populates FIELD1 depending on the user selection
    3. Program also populates FIELD2 and FIELD3 which can be used in the program at a later date.
    I can do 1 and 2 but I'm having an issue with 3.  I've tried selecting all fields in the search help as Export, but although that populates the fields in the search help test facility, it doesn't know which fields I want it to populate in my program.
    I've also tried using FM F4IF_FIELD_VALUE_REQUEST but can only get this to return one line in table RETURN_TAB.
    The screen fields are declared as:
    PARAMETERS: FIELD1 LIKE TAB1-FIELD1 MATCHCODE ZSEARCH_HELP,
                             FIELD2 LIKE TAB1-FIELD2 NO-DISPLAY,
                             FIELD3 LIKE TAB1-FIELD3 NO-DISPLAY.
    Any help is appreciated.
    Gill

    Thanks for your suggestion but what I failed to put in my original post was that FIELD1 is a description field and FIELD2 and FIELD3 are the actual key fields for the table which I need.
    So, I can't do your suggestion of populating them based on FIELD1, I need to know which line the user selects to populate these key fields as FIELD1 may not be unique within the table.
    Does that make sense?
    That's why I wanted the search help to return all 3 values then I can populate FIELD2 and FIELD3 from that.

  • Search function only returns the first entryinstead of 2600

    Hi all,
    I am using JDNI to search in a iPlanet LDAP. This is the code:
    String filter = "(objectclass=TDC-Empleado)";
    NamingEnumeration resultados;
    SearchControls limitacionesBusqueda=new SearchControls();
    limitacionesBusqueda.setSearchScope(SearchControls.SUBTREE_SCOPE);
    results = ctx.search("o=TDC",filter,limitacionesBusqueda);
    I know with another tool that this filter works but the search function only returns the first entry!!!
    Somebody can help me ?
    TIA
    Manuel

    humm.
    Sets ctx.setCountLimit(long), or else checks the "size limit" of your iplanet server (size limit: number of entries returned to the client application).
    A.V.

  • Using REST API: Query search box to return list items

    Hey,
    My goal is to create a search box which returns the items (matching to the name) from a list.
    Bonus: The return would happen without requiring user to click a
    Search button or such.
    To achieve this I assume the SharePoint 2013's REST API should be used. I'm completely inexperienced in using the REST API so all kind of suggestions are available.

    Hi,
    Here are some articles about SharePoint 2013 REST API for your reference:
    Get started with the SharePoint 2013 REST service
    http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
    How to: Complete basic operations using SharePoint 2013 REST endpoints
    http://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    SharePoint 2013 – CRUD on List Items Using REST Services & jQuery
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Working with SharePoint list data - OData, REST and JavaScript
    http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx
    Best regards
    Dennis Guo
    TechNet Community Support

  • Since 12/11/2014 Thunderbird 12.1.2 (Oracle ESR) crashed exactly 17 times , always when it the 'To' list searches against the LDAP

    Since 12/11/2014 Thunderbird 12.1.2 (Oracle ESR) crashed exactly 17 times , always when it the 'To' list searches against the LDAP.
    I have tried upgrading it from About > Help. But it never happened after the update download, as it always says some other instance of TB still runs on my computer when ever I Launch TB for the first time after a System Boot.
    Same thing happens in SAFE Mode as well.
    bp-26c9d605-bd89-4f48-90f5-947f72150129
    Thanks,Preeth

    http://kb.mozillazine.org/Profile_in_use

  • Error - 21007 Search for table returned error - can't find data source??

    I am using an Oracle thin driver through a BI JDBC system. The system connects fine when testing in my 2004s portal. It also worked fine in VC and I was able to browse tables and views in the Oracle db. Suddenly it has stopped working. When trying to search for a table in VC it returns the error message above.
    The only thing I have changed is the "enable SQL editor" setting in Visual Admin which has been set to true. Changing this back to false has no effect, so I can't see that this should cause the problem.
    Henning

    Dear Henning,
                 Do you solve this case?.
    Best regards,

  • Can not "post goods issue" against Vendor Return PO.

    Hello Friends,
    **I have a problem During the "Vendor Return Through Purchase Order" Process.I crated a PO with return flag set.**
    **Then  1) Created a outbound delivery against purchase order (VL10B)**
              2) Created a Billing (VF01)**
              3) Next is VL02N - While doing the "post goods issue" where i got following error  message "Update control of movement type is incorrect (entry 161 X X _ L)"**
    Its shows setting related to Mvt 161 to update .I check allowed transaction with respect to 161....VL02N is there .....But don't understand what change needed in "Update control /WM movement type is needed.....Pls suggest any solution........Thanx**
    Regards
    Sachin
    *Error Messafe -
    Update control of movement type is incorrect (entry 161 X X _ L)
    Message no. M7226
    Diagnosis
    The system could not find entry 161 X X _ L in any of the movement type control tables.
    Procedure
    Cancel current processing.
    Contact your system administrator.
    Action to be taken by the system administrator
    Check in Customizing for Inventory Management under Copy, Change Movement Types whether the entry is contained in the Update control view for the movement type.
    If the entry is missing, proceed as follows:
    For standard movement types, this means that the given process is not supported using the present data combination. Do not create any entries without prior arrangement with your SAP consultant. Otherwise, incorrect postings may result.
    For customer-defined movement types (beginning with 9, X, Y, or Z), this may mean that they have not been fully defined. Delete the movement type and re-create it by copying a standard movement type.

    Hi Antony,
    Thanx for reply.
    1) I had assign  delivery Type (RL -Returns Purchase order) to my document type. Assingnment of delivery type thru
    spro>MM->purchasing>purchase order->set up stock transport order--->assign delivery type and checking rule....
    2) MvT - 161----If i modify 161 wrt to  GR Returns what modification is needed ? ......
    3) VOV6 - I had checked it ,maintain it, but that is not relavant in my case....
    4) During PGI system pick 161 as defalult MvT.....can we change it t0 122 ? but how...??
    still the problem is there......
    Sachin

  • Invoking a process to return a SQL query as XML results in empty XML tag (but testing the SQL works)

    I have a process that runs a SQL query and returns the results as XML.  When I test the query in the Process Properties tab in Workbench it appears to execute just fine.  I can also test the XML information and see that the results are coming back correctly.  But when I invoke the process I get an emtpy XML tag with no results.  Recording the invocation and playing back the recording doesn't tell me anything useful.  Has anyone ever seen this issue before?  I don't understand why everything within the process seems to bring back results just fine but invoking it returns nothing.

    Unfortunately I am not the admin for our LiveCycle instance and do not have access to the server logs (long story).  I also am not authorized to share any LCA files for this project.  Thanks though.

Maybe you are looking for

  • Ports Open, people still can't connect

    I'm trying to set my router up to be able to host a private call of duty 4 server for my friends, but it doesn't seem to be working. I have my computer set up as a static IP address, and I have the correct ports forwarded on the router under the corr

  • Select List border color ?

    Hi, Is there a way to change the Select List border color (Drop down list) ? I tried to add some style in the HTML element attribute without success. Thank you.

  • Latest Mozilla onboard & registered Adobe Systems user, so why asked to update Adobe Flash Player everytime to see u-tube video?

    On needing and trying to do medical research, I am directed to university videos that are on u-tube. Have latest version of Mozilla Firefox compatible with Windows 7 Ultimate original registered operating system onboard. All critical MS downloads sho

  • Black screen with exclamation mark .

    Using iphoto 11 ver 9.2.1. When I click on a photo to open the file I get a black screen with an exclamation mark. I have tried rebuiding database from automatic backups and all the others listed when opening iphoto with the alt+command key held down

  • Can I get my phone repaired?

    I have an iPhone 5 with a cracked screen. I also have no warranty on the phone to get a replacement. Can apple still repair my phone? How much will it cost?