Impersonating user with Soap calls

I want to create (and delete) calendar items in Outlook 2007 (and Exchange 2007).
I do this with soap calls in SOAP UI 5.0.0.
<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/"
xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<typ:RequestServerVersion Version="Exchange2010_SP2"/>
<typ:ExchangeImpersonation>
<typ:ConnectingSID>
<!--<typ:PrincipalName>[email protected]</typ:PrincipalName>-->
<typ:SmtpAddress>[email protected]</typ:SmtpAddress>
</typ:ConnectingSID>
</typ:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
SendMeetingInvitations="SendToAllAndSaveCopy" >
<SavedItemFolderId>
<t:DistinguishedFolderId Id="calendar"/>
</SavedItemFolderId>
<Items>
<t:CalendarItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Subject>Planning Meeting - 1234</Subject>
<Body BodyType="Text">1234 - Plan the agenda for next week's meeting.</Body>
<ReminderIsSet>true</ReminderIsSet>
<ReminderMinutesBeforeStart>60</ReminderMinutesBeforeStart>
<Start>2014-07-22T14:00:00</Start>
<End>2014-07-23T15:00:00</End>
<IsAllDayEvent>false</IsAllDayEvent>
<LegacyFreeBusyStatus>Busy</LegacyFreeBusyStatus>
<Location>Conference Room 721</Location>
</t:CalendarItem>
</Items>
</CreateItem>
</soap:Body>
</soap:Envelope>
I created an event in my own calendar (without the typ:ExchangeImpersonation part).
So now I want to create an event in an other user's calendar.
I have an admin account, who got al rights to do this. 
But when I configure my endpoint and Authorization (NTLM) to the admins credentials, I get this as response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorImpersonateUserDenied</faultcode>
<faultstring xml:lang="nl-BE">The account does not have permission to impersonate the requested user.</faultstring>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorImpersonateUserDenied</e:ResponseCode>
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The account does not have permission to impersonate the requested user.</e:Message>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Admin got all the rigths to do this (normally).
So how can I create an event in another users calendar, with SOAP calls?
Is this with the use of typ:ExchangeImpersonation ?
TY

Fixed
For anyone who wants to know:
<SavedItemFolderId>
<t:DistinguishedFolderId Id="calendar">
<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</SavedItemFolderId>
And login with admin credentials.
see
http://blogs.msdn.com/b/mstehle/archive/2009/06/16/exchange-api-team-blog-exchange-impersonation-vs-delegate-access.aspx

Similar Messages

  • External SOAP-Call ends with general error "PART UNKNOWN (NULL)"

    Hi,
    we generated a consumer proxy using the following WSDL file:
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt" xmlns:intf="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="https://soap.global-esign.com/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <!--WSDL created by Apache Axis version: 1.3
    Built on Oct 05, 2005 (05:23:37 EDT)-->
       <wsdl:message name="CreatePdfSignatureRequest">
          <wsdl:part name="in0" type="xsd:string"/>
          <wsdl:part name="in1" type="xsd:string"/>
          <wsdl:part name="in2" type="xsd:base64Binary"/>
          <wsdl:part name="in3" type="xsd:string"/>
          <wsdl:part name="in4" type="xsd:boolean"/>
          <wsdl:part name="in5" type="xsd:string"/>
          <wsdl:part name="in6" type="xsd:string"/>
       </wsdl:message>
       <wsdl:message name="CreatePdfSignatureResponse">
          <wsdl:part name="CreatePdfSignatureReturn" type="xsd:base64Binary"/>
       </wsdl:message>
       <wsdl:portType name="GlobalEsignSoapExt">
          <wsdl:operation name="CreatePdfSignature" parameterOrder="in0 in1 in2 in3 in4 in5 in6">
             <wsdl:input message="impl:CreatePdfSignatureRequest" name="CreatePdfSignatureRequest"/>
             <wsdl:output message="impl:CreatePdfSignatureResponse" name="CreatePdfSignatureResponse"/>
          </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="GlobalEsignSoapExtSoapBinding" type="impl:GlobalEsignSoapExt">
          <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
          <wsdl:operation name="CreatePdfSignature">
             <wsdlsoap:operation soapAction=""/>
             <wsdl:input name="CreatePdfSignatureRequest">
                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://GlobalEsign.tsi.de" use="encoded"/>
             </wsdl:input>
             <wsdl:output name="CreatePdfSignatureResponse">
                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt" use="encoded"/>
             </wsdl:output>
          </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="GlobalEsignSoapExtService">
          <wsdl:port binding="impl:GlobalEsignSoapExtSoapBinding" name="GlobalEsignSoapExt">
             <wsdlsoap:address location="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt"/>
          </wsdl:port>
       </wsdl:service>
    </wsdl:definitions>
    The coding of the test program is:
    *& Report  Z_SOAP_PDF_SIGNATUR
    REPORT  z_soap_pdf_signatur.
    *------ Type pools
    type-pools: sai.
    *------ Class definitions and references
    DATA: lo_zpdf_sign    TYPE REF TO zpdfco_global_esign_soap_ext,
          lo_system_fault TYPE REF TO cx_ai_system_fault,
          lo_appl_fault   type ref to cx_ai_application_fault.
    *------ data
    DATA: output TYPE zpdfcreate_pdf_signature_respo,
          input TYPE  zpdfcreate_pdf_signature.
    DATA: wa_controller TYPE prxctrl.
    DATA:  pdfout(255) TYPE c  VALUE
    'C:/TEMP/pp-20080229-93ES-40010-0013439840-1690000005.pdf',
           pdfsign(255) TYPE c  VALUE
    'C:/TEMP/pp-20080229-93ES-40010-0013439840-1690000005-sign.pdf',
            wa_objcont TYPE soli,
            objcont LIKE soli  OCCURS 0.
    DATA: xlines TYPE string,
          buffer TYPE  xstring,
          x_msg  TYPE c LENGTH 100.
    TRY.
        CREATE OBJECT lo_zpdf_sign
          EXPORTING
            logical_port_name = 't_systems'.
      CATCH cx_ai_system_fault .
    ENDTRY.
    * read unsigned pdf
    OPEN DATASET pdfout FOR INPUT MESSAGE x_msg
                        IN BINARY MODE.
    TRY.
        READ DATASET pdfout INTO xlines.
      CATCH cx_sy_file_open_mode.
        EXIT.
    ENDTRY.
    CLOSE DATASET pdfout.
    * convert string
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
      EXPORTING
        text           = xlines
    *   MIMETYPE       = ' '
    *    encoding       = 'UTF-8'
    IMPORTING
        buffer         = buffer
      EXCEPTIONS
        failed         = 1
        OTHERS         = 2  .
    TRY.
        input-in0 = 'user'.
        input-in1 = 'password'.
        input-in2 =  buffer.
        input-in3 = 'affilinet'.
        CALL METHOD lo_zpdf_sign->create_pdf_signature
          EXPORTING
            input  = input
          IMPORTING
            output = output.
      CATCH cx_ai_system_fault INTO lo_system_fault.
        DATA: lv_message TYPE string.
        DATA: lv_message_long TYPE string.
        CALL METHOD lo_system_fault->if_message~get_text
          RECEIVING
            result = lv_message.
        CALL METHOD lo_system_fault->if_message~get_longtext
          RECEIVING
            result = lv_message_long.
        WRITE lv_message.
        WRITE lv_message_long.
      CATCH cx_ai_application_fault into lo_appl_fault.
        DATA: lv_messaap TYPE string.
        DATA: lv_messaap_long TYPE string.
        CALL METHOD lo_appl_fault->if_message~get_text
          RECEIVING
            result = lv_messaap.
        CALL METHOD lo_appl_fault->if_message~get_longtext
          RECEIVING
            result = lv_messaap_long.
        WRITE lv_messaap.
        WRITE lv_messaap_long.
    ENDTRY.
    LOOP AT output-controller INTO wa_controller.
      WRITE:/ wa_controller-field.
      WRITE:/ wa_controller-value.
    ENDLOOP.
    * store signed pdf
    OPEN DATASET pdfsign FOR output MESSAGE x_msg
                        IN BINARY MODE.
    transfer output-CREATE_PDF_SIGNATURE_RETURN
             to pdfsign.
    Processing the soap call in the test programm ends in a system exception (cx_ai_system_fault)  with the message:
    "General Error Es ist ein Fehler bei der Proxy-Verarbeitung aufgetreten (  PART UNKNOWN (NULL)    )"
    It seems as if there is no response or a response in a wrong format given by the webservice.
    We had a look at the ICF-Trace.
    The request seems to be a proper soap-call.
    But the response is not in XML-format and therefore could not be completely displayed.
    it says:
    Ungültig auf der obersten Ebene im Dokument. Fehler beim Bearbeiten der Ressource 'file:///C:/Dokumente und Einstellungen/S...
    HTTP/1.1 200 OK
    ^
    Could anybody help ?
    Kind regards
    Heinz

    Hello Mathias,
    in our case the problem was, that the WDSL used parameters, which were not correcty interpreted by the SAP-Routine that creates the proxy.
    We changed the WDSL using only paramters covert by SAP.
    Here ist the WSDL that worked fine:
    <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions targetNamespace="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt" xmlns:tsi="http://GlobalEsign.tsi.de">
    - <wsdl:documentation>
    <sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl" />
    </wsdl:documentation>
    - <wsdl:types>
    - <xsd:schema elementFormDefault="qualified" targetNamespace="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt" xmlns="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt">
    - <xsd:complexType name="CreatePdfSignature">
    - <xsd:sequence>
    <xsd:element name="in0" type="xsd:string" />
    <xsd:element name="in1" type="xsd:string" />
    <xsd:element name="in2" type="xsd:base64Binary" />
    <xsd:element name="in3" type="xsd:string" />
    <xsd:element name="in4" type="xsd:boolean" />
    <xsd:element name="in5" type="xsd:string" />
    <xsd:element name="in6" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    - <xsd:schema targetNamespace="http://GlobalEsign.tsi.de" xmlns="http://GlobalEsign.tsi.de">
    <xsd:import namespace="https://soap.global-esign.com/axis/services/GlobalEsignSoapExt" />
    <xsd:element name="CreatePdfSignature" type="tns:CreatePdfSignature" />
    - <xsd:element name="CreatePdfSignatureResponse">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="CreatePdfSignatureReturn" type="xsd:base64Binary" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </wsdl:types>
    - <wsdl:message name="CreatePdfSignature">
    <wsdl:part name="CreatePdfSignature" element="tsi:CreatePdfSignature" />
    </wsdl:message>
    - <wsdl:message name="CreatePdfSignatureResponse">
    <wsdl:part name="CreatePdfSignatureResponse" element="tsi:CreatePdfSignatureResponse" />
    </wsdl:message>
    - <wsdl:portType name="GlobalEsignSoapExt">
    - <wsdl:operation name="CreatePdfSignature">
    <wsdl:input message="tns:CreatePdfSignature" />
    <wsdl:output message="tns:CreatePdfSignatureResponse" />
    </wsdl:operation>
    </wsdl:portType>
    </wsdl:definitions>
    <wsdl:part name="in1" type="xsd:string"/>   was changed to <xsd:element name="in0" type="xsd:string" /> .
    Please let me know, whether you succeeded.
    Kind regards
    Heinz Schäfe

  • SSL: Connection reset by peer ; Failed to enable crypto error while calling the report using bing API with SOAP client

    Hi,
    I am trying to fetch report using bing API and making a SOAP call for fetching the data. I get the following error:
    [Warning] fopen(): SSL: Connection reset by peer [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    02-04-2015 10:17:41 (BST) : [Warning] fopen(): Failed to enable crypto [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    02-04-2015 10:17:41 (BST) : [Warning] fopen(https://download.api.bingads.microsoft.com/ReportDownload/Download.aspx?q=rzr63XFt5qJduddohoIRyOYAP%2f1%2ftsnhk8L%2bzBmUpdU2CQlcUB98RpY%2bbOaLFFGMqAC4IUUadC%2fNdNnJqeVCY%2f%2bpy6noVsVA%2fMJp47a3Xb1VjABfKhcdKy6vqpgEdcQg%2fQZ7QcEpZ3bEloJjUtGpDquFk53BnkeHEPVWZkDYcsQegRz%2fpG4t4w6gKCCRmhArd6osr6ZU9CMJ3lbxtGXjcQEMPvP2apNyr9P%2fc8niyfWA2aBcm1aEmOLX2KL3aRJ4rz9N7gG7uBslVZH%2b4rUjHdB7CMkbb%2fHyHwvPTqGPbPCHnicefr%2b%2fDP70hlkBEGfyOOswK67%2bl1zh7CyIv%2bcMlaDsuDX1HeFf4uORfD41H1z7):
    failed to open stream: operation failed [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    Whenever I execute my script. Can you please let me know what we can do to solve this issue. The version of PHP we are using is 5.3.3 with open ssl. 

    Hi Shobha,
    I can't confirm what version of PHP you are using, but to err on the side of caution please use the version specified in the sample/SDK:
    PHP 5.4.14 has been installed from PHP.
    Here is our code examples:
    https://msdn.microsoft.com/en-US/library/bing-ads-overview-getting-started-php-with-web-services.aspx
    Thanks,
    Itai

  • SOAP call with attachment from ABAP

    Dear ABAP guru's
    We have a requirement to trigger a SOAP call from the ABAP stack. We have used the instructions from SAP as specified in the SAP help as specified in this link:
    http://help.sap.com/saphelp_47x200/helpdata/en/2d/64d029e74911d6b2e400508b6b8a93/frameset.htm
    This works fine. However, we would like to send an attachment with the call and don't see a method available for this. Is there anybody who knows how to achieve this?
    Thanks a lot in advance,
    Rudy Claassen

    Dear ABAP guru's
    We have a requirement to trigger a SOAP call from the ABAP stack. We have used the instructions from SAP as specified in the SAP help as specified in this link:
    http://help.sap.com/saphelp_47x200/helpdata/en/2d/64d029e74911d6b2e400508b6b8a93/frameset.htm
    This works fine. However, we would like to send an attachment with the call and don't see a method available for this. Is there anybody who knows how to achieve this?
    Thanks a lot in advance,
    Rudy Claassen

  • Error in SOAP call with certificate

    Hello experts!
    I am developing an interface RFC --> SOAP
    This SOAP call is for an external system and my basis team set up a certificate into visual adm in order to be able to communicate with my external partner.
    I set up this certificate into my communication channel (key store entry).
    When this interface is executed I get the following error:
    com.sap.aii.af.ra.ms.api.DeliveryException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: No service was found matching the request
    Does anyone know what is happening?
    Best regards,
    Diego.

    Hi guys,
    We have built another scenario to connect to a public web service (without certificates) and it connects properly. In other words the XI machine has access to the internet. Both scenarios are being authenticated in the company proxy. That's why it may not be a firewall issue.
    I've imported the wsdl file into the SoapUI (software to test web services) and I am getting the same error. But when I am trying to execute this test from outside of my company I getting a different error, as follows:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
       <soap:Body>
          <soap:Fault>
             <faultcode>soap:Client</faultcode>
             <faultstring>Validation Error</faultstring>
             <faultactor>internal-firewall</faultactor>
             <detail xmlns:det="http://reactivity.com/">
                <det:detailmessage>The message was found to be invalid.</det:detailmessage>
             </detail>
          </soap:Fault>
       </soap:Body>
    </soap:Envelope>
    I believe this can be an error of data itself. I am trying to check it with the external partner.
    What do all of you think about it?
    Best Regards,
    Diego.

  • Record center - submit file soap call throwing The request failed with http status 401: Unauthorized" exception

    Hi, I am trying to implement custom hold order / send to in sharepoint 2010 to send files in to holds / record center.
    I am at the last step where I am trying submit the metadata using soap call- submit file
    [SoapDocumentMethod("http://schemas.microsoft.com/sharepoint/soap/recordsrepository/SubmitFile", RequestNamespace = "http://schemas.microsoft.com/sharepoint/soap/recordsrepository/", ResponseNamespace = "http://schemas.microsoft.com/sharepoint/soap/recordsrepository/", Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
    public string SubmitFile([XmlElement(DataType = "base64Binary")] byte[] fileToSubmit, [XmlArrayItem(IsNullable = false)] Microsoft.SharePoint.RecordsRepositoryProperty[] properties, string recordRouting, string sourceUrl, string userName)
    return (string)base.Invoke("SubmitFile", new object[] { fileToSubmit, properties, recordRouting, sourceUrl, userName })[0];
    I am getting an error "The request failed with http status 401: Unauthorized".
    Actual file was transferred successfully but while transferring the properties (metadata) I am getting this exception.
    ganesh

    Hi ganesh,
    Please try to disable the loop back check, compare the result:
    In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    Right-click Lsa, point to New, and then click DWORD Value.
    Type DisableLoopbackCheck, and then press ENTER.
    Right-click DisableLoopbackCheck, and then click Modify.
    In the Value data box, type 1, and then click OK.
    Quit Registry Editor, and then restart your computer.
    In addition, please check if these links are useful:
    http://www.sharepointpills.com/2011/10/send-sharepoint-2010-document-to.html
    http://www.codeproject.com/Articles/497729/UploadingplusDocumentsplusProgramaticallyplustoplu
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Can a user with Contribute privileges invoke SPFolder.SubFolders.Add(folder) Sharepoint 2010 API in a Webservice?

    We have a Webservice deployed on a Sharepoint 2010 deployment with a method as follows:
    public static string ensureParentFolder(SPWeb parentSite, string destinationUrl)
    destinationUrl = parentSite.GetFile(destinationUrl).Url;
    int index = destinationUrl.LastIndexOf("/");
    string parentFolderUrl = string.Empty;
    if (index > -1)
    parentFolderUrl = destinationUrl.Substring(0, index);
    SPFolder parentFolder
    = parentSite.GetFolder(parentFolderUrl);
    if (!parentFolder.Exists)
    SPFolder currentFolder = parentSite.RootFolder;
    foreach (string folder in parentFolderUrl.Split('/'))
    try
    currentFolder = currentFolder.SubFolders.Add(folder);
    catch (Exception ex)
    FINEOSLogger.Medium(LoggerCategory.FINEOSToSharePointDMS, "User could not create SP folder so elevating permissions");
    SPSecurity.RunWithElevatedPrivileges(delegate()
    currentFolder = currentFolder.SubFolders.Add(folder);
    return parentFolderUrl;
    When invoked by a User with only Contribute rights the SubFolders.Add( ) call appears to fail and the
    SPSecurity.RunWithElevatedPrivileges
    code is invoked, which also fails.
    1. So the first question is should you be able to invoke SubFolders.Add() with only Contribute?  It works with Design privileges for the Customer.  You can add folders on the Sharepoint website as a Contribute user so why not on the API. 
    Customer raising this as a security concern.
    2. Also why would the
    SPSecurity.RunWithElevatedPrivileges
    part fail, is the syntax incorrect for Sharepoint 2010?  We migrated this code from Sharepoint 2007 project.
    The error I get when I try run the code as a Contribute user is
    com.fineos.ta.dms.external.DMSException: The exception [A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".] was caused by the exception [A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".]., Ta Exception info,Exception Class=class com.fineos.ta.dms.external.DMSException,Root cause ID=10,Root cause host=IEL163,Localized message=A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18"
    at com.fineos.integration.dms.internal.thirdparty.GenericDMS.add(GenericDMS.java:149)
    at com.fineos.frontoffice.documentmanager.DocumentManager.saveToThirdPartyDMS(DocumentManager.java:280)
    at com.fineos.frontoffice.documentmanager.fileupload.UploadDocumentWidget.save(UploadDocumentWidget.java:401)
    at org.apache.jsp.sharedpages.documentmanager.fileupload.uploaddocumentpage_jsp._jspService(uploaddocumentpage_jsp.java:77)
    Caused by: com.fineos.integration.dms.external.services.SharePointDmsException: A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".
    at com.fineos.integration.dms.external.services.GenericDMSClient.uploadDocument(GenericDMSClient.java:139)
    at com.fineos.integration.dms.internal.thirdparty.GenericDMS.add(GenericDMS.java:132)
    ... 88 more
    Caused by: org.apache.axis2.AxisFault: Error_occured_sharepoint [Message Details = An Exception occurred in SharePoint; System.UnauthorizedAccessException: <nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied.
    at Microsoft.SharePoint.Library.SPRequest.AddOrDeleteUrl(String bstrUrl, String bstrDirName, Boolean bAdd, UInt32 dwDeleteOp, Int32 iUserId, Guid& pgDeleteTransactionId)
    at Microsoft.SharePoint.SPFolderCollection.AddInternal(String strUrl, Int32 userId)
    at FINEOSIntegration.FINEOSToSharePointDMS.SharePointDMSUtilities.<>c__DisplayClass9.<ensureParentFolder>b__5()
    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
    at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
    at FINEOSIntegration.FINEOSToSharePointDMS.SharePointDMSUtilities.ensureParentFolder(SPWeb parentSite, String destinationUrl)
    at FINEOSIntegration.FINEOSToSharePointDMS.FINEOSToSharePointDMS.uploadDocument(String UserName, String FolderPath, String Filename, Byte[] File, DocumentProperties DocumentProperties, Boolean NotifyFINEOS, Boolean NotifyFINEOSSpecified, Boolean OverwriteIfExists, Boolean OverwriteIfExistsSpecified, String& DMSDocType)]
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    at com.fineos.frontoffice.thirdpartydms.operationtypes.ThirdPartyDmsServicesStub.uploadDocument(ThirdPartyDmsServicesStub.java:761)
    at com.fineos.integration.dms.external.services.GenericDMSClient.uploadDocument(GenericDMSClient.java:119)
    ... 89 more
    Note that the user SPWeb being passed into the method is from an impersonated user, don't know if that matters.
    So the webservice payload contains the id of the user who wants to do the Sharepoint work while the webservice is invoked by anonymous or some other service user.  We then impersonate the user specified in the webservice payload like follows and use
    that web SPWeb from then on in the webservice methods:
    userToImpersonate = currentWeb.AllUsers[user];
    site = new SPSite(fileUrl, userToImpersonate.UserToken);
    web = site.OpenWeb();
    Any help appreciated.
    Thanks,
    Ruairi.

    Ideally, a user with Contribute permissions should be able to add folders. Not sure what is the issue there. But I can see that SPSecurity.RunWithElevatedPrivileges is not written properly. You must create a new SPSite object inside the delegate
    because SPSite objects created outside do not have Full Control even when referenced inside the delegate. Use the using keyword to ensure that the object is disposed in the delegate. Example:
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(web.Site.ID))
    // implementation details omitted
    });See this for more information about SPSecurity.RunWithElevatedPrivilegeshttps://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges%28v=office.12%29.aspx?f=255&MSPPError=-2147217396
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Consume web service in ABAP proxy with SOAP header

    Hi Thomas ,
    I am trying to consume web service in  ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
    I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
    Please see below code and please give some direction to fix the issue.
    1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
    2.Create Logical port
    3.Create following program to call proxy
    REPORT  zproxy.
    DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
          ws_header TYPE REF TO if_wsprotocol_ws_header,
          name TYPE string,
          namespace TYPE string.
    TRY.
        CREATE OBJECT ref_stock
      get WS_HEADER protocol
        ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
      set somehow header as iXML-DOM tree
        DATA: ixml TYPE REF TO if_ixml,
              xml_document TYPE REF TO if_ixml_document,
              xml_root TYPE REF TO if_ixml_element,
              xml_element TYPE REF TO if_ixml_element,
              xml_node TYPE REF TO if_ixml_node.
        DATA l_xstring        TYPE xstring.
        DATA l_string         TYPE string.
        FIELD-SYMBOLS <fs_xstring> TYPE xstring.
      Additional Header:
        CONCATENATE
    '<soap:Header>'
    '<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
    '<s1:RegisteredUser>'
    '<s1:UserID>[email protected]</s1:UserID>'
    '<s1:Password>aaaaaaaa</s1:Password>'
    '</s1:RegisteredUser></s1:LicenseInfo>'
    '</soap:Header>' INTO l_string.
      convert to xstring
        l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
        IF NOT l_string IS INITIAL.
        create iXML DOM document from XML xstring
          CALL FUNCTION 'SDIXML_XML_TO_DOM'
            EXPORTING
              xml           = l_xstring
            IMPORTING
              document      = xml_document
            EXCEPTIONS
              invalid_input = 1
              OTHERS        = 2.
          IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
            xml_root = xml_document->get_root_element( ).
            xml_element ?= xml_root->get_first_child( ).
          add header element by element to SOAP header
            WHILE NOT xml_element IS INITIAL.
              name = xml_element->get_name( ).
              namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
              IF NOT xml_element IS INITIAL.
              ENDIF.
              ws_header->set_request_header(
                          name = name
                          namespace = namespace
                          dom = xml_element ).
              xml_element ?= xml_element->get_next( ).
            ENDWHILE.
          ENDIF.
        ENDIF.
      CATCH cx_ai_system_fault .
    ENDTRY.
    *Call soap body using abap proxy class.
    DATA: get_quotes TYPE zzget_quotes_soap_out .
    DATA: get_quotes1 TYPE zzget_quotes_soap_in .
    get_quotes1-quote_ticker = 'GE'.
    TRY.
        CALL METHOD ref_stock->get_stock_quotes
          EXPORTING
            get_quotes1 = get_quotes1
          IMPORTING
            get_quotes  = get_quotes.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    4.It is throwing cx_ai_system_fault error.
    SOAP details:
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
    <soap:Header>
    <s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
    <s1:RegisteredUser>
    <s1:UserID>[email protected]</s1:UserID>
    <s1:Password>aaaaaaaa</s1:Password>
    </s1:RegisteredUser>
    </s1:LicenseInfo>
    </soap:Header>
    <soap:Body>
    <tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
    <tns:QuoteTicker>GE</tns:QuoteTicker>
    </tns:GetQuotes>
    </soap:Body>
    </soap:Envelope>
    Thanks,
    Kavitha.

    Hi ,
    Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
    <a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
    Thanks,
    Kavitha.

  • Problems with Soap Adapter

    Hi!
    I need to implement the following scenario:
    In SAP an user exit calls an RFC which uses a TCP/IP Connection (SM59) to the XI and sends data over this connection to it. The XI connects via a SOAP adapter my server program and sends the data in a soap stream to this server.
    This works sometimes ok and sometimes not.
    The status for those messages in the XI is "scheduled for outbound processing" with a little black arrow pointing to the right.
    The error message in the Runtime Workbench for such a job is:
    SOAP: request message entering the adapter
    SOAP: call failed
    SOAP: sending a delivery error ack ...
    SOAP: sent a delivery error ack
    How can I find out what the problem is?
    Thanks,
    Konrad

    Hi,
    When a message is scheduled for outbound processing, it is normally sent automatically.
    does it always sit at this status or does it change after a while ?
    If it is an issue with the connectivity from the Integration Server to the Adapter Framework you would get a different error message.
    If it is an issue with connectivity from the SOAP adapter to your target, you would also get a different error - it is likely to be shown as an outright failure. Plus the error shown in the message is likely to be
    "com.sap.aii.af.ra.ms.api.DeliveryException: java.net.ConnectException: Connection refused"
    Hope this helps.
    i think you need to get Basis involved to see why messages are not getting sent from the rfc queues automatically all the time.
    Cheers
    Colin.

  • Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK

    Hi PI gurus,
      Need some suggestions on one issue below -
      Scenario - proxy (SAP) to SOAP (Web based system)
      In the RWB Communication Channel Monitirong we are receiving the below error
      " Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK"
    the request from XI system is going to target system and printing the lables (as per the functionality) with no issues but the comminication channel is giving the above error and this is causing the repeated sending the same request to target sytem and the data is printing repeateadly. This issues is occuring in Quality environment.
    Strangley the same Interface with the same connectivity details is working fine in Development environment. But not working in Quality environment. Checked the firewalls settings on both in XI and Target system side and confirmed that everything is fine.
    Below are the Logs both from Quality and developement are as follows
    Quality ( Failure Case) 
    17.03.2011 07:19:59 Success SOAP: request message entering the adapter with user J2EE_GUEST
    17.03.2011 07:25:03 Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK
    Development     (Success ful)
    17.03.2011 07:27:55 Success SOAP: request message entering the adapter with user J2EE_GUEST
    17.03.2011 07:27:58 Success SOAP: completed the processing
    When we checked with basis team on user id J2EE_GUEST,  they confirmed that they are same in Development and Quality.
    I repeat,, that the same target url and everthing is same in XI Configuration
    Thanks in Advance. Points would be rewared for the best solution.
    Thanks,
    Jitender

    HI Jitender,
          If your scenariois working in DEV and if it is not working in QAS.Could you please check if both the systems are at same patch levels..
    Please refer below notes :1551161,817894,952402.
    Cheers!!!
    Naveen.

  • How to make SOAP call from jsp

    how can i make a SOAP call from JSP.
    I'm new to this.
    This is my requirement
    After the user logs in i need to make a soap call to a given url.
    i need to fill two values in the xml. i have the value with me.

    Although you could do it, why would you put this kind of logic into a presentation file like JSP? It depends on the API you want to use:
    Try this one:
    https://jax-ws.dev.java.net/
    MeTitus

  • Create XML file from ABAP with SOAP Details

    Hi,
    I am new to XML and I am not familiar with JAVA or Web Service. I have searched in SDN and googled for a sample program for creating XML document from ABAP with SOAP details. Unfortunately I couldn't find anything.
    I have a requirement for creating an XML file from ABAP with SOAP details. I have the data in the internal table. There is a Schema which the client provided and the file generated from SAP should be validating against that Schema. Schema contains SOAP details like Envelope, Header & Body.
    My question is can I generate the XML file using CALL TRANSFORMATION in SAP with the SOAP details?
    I have tried to create Transformation (Transaction XSLT_TOOL) in SAP with below code. Also in CALL transformation I am not able to change the encoding to UTF-8. It's always show UTF-16.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
          <SOAP:Header>
            <CUNS:HeaderInfo>
              <CUNS:InterfaceTypeId>10006</InterfaceTypeId>
              <CUNS:BusinessPartnerID>11223344</BusinessPartnerID>
              <CUNS:SchemaVersion>1.0</SchemaVersion>
              <CUNS:DateTime>sy-datum</DateTime>
            </CUNS:HeaderInfo>
          </SOAP:Header>
          <SOAP:Body>
            <xsl:copy-of select="*"/>
          </SOAP:Body>
        </SOAP:Envelope>
      </xsl:template>
    </xsl:transform>
    In ABAP program, I have written below code for calling above Transformation.
      call transformation ('Z_ID')
           source tab = im_t_output[]
           result xml xml_out.
      call function 'SCMS_STRING_TO_FTEXT'
        exporting
          text      = xml_out
        tables
          ftext_tab = ex_t_xml_data.
    Please help me how to generate XML file with SOAP details from ABAP. If anybody have a sample program, please share with me.
    Is there any easy way to create the XML file in CALL Transformation. Please help.
    Thanks

    Try ABAP forum, as it seems not to be PI related.

  • Site Login Behavior For SharePoint Foundation 2013 Users With Expired Passwords?

    What are the most user-friendly ways of getting external users with expired AD passwords back into the SharePoint site with a new working password?
    We already send automated email notifications to users reminding them to change their soon-to-expire passwords.  However, sometimes they miss seeing the email notifications before the password expires (such as after returning from vacation or just carelessness
    and lack of attention to email messages) or they see the warning messages and forget to act on it.
    When this happens and they try to log into the SharePoint site from the Internet, their login fails without telling the user the reason they can't log in is because their password expired.  So, they end up confused and call the help desk to get their
    password reset.
    Is there a way to set up SharePoint Foundation 2013 login in a similar way to the OWA login so that, when a user with a correct but expired password tries to log in, it gives them a prompt to set a new password right there rather than just an error indicating
    their login failed for unknown reasons or password is "incorrect?"

    It could be done. You get a different event log entry for an expired login attempt than for a wrong password, 4625 events denote a login failure and an error ID of 23 denotes a logon failure.
    A naff, but simple, approach would be to create a tool that checks your server logon event log for 4625 entries and then emails that user, or the help desk, or security, that they're trying to get onto your system with expired credentials.
    For a more polished experience you've got a lot more work and bluntly it's going to be impractical for you. You'd have to re-write sections of the SharePoint authentication process or intercept the process, both are risky and not a good idea to try.
    There's a really interesting paper here that might be of interest, it won't help you in your current situation but it might shed more light on the overall authentication/authorisation process.
    http://www.sans.org/reading-room/whitepapers/forensics/windows-logon-forensics-34132

  • Call fwd to a user, who then call fwds to Voicemail

    I have a customer with a scenario where the original user call forwards to another user. This user then has a call forward no answer to voicemail. 
    If the first recieves a call, then the call is unanswered on the second user and then endsup in voicemail, who's voicemail box should the call land in?
    I am discovering that the call lands in the second users voicemail. 
    Is there any way to change this? Or is there any other way to configure it to call the fisrt user, ring on the sencond user, then land in the first users mailbox?
    Alot of legacy phone systems had the ability to change the destination mailbox depending on first hop scenario.

    Hi,
    This is expected behaviour.
    The only way to change this would be to have the 2nd user forward the call back to the 1st user, or forward to a SIP URI that's tied to a shared mailbox that is accessed by both users... or something similar along those lines. This setting can be set by
    the end user themselves or centrally via the Sefautil.exe tooling, but is probably not feasible or practical.
    It makes sense, if user A is away for 4 weeks and forwards to user B. Then user B is off for a day and misses a call that came in for user A, and a message was left.... then user B can grab that rather than user A in 4 weeks time.
    Unfortunately in Lync there is no 'destination mailbox', only voicemail, which is inherently the mailbox of the concerned user.
    Kind regards
    Ben
    Note: If you find a post informative, please mark it so using the arrow to the left. If it answers a question you've asked, please mark the thread as answered to aid others when they're looking for solutions to similar problems or queries

  • Can I use SOAP calls to remotely access functions on a SOAP server?

    Hi,
    I've used JavaScript and SOAP with "regular Acrobat" (e.g. Acroforms) to connect to a SOAP server, followed by Acrobat automatically setting up functions that I can call from JavaScript that, courtesy of SOAP, are relayed to the SOAP server for execution.  For example, a SOAP server that implements a Temperature function.  After doing the Net.SOAP.connect, my JavaScript magically has access to the Temperature() function, which is then executed remotely on the SOAP server courtesy of SOAP protocol.
    My question is: With Livecycle Designer and it's XFA-based forms, do I have the same ability to programmatically connect to a SOAP server and automatically have JavaScript functions set up that I can call on the server?  From what I've read, there are LC Submit and Execute operations which interact (e.g. exchange data) with a specified SOAP server, but it isn't clear that LC provides the ability to end up with a set of functions that I can call from my JavaScript that are then executed on the SOAP server.
    Stated more simply: Does LiveCycle Designer have the ability to connect to a SOAP server and automatically set up JavaScript functions that I can call (that then get relayed to the SOAP server for execution, followed by the return of data to my XFA-based program)?
    Thanks.
    Dave

    Hi Varma_LC and pguerett,
    First, thank you both for your quick responses!  It sounds like I shouldn't have any trouble using XFA forms and SOAP together.
    Let me ask a related question (not about LiveCycle & SOAP, but just about SOAP).  I'm trying to return two values from one SOAP call.  http://www.avoka.com/blog/?p=998&cpage=1#comment-1692 describes how to do this.  Unfortunately, it's not working for me.
    I'm able to retrieve single values from my SOAP server just fine.  When I try to return two values, the Acrobat JavaScript debugger says both values are "UNDEFINED".  The key part of my code is:
       var IntValue =   // define an int
         soapType: "xsd:int",
         soapValue: "1"
       var NValue =
           n1: IntValue  // n1 is the parameter my SOAP server expects
       var GetTheData = service.GetAllData(NValue);  // Go get the data and populate the GetTheData object
       console.println("GetTheData = " + GetTheData.CmdError + GetTheData.CmdResults);
       Param_1V.value = GetTheData.CmdError;     // This is a text box to display the returned value
       Param_2V.value = GetTheData.CmdResults; // This is also a text box to display the returned value
    Both the console.println & the two text boxes (beginning with Param) print out the same results, namely "UNDEFINED".
    I ran my SOAP client and SOAP server on two different computers, and then used WireShark to look at the SOAP protocol.  The SOAP protocol looks fine, and contains CmdError and CmdResults XML opening/closing tags around the actual data I'm trying to read from the SOAP server. Plus there are GetAllDataResponse and GetAllDataResult XML opening/closing tags around the data XML tags.
    I'm using Acrobat 9 and I developed my SOAP server using Windows Communication Foundation (WCF) 3.5.  The same JavaScript program that is unable to retrieve two values returns one value just fine (a different service... call, of course).  In other words, it's being done in one program, not two separate programs.  So, my singular Net.SOAP.connect call seems to be working fine.
    When I do the Net.SOAP.connect, I display the returned services, and GetAllData is listed, so Acrobat JavaScript knows about this particular service.
    BTW, the WCF built-in client works fine in retrieving/displaying the two returned values, correctly detecting and displaying both returned values.  Of course, the WCF client may have different "rules" than Acrobat has in terms of processing SOAP messages.  I've seen differences before between the WCF client and Acrobat.
    Any insights either of you have or anyone else has would be *greatly* appreciated. I've never used try/catch to trap JavaScript errors, if there is some type of error I should logically be looking for, I would be interested in information on that as well.
    Thanks!
    Dave

Maybe you are looking for