locked
Access web resource via SOAP endpoint? RRS feed

  • Question

  • Hi everyone

    I am trying to write .NET code to download a XSL stylesheet which I have previously uploaded as a solution web resource. I will be working on an "outside" application and must target both OnPremise/OnLine, so using the REST endpoint is not an option.

    Thank you!

     


    Daniel
    Friday, March 11, 2011 1:24 PM

Answers

  • Just to head off any possible confusion.

    The topic at the link you posted is actually for the "SOAP Endpoint for Web Resources" feature.

    This also has the restriction of only being available from inside the application. I'll re-name the topic to be more specific.

    The better topic is http://msdn.microsoft.com/en-us/library/gg509052.aspx

    The trick will be to be able to authenticate as a CRM user with your code running in sharepoint.


    Jim Daly Technical Writer Microsoft Dynamics CRM
    Monday, March 14, 2011 5:59 PM
    Answerer

All replies

  • I do not see any messages in the organization service dealing with web resources in the organization service messages or the meta data messages. 

    http://msdn.microsoft.com/en-us/library/gg309482.aspx

    http://msdn.microsoft.com/en-us/library/gg334698.aspx

    If it's a web resource, could it be targeted via URL in a browser window to download it?  You can make browser windows in apps.


    Jamie Miley
    Friday, March 11, 2011 2:11 PM
    Moderator
  • There arent any specific messages for webresources but there is a "webresource" entity.  So you can just retrieve the webresource record by name and then decode the "content" attribute (its base64 encoded).
    Erik Pool | Avanade XRM | http://erikpool.blogspot.com
    Friday, March 11, 2011 5:28 PM
  • Friday, March 11, 2011 6:11 PM
    Moderator
  • Or even easier --

    Remember the Web Resource is URL addressable.

    If you know the name of the web resource and you know (or can derive )your server URL - just download it using the URL.

    You don't need to retrieve it from the database. Imagine it is just a file on your server.

    I hope this helps.


    Jim Daly Technical Writer Microsoft Dynamics CRM
    Saturday, March 12, 2011 12:41 AM
    Answerer
  • I will mark that helpful.   It backs up one what I proposed.

    Thanks!


    Jamie Miley
    http://mileyja.blogspot.com
    LinkedIn Profile
    Saturday, March 12, 2011 3:18 AM
    Moderator
  • Thanks, this was my first try, but I think this is not an option when working from outside of web resource, as in the SDK is stated that 

     

    "Authentication is only possible within the application
    Use of the REST endpoint is limited to JScript libraries or SilverlightWeb resources."

    ..and I need to impersonate another user from an external application living in a Sharepoint WebPart.

     

    Thank you anyway!


    Daniel
    Monday, March 14, 2011 7:35 AM
  • You will probably have to use the CRM Soap Organization Service instead.

    http://msdn.microsoft.com/en-us/library/gg594434.aspx (a good walkthrough on calls)

     

    I have been working with this stuff a lot lately and am working on some helpers for this right now actually also.

     

     


    Jamie Miley
    http://mileyja.blogspot.com
    LinkedIn Profile
    Monday, March 14, 2011 5:44 PM
    Moderator
  • Just to head off any possible confusion.

    The topic at the link you posted is actually for the "SOAP Endpoint for Web Resources" feature.

    This also has the restriction of only being available from inside the application. I'll re-name the topic to be more specific.

    The better topic is http://msdn.microsoft.com/en-us/library/gg509052.aspx

    The trick will be to be able to authenticate as a CRM user with your code running in sharepoint.


    Jim Daly Technical Writer Microsoft Dynamics CRM
    Monday, March 14, 2011 5:59 PM
    Answerer