Answered by:
Access web resource via SOAP endpoint?

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!
DanielFriday, 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- Marked as answer by Daniel Sabater - Spenta Tuesday, March 29, 2011 6:43 AM
Monday, March 14, 2011 5:59 PMAnswerer
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- Proposed as answer by Jamie MileyModerator Saturday, March 12, 2011 3:18 AM
Friday, March 11, 2011 2:11 PMModerator -
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- Proposed as answer by Jamie MileyModerator Friday, March 11, 2011 6:11 PM
Friday, March 11, 2011 5:28 PM -
Friday, March 11, 2011 6:11 PMModerator
-
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 CRMSaturday, March 12, 2011 12:41 AMAnswerer -
I will mark that helpful. It backs up one what I proposed.
Thanks!
Jamie Miley
http://mileyja.blogspot.com
LinkedIn ProfileSaturday, March 12, 2011 3:18 AMModerator -
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!
DanielMonday, 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 ProfileMonday, March 14, 2011 5:44 PMModerator -
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- Marked as answer by Daniel Sabater - Spenta Tuesday, March 29, 2011 6:43 AM
Monday, March 14, 2011 5:59 PMAnswerer