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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Calling Web Services

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :ASP.Net

Dear Friends,

I m new to web services.I want to create and call the web service on click of button which wold give me city id and cityname.Then I want to bind it to the Dropdownlist1 

How shold i to it




View Complete Post

More Related Resource Links

Calling WCF Services From Silverlight Keeping The Code Inline in VB.NET

Hello,   I have a large amount of code that I'm trying to convert to a Silverlight 4 Application from a VB.NET Win Forms App.  All of the business logic code is written inline calling stored procedures on a database.  There is so much code that it's overhelming to be making asynchronous call after asynchronous call back to the WCF service.  The code is now all over the place since I'm having to chain methods all around after the WCF calls complete.    I don't really need these WCF calls to be done synchronously (since we don't want to block the main UI thread), but is there any good way in VB.NET to keep all the code in-line when calling a WCF service?  Is there some sort of wrapper that can be used to call the WCF methods or another way?  I know some of this is done easier in C#, but I'm having some issues with this being done in VB.NET.   Example In The VB.NET App I'm Converting:   Dim Customer As New Customer   If Customer.CheckIfCustomerExists(10) = True    'Calls the database, checks if Customer #10 exists        'Do Something   Else       Dim CustomerNum As Integer = Customer.InsertNewCustomer("Customer Name")       'Do Something    End If In Silverlight This Woul

Error calling sharepoint web services from .net 3.5 WCF client...

Code Snippet                 using (OCUserProfileService.UserProfileServiceSoapClient service =                     new TestAndDestroy.OCUserProfileService.UserProfileServiceSoapClient(GetWcfBinding())) {                     service.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation;                                     PropertyData[] properties = service.GetUserProfileByName("domain\\user.name");                     foreach (PropertyData p in properties) {                        Console.WriteLine(p.Name);                        Console.WriteLine(p.Values);                    }       produces....The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://microsoft.com/webservices/SharePointPortalServer/UserProfileService:GetUserProfileByNameResponse. The InnerException message was 'Error in line 1 position 392. 'Element' 'IsPrivacyChanged' from namespace 'http://microsoft.com/webservices/SharePointPortalServer/UserProfileService' is not expected. Expecting element 'Name | Privacy'.'.  Please see InnerException for more details.   I'm totally stumped, any ideas???

SSIS custom task calling web services response errors.

Hi             I have some code within a .Net 3.5 library which call a web service.  The web proxy class was created using WSDL command line tool.  Also the library is wrapped within .Net console, for testing the library works, and SQL Server Integration Services custom task, which is intended to use so that it will be part of the ETL process.    If I run the SSIS custom task and console application on a Windows XP everything works as expected.    However I am currently facing a problem where the response from the web service is not being interpreted correctly when running within the SSIS custom task on windows server 2008 R2, whereas the response from the web service is correctly understood when running the library within console application on the same server.    Has anyone come across this problem before or know any issues with SSIS and .Net libraries which call web services?

Calling multiple WCF services


I have multiple services in my application. WebService1, WebService2,WebService3 and so on..

All the services have same methods, but they are hosted on different IPs.

Now when a client calls a methodA(1) then

WebService1Client.Method() should be called;

client calls a methodA(2) then WebService2Client.Method() should be called.

I do not want to do a switch case for each and every function on the client.

I would rather prefer to create some class/methods which would return the appropriate proxyClient.

How can I create a class to return the object and further how to use that object.

Please point me to some sample codes or references.


Calling Reporting Services from SSIS




I have created a packages which pull and push the data to SAP server.

I want to create a report every day and send that report to the manager.

For the same i want to call reporting services in my SSIS package.

I know i can write a SQL script and export the report in excel but i want to use Reporting services.

Have any one call reporting services from ssis.




Calling Informatica web services from .Net application


While calling the web services provided by Informatica, i am facing the error.

At the time of Initialize the server connection i could observe the error as "This represents an internal error at the Informatica PowerCenter Web Services Hub.".

find the below code snippet


Dim a As Test1.DIServerDetails = New Test1.DIServerDetails()


Dim b As Test1.DIServerDate = New Test1.DISe

Calling ResumeBookmark from WCF Workflow Services

I am using WCF Workflow Services too host the workflow runtime. I invoke the workflow through xamlx service reference created in my web project. I am creating bookmarks at certain locations in the workflow. Is there a way I can call "ResumeBookmark" from my web project? I see that the only way to call is through a regular workflow application (not a service).

Any help would be appreciated.

Windows service calling web services asynchronously.


I have followed the code example from http://msdn.microsoft.com/en-us/magazine/cc163821.aspx#S4 to create a windows service that runs web services at scheduled intervals and have hit some scaleability challenges.

Background and disclaimer.

This is my first attempt at a windows service running scheduled web services, for the most part it has been working fine for months until introducing log running tasks.

OS: Windows Server 2003

.NET Framework 3.5

IIS Version 6

Several of the web services I am calling via the windows service task scheduler are long running, 20-30 minutes in duration, and have caused me to fight through a myriad of timeout issues

Calling Asynchronous Web Services


How do I call an asynchronous Web Service, from AJAX, that has been defined according to this article:

How to: Create Asynchronous Web Service Methods 

The AJAX Web Service proxy-generator creates Begin<MethodName> and End<MethodName>... methods instead of just <MethodName>.

Best Regards,
Michael Carr


Rollback transaction for calling web services


Dear all,


I have the web form whcih processing several web services calls.

If one call failed, it will rollback transactions. But it cannot.

Due to the web services will complete for each call.

I am using sql connection and sql command.

Is it possible to do this??? 

calling and hosting WCF services from windows service


I have 2 windows services. Both hosting their own WCF service and it works fine.

Now one windows service (let call it the second) does need some information from the first windows service.
So I make the second dependend on the first.
This all works fine untill the second windows service starts (it started the first automatically because of dependency).
I make a call to a wcf method (even before ServiceBase.Run) from inside the second windows service towards the first. This will timeout.

I have tackled this problem by making the wcf call after ServiceBase.Run (in the OnStart method) so it looks like the program is not possible to make a wcf call before it is hosted itself (am I right?).

However when I reboot the computer the second service fails to start (startup type is automatically and the first service is started first).
The dependend service fails to start, after that, when I start it manually it will succeed

How do I make this communication work

Calling Public Web Services from a Sandboxed Silverlight Application (Visual How To)

Learn how to create sandboxed Microsoft Silverlight solutions that can call public web services in SharePoint 2010.

Sample: Calling Public Web Services from a Sandboxed Silverlight Application (Visual How To)

Explore the code as you learn to create sandboxed Silverlight solutions that can call public web services in SharePoint 2010.

Video: Calling Public Web Services from a Sandboxed Silverlight Application (Visual How To)

Watch a short video as you learn to create sandboxed Silverlight solutions that can call public web services in SharePoint 2010.

Web Services - Returning a Cookie from the web service im calling after authentication



I am trying to call an authentication method on a web service that returns a cookie, however when i call the web service, I just get the SOAP object returned, how do i get the cookie back after I have been authenticated ?

Any help or pointers appriciated

Kindest regards


Installing and Uninstalling Services

Installing and Uninstalling Services.Unlike most projects you create in Visual Studio .NET, Windows Service projects cannot be run directly from the development environment by pressing F5. This is because the service in the project must be installed before the project can run.

You can quickly install your service application by using a command line utility called InstallUtil.exe.

Getting Started with Windows SharePoint Services

Of all of the capabilities of SharePoint, I thought I would start with the most basic installation - as a corporate intranet. It is likely that we will need to discuss some of the elements of SharePoint as we go along, so this also gives us the opportunity to review these elements for future reference.

Before going into too much detail, I would like to point out that you can try the core SharePoint framework (known as Windows SharePoint Services or WSS) for free. On Microsoft's Web site you can download a trial version of Virtual PC 2004 (VPC). Using VPC, you can install the Windows 2003 Evaluation Kit and the WSS add-on. This combination will give you 45 days to evaluate the setup.
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