.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

performance issues with calling java webservices from WPF application?

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :WPF

I'm experiencing some major performance issues when calling a Java webservice from my WPF application. If I call the same webservice from a Java test application, I get a return in under 1 second. If I create a new .NET console application and make the same service call, I get a return in under 1 second as well:

class Program
 public Program()

 static void Main(string[] args)
  MyService svc = new MyService();
  for (int i = 0; i < 10; i++)
  Console.WriteLine("calling echo()");
  DateTime startTime = DateTime.Now;
  string result = svc.echo("Test " + i);
  DateTime endTime = DateTime.Now;
  TimeSpan ts = endTime.Subtract(startTime);
  Console.WriteLine("Execution Time = " + ts.TotalSeconds + " seconds, result=" + result);

However, when I try to call this same service from a WPF application, my response times range from 6-8 seconds. I tried moving the webservice calls to a BGW thread without any luck. I'm running the sample WPF application on the same machine as the sample .NET console application so it's not a network-related issue. Can someone explain why the execution times of calling the Java webservice below is so much slower when done from within a WPF application?

public partial class MainWindow : Window
 private MyServi

View Complete Post

More Related Resource Links

WCF MTOM Client calling Java Webservice - Issues with File attachment Content ID encoded in SOAP mes

Hello,I'm having difficulty calling a MTOM enabled Java based web service that accepts an file as input..NET appeats to be generating a SOAP message where the reference to the binary part of the message is an encoded url.For Example:  <inc:Include href="cid:http%3A%2F%2Ftempuri.org%2F1%2F634000265217257868" xmlns:inc="http://www.w3.org/2004/08/xop/include"/>In fact, the Content ID defined in the SOAP message, looks nothing like the actual Content ID of the actual message part.Content-ID: <http://tempuri.org/1/634000265217257868=2787915398744@soapui.org>The service is invoked and executed on the java webserver...but the data element appears to be null.I do not believe the java web server understands the reference in the SOAP message because it is encoded....Or...perhaps it's because the Content-ID attribute has extract stuff on it.I'm working with a custom MTOM encoder in WCF....is there a way to generate your own Content ID or tell .NET not to encode the url?My frustration with .NET has reached an all new level with this project...Any help would be greatly appreciated.Here the SOAP message that is being generated:<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200901" xmlns:ns1="http://docs.oasis-open.org/ns/cmis/core/200901&q

High-Performance .NET Application Development & Architecture

It has always been a goal of project architects to plan an effective strategy from the ground up in regards to an new application. All relevant factors are taken into consideration with respect to the application, from its design and layout to a functional website infrastructure. Pre-.NET strategies and design guidelines still effective now were developed with Microsoft's DNA (Distributed interNet Application) platform. This model successfully served the purpose of architecting N(any number of)-Tier (levels) applications. In its basic sense, as in most robust, distributed applications, you'll architect 3 main layers or Tiers: presentation, business rules and data access.

Improving Application Performance in .Net

Application performance has always been a concern for Web Application developers. This article contains guidelines and tips for maximizing application performance in ASP.NET.

Performance Tuning on DirectShow Camera Application

Windows CE 6.0 supports DirectShow® components to develop a rich camera application. A minimum requirement of the camera application is to show preview, capturing the still images which is stored as a compressed file (JPG) format, capturing/multiplexing the video with or without audio i.e. stored as a compressed file (WMV) format.

Windows CE 6.0 provides sample applications for showing preview, capturing still and video using DirectShow® components. However these sample applications doesn't cover all the aspects to develop a commercial application. A commercial camera application at least satisfies the following performance criteria.

Performance: Find Application Bottlenecks with Visual Studio Profiler


We will introduce you to the Visual Studio Profiler by walking through a sample performance investigation, pinpointing code inefficiencies in some sample applications.

Hari Pulapaka and Boris Vidolov

MSDN Magazine March 2008

CLR Inside Out: Improving Application Startup Performance


Application startup performance matters to users, and there's plenty you can do to improve it. Here's a look at where to begin.

Claudio Caldato

MSDN Magazine March 2008

SQL Server: Uncover Hidden Data to Optimize Application Performance


SQL Server 2005 gathers a lot of useful data that you can use to identify areas where database performance can be improved. Here's what you need to improve performance.

Ian Stirk

MSDN Magazine January 2008

Stress Testing: Custom LoadGenerator Tool Identifies the Issues Your Application Faces Under Stress


It's easy to postpone stress testing when developing an application, and it's easy to forgo it altogether. Having an easy-to-use framework at your fingertips to conduct these tests can make the task far less painful. This article walks you through an application that eases the task of generating load for a variety of layers within an application.

Brian Otto

MSDN Magazine April 2004

.NET CLR Profiling Services: Track Your Managed Components to Boost Application Performance


The Microsoft .NET platform provides you with a rich set of services for building profilers and application monitors for applications targeting the Common Language Runtime (CLR). These services expose runtime events that occur during the execution of a .NET application. They can be used to obtain information about managed code being executed under the runtime. This article describes the .NET CLR Profiling Services and shows how to use the services to build a simple profiler that will provide hot spot information for any .NET application. The sample profiler can easily be modified to suit other profiling and monitoring needs.

Anastasios Kasiolas

MSDN Magazine November 2001

Tip #107 Did you know . How to improve debugging performance for MVC2 application in Visual Studio 2

VS2010 Ultimate included IntelliTrace functionality by default.  IntelliTrace captures events (e.g. exceptions), and can affect performance of debugging. The typical performance hit is about 5% in the default mode (collection can be increased to...(read more)

Troubleshooting IIS 7 network performance issues and TCP Chimney Offload, Receive Side Scaling, and

There is a lot of posts on http://forums.iis.net related to network performance.  Actually, there was two today!.  The problems can be different, but the common thread seems to be network performance.  Windows Server 2008 (and R2) enabled a new network feature by default which has been referred to as "Scalable Networking Pak".  Some people refer to the feature as TCP Chimney Offload.  Either way, in my experience this feature causes more issues than it solves.  If you are having a network related issue or performance, this is a easy setting to check and verify if disabling portions or all of them can resolve the issue.   KB article on TCP Chimney Offloadhttp://technet.microsoft.com/en-us/network/dd277645.aspx KB Article how to show your settings and disablehttp://support.microsoft.com/kb/951037 I strongly encourage test these changes in a non-production environment before making changes to your production systems! Enjoy, Steve SchofieldMicrosoft MVP - IIS

SSRS 2008 R2 Add-in Performance Issues

I have a very interesting issue with a customer.  They use lots of images in their reports.  The report performance is very poor after deploying the report to Sharepoint Integrated Mode and executing the report from Sharepoint Report Viewer.   The single server is setup with SQL Server 2008 R2.  Sharepoint and Reporting Services are running all on the same server.    The goal is to be able to use the Report Viewer Web Part and Sharepoint Filters to create Dashboards.   We have tried the following ways to get satisfactory performance out of these reports:  ·         When we run the reports in a page viewer web part in Sharepoint against a native SQL 2008 Report Manager on another server, they execute great ·         When we run the reports in a page viewer web part in Sharepoint against the Sharepoint Integrated Report server on same server, they execute way more quickly then when using the Report Viewer against the same Sharepoint Integrated Report server . ·         When we remove the images from the reports  and execute the reports via report viewer or in the Integrated library they execute satisfactorily in both Report Manager and Sharepoint Integrated - but th

JAVA calling SQL Server Procedure

Reply Contact I have a JAVA developer asking me this question.  I am not sure how to answer him.  I am not sure I understand his question.  He is using JAVA to call my procedure. "Is there some conclusive signal returned by the the SP result that would letus know whether it succeeded or failed? I'm currently looking for the word "exception" in the error message, but that hardly seems conclusive to me." lcerni

Performance issues

I'm creating a data warehouse for our product and I am having some issues with system performance when posting data to the database. My test application is written in C#, not that I think that is the problem. I am executing stored procedures to perform the updates. The problem is that I am trying to get around three million updates to perform in a day. Part of my problem is that the SQL server starts to eat memory like no other, forcing the OS to page to the point that my whole system becomes unstable. To simplify client side coding, I have the stored procedure check to see if there is a maching, by key, record and if so, perform an update and if not perform an insert. Would it be better to have the client side attempt the insert first with an SQL insert statement then switch to the update if the key violation occurs?   A sample procedure is as follows: CREATE PROCEDURE [dbo].[sp_UpdateAgents]( @AppName AS VARCHAR(20), @AgentID AS VARCHAR(16), @FirstName AS VARCHAR(30) = null, @LastName AS VARCHAR(30) = null, @PhoneNumber AS VARCHAR(10) = null, @Extension AS VARCHAR(10) = null, @Station AS VARCHAR(10) = null, @PrimaryTeam AS VARCHAR(16) = null ) AS BEGIN DECLARE @rval AS INT; DECLARE @a AS VARCHAR(20); DECLARE C CURSOR FOR SELECT AppName FROM Agents WHERE AppName = @AppName AND AgentID = @AgentID; OPEN C; FETCH NEXT FROM C INTO @a; SET @rval = @@FETCH_

Create a new target application - Secure Store Service administration issues

Hi,I am trying to create new target application, when I go to Secure Store Service in Centra admin I have:Cannot complete this action as the Secure Store Shared Service is not responding. Please contact your administrator.I have used this few days ago and avarything else is working fine on the server, and I have applications created with it running fine.Any help is appreciated.cheersValko

problem with calling soap service written (most probably in java)

Hi evebody, I'm experiencing problem calling third-party service written in java (mostprobably). When i call service i get following response: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header></env:Header> <env:Body> <env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <faultcode>env:Server</faultcode> <faultstring>Content root name does not match element name: {http://foo.bar/}arg0 != arg0</faultstring> </env:Fault> </env:Body> </env:Envelope> I've used command line java utility provided by service provider and found following difference: soap request, generated by wcf (similar results with webservices)   <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <baz xmlns="http://foo.bar/"> <arg0 xmlns="">string value</arg0> <arg1 xmlns="">string value</arg1> <arg2 xmlns="">string value</arg2> </baz> </s:Body> </s:Envelope> request, generated by java utility: <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:baz xmlns:ns2="http://foo.bar/"> <arg0>string value</arg0> <arg
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