+1-888-365-2779
Try Now
More in this section

Web services

7 posts, 0 answered
  1. Rick
    Rick avatar
    32 posts
    Registered:
    13 Dec 2006
    23 Nov 2012
    Link to this post
    I am trying to consume a web service within a sitefinity installation.

    This seems much harder than it needs to be.

    I added the reference to the service no problem, named the service reference the same as I did in a project outside of sitefinity.

    It puts all the files for the reference in the Service_References folder however in a custom control trying to declare the using bondDataReference (the name of the reference) It has no idea what this is.

    I have searched and searched and have gotten nothing on this.
  2. Patrick Dunn
    Patrick Dunn avatar
    237 posts
    Registered:
    03 Nov 2014
    27 Nov 2012
    Link to this post
    Hi Rick,

     Do you want to post some of your example code so I can take a look? Also have a peek at the documentation here about RESTful WCF services in SF and this blog post which also outlines getting started with web services in SF. The latter comes with some example code. For the sake of all options being covered here is a forum post that discusses consuming web services in Sitefinity.

    I hope this helps and I look forward to hearing back from you!

    Regards,
    Patrick Dunn
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Rick
    Rick avatar
    32 posts
    Registered:
    13 Dec 2006
    27 Nov 2012
    Link to this post
    The service reference is called bondData

    using it outside of sitefinity I would simply do the following in the codebehind of the user control

    using bondData;
     
     
    private void GetBondPrice()
        {
            // store the string returns of the service into a local instance of bondData
            bondData thisData = new bondData();
            string[] newData = thisData.getBondData(1, "", "", "");
            // Now worth with the string array
           double price = double.Parse(newData[1]);
            double closePrice = double.Parse(newData[9]);
    etc........
     
    }

  4. Patrick Dunn
    Patrick Dunn avatar
    237 posts
    Registered:
    03 Nov 2014
    30 Nov 2012
    Link to this post
    Hi Rick,

     Was the set of documentation I sent you not of any help? It does discuss how to consume web services in Sitefinity. Please make sure you're setting up your services as they do in this blog post. Additionally check out this post which discusses using claims based authentication (what Sitefinity uses) in calling your web services.

    Kind regards,
    Patrick Dunn
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Brian
    Brian avatar
    1 posts
    Registered:
    23 Aug 2013
    11 Feb 2015 in reply to Patrick Dunn
    Link to this post
    I am trying to add a service reference to my project and after configuring the settings for which service I would like to add Visual Studio hangs for about 30+ minutes before adding the
    service reference. After the service has been added I then  inspected the
    service reference in the object browser and I notice every time that there is
    no namespace available to the service reference it just says SitefinityWebApp
    as its namespace. I am confused why this is happening, is there something going
    on with Sitefinity were the namespaces are routed thus losing the namespace for
    the service reference?

     

    How do I properly add a service
    reference to Sitefinity? I have done this in the past with local services or
    services belonging to a different project with in the same solution. And I
    would like to add I am not new to adding services either.

  6. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    16 Feb 2015
    Link to this post
    Hello all,

    @Brian,

    The proper way to add a service in Sitefinity is described here. Please go through the instructions and match them depending on your scenario.

    Regards,
    Ivan D. Dimitrov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  7. Ilan
    Ilan avatar
    12 posts
    Registered:
    26 Oct 2015
    02 Feb
    Link to this post

    Ivan,

     

    I have followed the link you have referenced. My results are different.

    1. No files were added to the app_code folder (in fact my whole project doesn't contain one)

    2.  This is what i have inside my svc file

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.ServiceModel;
    using System.Text;

    namespace SitefinityWebApp.Sitefinity.Services
    {
        // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "PaWebSerives" in code, svc and config file together.
        // NOTE: In order to launch WCF Test Client for testing this service, please select PaWebSerives.svc or PaWebSerives.svc.cs at the Solution Explorer and start debugging.
        public class PaWebSerives : IPaWebSerives
        {
            public void DoWork()
            {
            }
        }
    }

    Further what do i need to do from here?

     

7 posts, 0 answered