.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

How to use external web service interface ?

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
Hi, I am new to web services. And am developing a web service wrapper to receive SOAP message over HTTP using 3rd party services. I have been provided 2 asmx files which I added as web reference. Now the 3rd party service contains ProcessRequest (XmlRequest As String) As String interface. I also have a test link from the 3rd party site, which is an aspx page which displays all the method names which can be used. How do I use the service interface and how do I access the service methods on the test link?Any help will be appreciated.ThanksSleek

View Complete Post

More Related Resource Links

Sharing Service Interface between client and server through common assembly

This thread indicates that there is a known bug concerning reuse of service contract interfaces with WCF. Has this bug been solved? I would like to avoid using the workaround since it would mean rewriting a whole lot of client code. In my specific scenario, I have a rather complex setting with 3 solutions: A server, a client and a third application. I want to reuse some of the logic from my server and the controls from my client in my third application, but I don't want to have to setup a server simply for the amount of logic I reuse. My idea was to instanciate the class that imlpements the service contract in the application, and link up the controls with the instance of the service that runs in the same application. This isn't working because the controls expect a reference to the service contract interface proxy and not the actual service contract interface. Even using the /r switch (which I assume is the "reuse types in referenced assemblies" checkbox in VS), the service proxy is created and the controls won't compile because of type mismatch.  What am I doing wrong? Thank you for your time. 

app interface talking to service

Hi guys   what I am trying to implement is I have a server running as windows service, the server will launch as soon as the machine turn on, and I have application interface, when I start this app, I hope it can connect the service and talk to it, like get or set some info to control service, I know how to bulid a service and application, but how to implement the communication between them? how to get service instance from application, and when I close app, it does not bother service anything, just lose the app interface, service is still running in back   Thanks   btw: all those projects are built on .net framwork with c#

Creating CLR stored procedure with external web service url


I am consuming web service in CLR stored procedure. For this i used VS 2005 web reference method to get the proxy object. It works fine.

I want to place web service url (ex: http://mywebserver/myservice?wsdl) ) in an external file like app.config etc. And fetch the url while execution of clr stored procedure.Here I want to isolated the web url from clr code.

Is there any possibility to refer the web service url from config file which is outside of clr dll?

Please let me know if any one have any idea how it can be done.

Thanks in advance.

getting web service interface from inside web service


We have a process that loads multiple dll assemblies each of which contains multiple service interfaces hosted by one or more actual services.  Some of our components need to be able to call other services internally.  Of course I do not want the overhead of marshalling / opening a channel / etc.

Since services can be singletons or created each time, I am trying to find a way to get the service or interface through the wcf architecture that handles this.

Does anyone know of a way?

Best method for authentication with an external WCF service called from a Silverlight 4 Web Part ins

If we have a Silverlight 4 application which gets its data from an external WCF service and is deployed as a Web Part on in SharePoint 2010 what is the best method to perform authentication in the WCF service itself.  The service is not on the same domain as the SharePoint server but any user authenticated by the SharePoint server (and only those users) should be able to access the service.  Since the Silverlight application is calling the service the WCF service itself must be configured to use BasicHttpBinding which, of course, severely limits possible authentication methods.

Create an exchange interface to call a Windows Service with WCF


I'm develpong an application that consists on a Client that communicates with a Windows Service via WCF.
I have three projects defined: MyClient, MyService, MyExchangeClasses

The first two are easy to understand, client and server. The MyExchangeClasses project contains the interface for MyService remote function calls and contains the implementation of those classes that are passed via parameter o are returned by the remote functions that implement the interface I've already mentioned.

For example I have one remote funciton defined in the interface like this:

public interface IService1
   IEnumerable<MyObject> GetAllMyObjects();

And MyObject is defined like this:

public class MyObject    
    public String Name { get; set; }

So in order to make it work MyExchangeClasses needs to be referenced in both MyClient and MyService classes.

External Content Types + Search Service: Cannot crawl my external content type



I created an external content type by creating a new Visual Studio sharepoint project, and creating a content type (The default Entity1 content type). I created a profile page for it and everything, and when I drilled into the content type in central admin - BCS, I saw it wasn't marked as crawlable.

I saw this similar post: http://social.msdn.microsoft.com/forums/en-us/sharepoint2010general/thread/281BCEFD-59EC-41CC-B948-458A4BDA9E49

So I then created an external content type through SPD, leveraging the same code, and creating an external list and profile page. This time, when I drilled into the external content type in the BCS administration, it showed "Crawlable: Yes".

I figured at that point I was good to go, but when I went to my search service application -> Content Sources -> New Content Source and selected Line of Business Data, and selected BDC, it still says "No external data sources to choose from."

I verified also that the account for crawling has permissions for the external content type.

Are there any other things I should be looking for? From everything I read this should "just work" now :)



