Using SharePoint WebServices in APEX

Hi,
I'm trying to use sharepoint webservice in apex.
But sharepoint webservices uses NTLM authentication, and there is no such option in apex web service config.
I tried to put authentication data in soap header, but I didn't get any answer from the web service.
When I use default settings I got 401 unathorized response from the sharepoint server.
Is there some way for use ntlm auth in apex webservices connection ?
Regards,
Marcin

Joel
thank you for clarification. Really appreciate your help. I was able to get the list. Here is the procedure. The line that fails is highlighed. Basically it can't initialize the session on AD server...
declare
     p_username          varchar2(25):='test';
     p_password          varchar2(25):='test';
     l_user               varchar2(256);
     l_ldap_server     varchar2(256)     := 'AD host';
     l_domain          varchar2(256)     := 'domain';
     l_ldap_port          number               := 389;
     l_retval          pls_integer;
     l_session          dbms_ldap.session;
     l_cnt               number;
begin
--     l_retval := dbms_ldap.unbind_s( l_session );
     l_user               := p_username||'@'||l_domain;
*     l_session          := dbms_ldap.init( l_ldap_server, l_ldap_port ); -- start session*     
l_retval          := dbms_ldap.simple_bind_s( l_session, l_user, p_password ); -- auth as user
     l_retval          := dbms_ldap.unbind_s( l_session ); -- unbind
     dbms_output.put_line( 'yes');
exception when others then
dbms_output.put_line( 'no');
raise_application_error(-20101, 'invalid user');
     end;
thanks, Ed

Similar Messages

  • Copying list attachments using sharepoint webservice namely lists

    hi
    please anyone tell me how to get sharepoint lists attachment and adding that attachment into another list using sharepoint webservice methods get attachment collection,add attachment
    Thanks

    To add a new list item attachement
    please refer this code
    string srcUrl = textBox1.Text;
    if (! File.Exists(srcUrl))
    throw new ArgumentException(String.Format("{0} does not exist",
    srcUrl), "srcUrl");
    FileStream fStream = File.OpenRead(srcUrl);
    string fileName = fStream.Name.Substring(3);
    byte[] contents = new byte[fStream.Length];
    fStream.Read(contents, 0, (int)fStream.Length);
    fStream.Close();
    Web_Reference_Folder.Lists listService =
    new Web_Reference_Folder.Lists();
    listService.Credentials= System.Net.CredentialCache.DefaultCredentials;
    try
    string addAttach = listService.AddAttachment("List_Name", "3",
    fileName, contents);
    MessageBox.Show(addAttach);
    catch (System.Web.Services.Protocols.SoapException ex)
    MessageBox.Show("Message:\n" + ex.Message + "\nDetail:\n" +
    ex.Detail.InnerText + "\nStackTrace:\n" + ex.StackTrace);
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Need to get the name and the Site ID of a specific user using SharePoint Webservices

    Hi,
    I need to get the User's name by passing the Login Name using SharePoint OOB Web Services.
    I need to pass DOMAIN\\Login ID and get the User's Info i.e. Name and the ID of a particular site.
    I'm trying to use GetuserInfo:
    $(document).ready(function () {
    var soapEnv = "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"+
    "<soap:Body>"+
    "<GetUserInfo xmlns=\"http://schemas.microsoft.com/sharepoint/soap/directory/\">"+
    "<userLoginName>DOMAIN\\Login ID</userLoginName>"+
    "</GetUserInfo>"+
    "</soap:Body>"+
    "</soap:Envelope>";
    $.ajax({
    url: "<http://SiteURL>/_vti_bin/usergroup.asmx",
    beforeSend: function (xhr) {
    xhr.setRequestHeader("SOAPAction",
    "http://schemas.microsoft.com/sharepoint/soap/directory/GetUserInfo");
    type: "POST",
    dataType: "xml",
    data: soapEnv,
    complete: processResult,
    contentType: "text/xml; charset=\"utf-8\""
    function processResult(xData, status) {
    alert("Status : " + status);
    alert(xData.responseText);
    console.log(xData.responseText);
    But i get error stating that User does not exist.
    Appreciate all your help.
    Regards,
    Sachin

    Hi Sachin,
    The following code for your reference:
    <script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    var url ="http://sharepoint/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='contoso\\administrator'";
    $.ajax({
    url: url,
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
    var results=data.d.UserProfileProperties.results;
    error: function (data) {
    </script>
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to execute XML batch commands using SharePoint Web services or Client Object Model

    Hi,
    I have a requirement to execute some batch commands to update SharePoint View Style, how can i do it using SharePoint webservices or SharePoint Client Object model.
          I need to execute the following Batch command over a particular web.
    <Method ID="UpdateView">
      <SetVar Name="Cmd">UpdateView</SetVar>
      <SetList Scope="Request">{GUID of List}</SetList>
      <SetVar Name="View">{GUID of View}</SetVar>  
      <SetVar Name="ViewStyle">6</SetVar>
      <SetVar Name="RowLimit">100</SetVar>
      <SetVar Name="Paged">TRUE</SetVar>
    </Method>

    Hi
    I tried it already... But UpdateView Method in the Views.asmx and Lists.asmx, both are not supporting for updating the style of the view (like Boxed, Newsletter...).
    If you have any code sample which will do this job with any of the SharePoint web services, please share it..

  • How to receive and upload data into Sharepoint using webservice in BizTalk (without using sharepoint adapter).

    Hi,
    I have a requirement to receive files from sharepoint and upload files to share point.
    So is there anyway we can achive this using webservices in BizTalk (without using sharepoint adapter)
    Thanks in advace

    I do not have a sample flow... but if you refer to the samples where these web services are used then you'd be able to translate those code samples into BizTalk flows.. For e.g.:
    http://msdn.microsoft.com/en-us/library/office/ms429658(v=office.14).aspx refers to returning list items. When you add generated items to your BizTalk for SharePoint Web Services, you'd get the schemas (xmlDocs in the sample) which you'd instantiate and
    call.
    When dealing with lists, you will need the GUID of the list so you need to do a GetLists call first and then get the GUID for your specific list from that. You will also encounter CAML which is what is used to query and get List Data.
    Have fun.
    Regards.

  • Need to use a webservice, which expects a Java Forminput class, in Apex

    Hi,
    I'm fairly new to webservices in Apex but have successfully created and used one.
    We now need to use a webservice that was created for a legacy system and expects a Java Forminput class as its second parameter.
    msg = webServ.request_Str(sessionId, frmInput); I do have some details of what the frmInput contains but my basic question to any Web Sevice and Java experts out there is can I take my form items and values and create something that looks like a Java Forminput to the Apex webservice call?
    Any hints on how to do this would be most welcome.
    Thanks,
    Chris
    PS Using Apex 3.2
    Edited by: phillips_chris on Oct 13, 2011 9:22 AM

    The '$' symbol cannot be used directly in SE91 message text. But you can create a message "Sales order does not meet the minimum net value of &" and then in the program call message like this:
    MESSAGE .... WITH '$10,000' .

  • Call more external webservice from apex

    How can call more external webservice from apex - consecutively one after another - one execute, than next used as a parameter of the previous webservice results

    Sandboxed solution server code can't call an external web service.  There are ways to write a sandboxed solution that calls a web service using client side code.  Here's a sample of a silverlight application deployed via the sandbox that can call
    an external web service.
    http://msdn.microsoft.com/en-us/library/gg615590(v=office.14).aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • How to use amazon webservice in jsp-netbeans

    hi all,
    i want to use amazon free webservice in my project......
    i read lots of articles and other helps from net but m not able to do it......
    it needs the wsdl link which m unable to trace
    plz help me soon

    Hi,
    According to your post, my understanding is that you wanted to use UserGroup WebService in Sharepoint Designer 2013.
    SharePoint 2013 has Nintex Workflow 2013 App, I recommend to add User to SharePoint Group Using NINTEX Workflow.
    There is an article for your reference, although it is about the SharePoint 2010, it still works for SharePoint 2013.
    http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-add-user-to-sharepoint-group-using-nintex-workflow/
    More information: SharePoint 2013 has Nintex Workflow 2013 App
    http://benprins.wordpress.com/2012/08/09/sharepoint-2013-has-nintex-workflow-2013-app/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Operation Timed out retrieving large xml from SharePoint webservice

    When I try to retrive a large list from a SharePoint webservice the operation gets timed out. I had used an unusually large row size to get it back until now but since the list has grown, its timing out again. This is my code, can anybody suggest anything
    to stop it getting timed out please?
    XmlNode ndListItems = listService.GetListItems(ListName,
    null, ndQuery, ndViewFields,
    "47797", ndQueryOptions,
    null);
    using (var writer
    = System.IO.File.CreateText(AMSListName.Replace(" ",
    "") +
    ".xml")) {
                            writer.WriteLine(ndListItems.OuterXml);
    Sharepoint Dummy

    XSQL uses DOM.
    However, do you want to publish the document on Web?
    Why don't you paginate your document for display? If you do need to paginate the document, you can use the &lt;xsql:query skip-rows = "integer"/&gt; to reduce the size of the query result.
    This might help.

  • HTTPS webservice in APEX 4.1.1 on 11gXE database

    Hi,
    I was trying to integrate APEX 4.1 with Service-Now ticketing tool. Most of the clients use Service-Now or Remedy for their incident management. Service-Now has exposed the incident details with https://demo.service-now.com/incident.do?WSDL. Use 'admin' as user id and 'admin' as password. We can use this WSDL to create webservice reference and then create a form and report using that webservice reference. But when I was trying to create the webservice it is throwing that generic error Create Web Service Reference 'The URL provided did not return a valid WSDL or wallet needs to be configured for HTTPS requests.
    Following are my details
    APEX Version 4.1
    Database 11gXE
    Webtier : Oracle HTTP server 10g
    Has anyone configured XE for outgoing HTTPS requests.? Could you please help?
    Thanks in advance.
    Mehabub
    Edited by: Mehabub Sheikh on Aug 3, 2012 7:32 AM

    Hi Dietmar,
    Thanks for the information. I am a great fan of yours. I bought your book Expert Oracle Application Express and got many ideas. I learnt a lot from that. I am still learning.
    Could you please help me in resolving the issue I am facing now.
    Below are the details.
    I created a Webservice Reference Manually and tested it from there it showed me the response message. But when I created a form and Report using that webservice reference it did not show me the output.
    What I did are the following
    1) Created Webservice reference manually and specify the END Point URL and action based on the WSDL
    2) Specified the SOAP envelope
    4) Specified the collection name for storing the output message
    4) From Application Builder clicked on Create Page
    5) Selected Form and then selected Form and Report based on Webservice
    6) Selected Webservice name and operation from the drop down
    7) Included the input parameters
    8) Selected SOAP Style as Document and Message Format as Literal
    9) Specified the xpath for the result node
    10) Specified the namesapce for the output message
    11) Specified the output element to display in my report
    12) Ran the Page
    13) Specified the input parameter and user name password for authentication(webservice)
    The Report did not show any output.
    The wsdl is [Service-Now Incident Integration|https://demo08.service-now.com/incident.do?WSDL] . I created the webservice based on this WSDL.
    Am I missing something?
    Thanks,
    Mehabub

  • Webservices with APEX and base64binary

    Hi,
    I'm trying to integrate stellent content management with APEX 3.2. for this I need to create and consume webservices. Stellent has some basic WSDL's that I can use to integrate. One of them is called checkin service and under checkin service we have a sub service called checkinuniversal that I am using to check in content into the content server. the issue that I am facing is that I dont know how to pass base64binary data to the webservice as the filecontent in that WSDL has a format of base64binary. I can manually create the webservice request and post the data to the webservice but that will not be the optimal way. So long story short is there any way to post base64binary data to a WSDL based webservice in APEX?
    Regards,
    Anand

    Anand:
    No, you cannot yet post binary base64 encoded data with a Web service reference based on a WSDL. You will have to use PL/SQL. I have written a blog post on how to do exactly what you are trying to accomplish. See:
    http://jastraub.blogspot.com/2008/06/flexible-web-service-api.html
    Regards,
    Jason

  • Custom wcf service that uses SharePoint Object Model.

    Hi All,
    I am writing a custom service on SharePoint. I have noticed most of the people do deploy the custom wcf service in layout folder in 12/14/15 hive. I am wondering is it mandatory? Can’t we deploy the custom wcf service that uses SharePoint Object Model as
    virtual directory on a specific port?
    Regards Restless Spirit

    It is suggested to use WCF in 12/14/15 hive folder due to security and eas in use. Check below
    http://www.dotnetcurry.com/showarticle.aspx?ID=760
    http://msdn.microsoft.com/en-us/library/office/ff521584%28v=office.14%29.aspx
    http://stackoverflow.com/questions/16008593/where-should-custom-wcf-service-for-sharepoint-2010-resides
    If you want to use the server object model you have to host your WCF service on the same server as your SharePoint is installed on.
    If the WCF service has to be on a different server you can use the client object model or the SharePoint webservices to communicate to SharePoint.
    (link to a question about using server object model on different server
    http://nikpatel.net/2012/02/29/step-by-step-building-custom-wcf-services-hosted-in-sharepoint-part-i/

  • Cannot send email using SharePoint designer 2013 workflow

    I am having a problem which I see many others have also posted about.  However, I don't find that any of their solutions fixes my problem.
    Using SharePoint 2013 on Windows 2008 R2 server.  SQL 2008 R2 on separate server.  Created a pretty simple workflow that calls for an email to be sent.  Created an Infopath form that is published to a SharePoint list.  One of the
    list fields is called "Approver" and is a people lookup field.  The workflow assigns an approver based on certain criteria in the list, and then sends an email to the assigned approver.
    During the testing phase of creating the workflow, I had the email sent to me specifically and I received the emails with no problems.  When I change the email recipient to Current Item:Approver (who is also me), I don't receive the email.  I have
    tried selecting Display Name, Email Address, and Login Name, but none work.  I also tried to send the email to the current item:creator (which was me) by selecting "User who created current item" from the select users dialog.  This also
    doesn't work.  The workflow is shown in a suspended state in the Workflow status screen.
    For informational purposes, I also included the Approver Display Name, the Approver Email Address and the Approver Login Name in the body of the email so that I could see what those fields actually returned as data.  The display name, and email address
    are correct, but the login name returned i:0#.w|domain\login (domain and login were my actual domain and login name).
    I have tried several of the fixes I found online to resolve this, but none have worked. Any help is appreciated.

    I don't see that it is possible to add CurrentItem:Creator to a list view.  The CurrentItem:CreatedBy returns my name as it should.  However, this does not help with my problem.  I don't want the email to come to me.  I want it to go
    to the CurrentItem:Approver.  This is a specific person who is assigned by the workflow based on various fields in the current item.  The approver is assigned, then an email is sent to the assigned person.
    There is a SharePoint group set up for Approvers.  This is used to assign permissions to the site where this list is created.
    Basically, I can't send an email to any recipient where I am using the current item lookup fields to populate the To: field.  I can only send email if I specifically select a person by name.

  • Why to use SharePoint Server over SharePoint Foundation within Team Foundation Server?

    What are the  advantages to use SharePoint Server 2013 over SharePoint Foundation 2013 within Team Foundation Server? I can't find any features comparison: in other words, what features are I'll be missing in TFS without SharePoint.

    Look this links
    Compare SharePoint
    Foundation 2013 vs. Server 2013
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/7539e14e-a2a4-4f79-b3d4-e41b7abfda66/sharepoint-server-vs-sharepoint-foundation?forum=sharepointgeneralprevious

  • Help! Windows Explorer crashes regularly when using "SharePoint" directory synced with OneDrive for Business

    We are using SharePoint 2013 and I want to sync document libraries with
    OneDrive for Business with my PC running Windows 7.
    In general, it works, but my Windows Explorer crashes very often (after a few minutes) when I navigate in the synced directories and open files there (or copy files into them in Windows Explorer).
    How can I find out what happens and how to avoid it?
    remark:
    We are still using Office 2007, so I installed only OneDrive for Business from the Office 2013 DVD and
    deactivated all other components like Office 2013 by hand:
    (so for example, the shared office feature or MS Info Path etc. were not installed)
    Is there a crash log, where I can find more information about the crash?
    Does OneDrive maybe need other components to be installed and can I install them without damaging my existing Office 2007 setup?

    Did  you check your Event Viewer for any errors during the time when Windows Explorer crashed?
    Thanks for this hint!
    The Log file says the following, so it seems to be WIDCOMM\Bluetooth Software\btncopy.dll
    to be responsible for the crashing Windows Explorer
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-06-27T15:06:31.000000000Z" />
        <EventRecordID>50873</EventRecordID>
        <Channel>Application</Channel>
        <Computer>COMPUTERNAME</Computer>
        <Security />
      </System>
      <EventData>
        <Data>explorer.exe</Data>
        <Data>6.1.7601.17567</Data>
        <Data>4d672ee4</Data>
        <Data>btncopy.dll</Data>
        <Data>6.3.0.9000</Data>
        <Data>4f85fbda</Data>
        <Data>40000015</Data>
        <Data>000000000002e25e</Data>
        <Data>18bc</Data>
        <Data>01cf9215ab79ee98</Data>
        <Data>C:\Windows\explorer.exe</Data>
        <Data>C:\Program Files\WIDCOMM\Bluetooth Software\btncopy.dll</Data>
        <Data>9e5a534a-fe0c-11e3-90e5-fee5c7d69b69</Data>
      </EventData>
    </Event>

Maybe you are looking for