.NET Client calling Java webservices. Slow Performance

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lakshmi

    #1

    .NET Client calling Java webservices. Slow Performance

    Hi All,
    I am having performance issues with the .NET client calling the Java
    Webservice running on axis. Have detailed the problem below. Please
    help.

    I wrote a webservice in Java. Lets name this WebService1. (using
    Apache Axis 1.1)

    Scenario 1:
    -----------
    I have a VB.NET code exposed as COM. Lets call it VBNETCOM. I added a
    webreference to my Webservice1 from VBNETCOM (using Visual Studio.NET
    2003). So in my .NET code, all I have to do is instantiate the
    WebService1 object and start calling methods on it.
    Eg:
    Dim WebService1 ws as new WebService1
    ws.callMethod1( )
    ws.callMethod1( )
    ws.callMethod1( )

    Please note that the same method is being called 3 times. Now my
    problem is
    that each of the calls to the methods take about half a second.
    (500ms)
    which is unacceptable.

    Scenario 2:
    -----------
    So I did another test. This time the client calling the "WebService 1"
    is not
    VB.NET COM but a Java client itself.
    Eg:
    Call call = (Call) service.createC all();
    .... // other code

    returnvals= (Object[]) call.invoke( values); // method1
    call.removeAllP arameters();
    .... // other code

    returnvals= (Object[]) call.invoke( values); // method1
    call.removeAllP arameters();
    .... // other code

    returnvals= (Object[]) call.invoke( values); // method1

    In this case, the first call to method1, takes about 300ms, but
    subsequent
    calls take only 50 - 90 ms. Please note that in this case, I am
    reusing the
    call object, but when I am not, doesn't make any difference. Which
    leads to the conclusion, some kind of caching is connection is done.

    Question:
    ---------
    How to improve the performance of the webservice call from VB.NET so
    that it performance at the same level if not better than the Java
    client?
    Is this some change that needs to be done at axis settings? or at
    VB.NET? I tend to feel that there is some setting that I need to set
    in my .NET Client, so that it can cache some information, but don't
    know what it is, me being new to .NET platform as such.


    I also tried using a different client,written in C# but I get the same
    performance as in VB.NET.
  • Dino Chiesa [Microsoft]

    #2
    Re: .NET Client calling Java webservices. Slow Performance

    Can you factor out COM in this case?

    What happens if you have a C# client directly calling the AXIS service 3
    times in succession?
    I wasn't clear, after reading your description, whether you tried and
    measured this scenario. There is some overhead in traversing the
    ..NET-to-COM interop barrier, and I am wondering if you have eliminated it
    from your analysis. Can you also measure the converse: that is, a .NET
    object in C# or VB.NET, exposed as a COM, which does nothing. How long does
    it take to invoke that thing, three times in succession?


    If the AXIS webservice is simple, you can also invoke it directly from VB
    (or VBScript, Javascript, etc) by using the MSXML object family.

    like so:


    But you have to do more work this way.

    -Dino




    "Lakshmi" <lnarasimhamurt hy@labvantage.c om> wrote in message
    news:3ecfb1f7.0 407160656.1f7e8 e05@posting.goo gle.com...[color=blue]
    > Hi All,
    > I am having performance issues with the .NET client calling the Java
    > Webservice running on axis. Have detailed the problem below. Please
    > help.
    >
    > I wrote a webservice in Java. Lets name this WebService1. (using
    > Apache Axis 1.1)
    >
    > Scenario 1:
    > -----------
    > I have a VB.NET code exposed as COM. Lets call it VBNETCOM. I added a
    > webreference to my Webservice1 from VBNETCOM (using Visual Studio.NET
    > 2003). So in my .NET code, all I have to do is instantiate the
    > WebService1 object and start calling methods on it.
    > Eg:
    > Dim WebService1 ws as new WebService1
    > ws.callMethod1( )
    > ws.callMethod1( )
    > ws.callMethod1( )
    >
    > Please note that the same method is being called 3 times. Now my
    > problem is
    > that each of the calls to the methods take about half a second.
    > (500ms)
    > which is unacceptable.
    >
    > Scenario 2:
    > -----------
    > So I did another test. This time the client calling the "WebService 1"
    > is not
    > VB.NET COM but a Java client itself.
    > Eg:
    > Call call = (Call) service.createC all();
    > ... // other code
    >
    > returnvals= (Object[]) call.invoke( values); // method1
    > call.removeAllP arameters();
    > ... // other code
    >
    > returnvals= (Object[]) call.invoke( values); // method1
    > call.removeAllP arameters();
    > ... // other code
    >
    > returnvals= (Object[]) call.invoke( values); // method1
    >
    > In this case, the first call to method1, takes about 300ms, but
    > subsequent
    > calls take only 50 - 90 ms. Please note that in this case, I am
    > reusing the
    > call object, but when I am not, doesn't make any difference. Which
    > leads to the conclusion, some kind of caching is connection is done.
    >
    > Question:
    > ---------
    > How to improve the performance of the webservice call from VB.NET so
    > that it performance at the same level if not better than the Java
    > client?
    > Is this some change that needs to be done at axis settings? or at
    > VB.NET? I tend to feel that there is some setting that I need to set
    > in my .NET Client, so that it can cache some information, but don't
    > know what it is, me being new to .NET platform as such.
    >
    >
    > I also tried using a different client,written in C# but I get the same
    > performance as in VB.NET.[/color]


    Comment

    Working...