consuming external web service in custom list over https


I have a custom list that pulls data in from an external third party webservice.  It works fine on our development server but won't update on our production SharePoint server.  I get no errors through the UI, it looks likes it's working, but no data comes through.  I don't know where to start on troubleshooting this.  The production server uses https.  We are on MOSS 2007.  Thanks for any suggestions.

 Edit  -- after doing some research I wonder if this is a trust issue about "accept Server Certificates on a normal WebService proxy method call." 

How would I confirm that this is the issue?




There are no mistakes; every result tells you something of value about what your are trying to accomplish.

Is it possible to convert WSDL file back to Service Contract Interface for hosting? (WCF)


Hi there,

I would like to convert WSDL file to Service Contract Interface for hosting purposes. I know there is an option  to create proxy classes for clients using SVCUtil.exe or WSDL.exe. But this is not i would like to do.

I have a situation where, one of our clients have already hosted webservice. And I need to host a similar webservice. so to do it I must hand craft whole service contract Interface from the scratch. So without writing from the start can I use the existing WSDL to create the service contract Interface and the implementation class automatically with some tool?



Same interface for service ann data access layer?


Should my service class implement the same interface as my DAL-class? Let's say I have an interface and two classes like this;

public interface IArticles
string[] GetArticles();

public class DAL : IArticles
public string []GetArticles(){...}

public class Service : IArticles
private IArticles _dal;
public Service()
_dal = new DAL();
public string[] GetArticles()
return _dal.GetArticles();


In this case, the Service uses BOTH inheritance and composition of the interface. What is the best solution?

How to use Generic Handler to call external web service


Hi ,

       I am tring to call external web service through generic handler , please post some example code for the call webservice from generic handler .



Adding IServiceClient interface to generated proxy service client class

would it be possible to add a service client interface to a generated service client class in a generated service proxy in order to achieve easier testability?
Here's an example of what I am asking the way I do it manually http://blog.vuscode.com/malovicn/archive/2009/11/01/design-for-testability-wcf-proxies.aspx

This would not break backward compatibility (safe to be added)

Is this question more for Connect? :)


How to call external web service from jquery


I have a web service hosted on different server. I want to access it from my jquery. but I don't know how to do it.

I know how to call a native web service from JQuery, but I am struggling to call the external web service.

Can you please suggest me what I have to do ?


Thank you in advance.




can anyone tell me how to pass external parameters to web service


I am constructing an asp web service. The webservice will get parameter from sharepoint timer job. 

The webservice returns value("World")  to sharepoint, but the webservice can't get parameters from sharepoint( string hello). 

Can anyone tell me how to pass an external parameter to webservice



public string helloWorld(string hello )


 string a = hello+ "world"; 

 return  a;



Sharepoint timerjob Execute method

public override void Execute(Guid contentDBID)


localhost.Service ws = new localhost.Service();

string hi = ws.HelloWorld(aWorld);

 SPList Listjob = contentDb.Sites[0].RootWeb.Lists["aTestList"];

// create a new list Item, set the Title to the current day/time, and update the item

SPListItem newList = Listjob.Items.Add();

newList["Title"] = hi;


When I use interface as Contract in Web.config, I cannot call the service


I tried to use interface to define services but the JavaScript function will fail.  Without the interface, everything works perfectly.  Consider the following.

Consider the following.


namespace Enroll.ER.Services {
 [ServiceContract(Namespace = "Enroll.WebServices")] 
 interface IAccountService {
 bool Checkin(string acctKey);

namespace Enroll.ER.Services {
 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
 public class AccountService : Enroll.ER.Services.IAccountService {
 public bool Checkin(string acctKey); {

 public class MyFaultException {
 public string Reason { get; set; }

Windows Service Applications Tutorials

You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend