WebServices and .NET

Discussion in 'Java' started by Lord0, May 9, 2007.

  1. Lord0

    Lord0 Guest

    Hi there,

    Im currently exposing functionality of an existing application as a
    Web Service - Im using Axis 1.x for this. I have read that the only
    style of Web Service supported by .NET is "wrapped" as opposed to,
    say, "document".

    Anybody got any experience/thoughts on this?

    Cheers

    Lord0
     
    Lord0, May 9, 2007
    #1
    1. Advertising

  2. Lord0

    Lew Guest

    Lord0 wrote:
    > Hi there,
    >
    > Im currently exposing functionality of an existing application as a
    > Web Service - Im using Axis 1.x for this. I have read that the only
    > style of Web Service supported by .NET is "wrapped" as opposed to,
    > say, "document".
    >
    > Anybody got any experience/thoughts on this?


    It's the other way around. .Net prefers "document literal" and has specific
    conventions on how you name the WSDL elements.

    --
    Lew
     
    Lew, May 9, 2007
    #2
    1. Advertising

  3. Lord0

    Lord0 Guest

    > It's the other way around. .Net prefers "document literal" and has specific
    > conventions on how you name the WSDL elements.


    Hi,

    Thanks for the reply. Do you have any links/docs with more info on
    this?

    Cheers

    Lord0
     
    Lord0, May 9, 2007
    #3
  4. "Lew" <> wrote in message
    news:...
    > Lord0 wrote:
    >> Hi there,
    >>
    >> Im currently exposing functionality of an existing application as a
    >> Web Service - Im using Axis 1.x for this. I have read that the only
    >> style of Web Service supported by .NET is "wrapped" as opposed to,
    >> say, "document".
    >>
    >> Anybody got any experience/thoughts on this?

    >
    > It's the other way around. .Net prefers "document literal" and has
    > specific conventions on how you name the WSDL elements.


    This is all good stuff to know, but not terribly important. The WSDL
    produced by a .NET service is standard, and any web service toolkit
    (including Axis) should be able to build a client for it. Conversely, the
    ..NET tool that builds clients should be able to use Axis-produced WSD,
    whether the Axis service follows .NET conventions or not..
     
    Mike Schilling, May 10, 2007
    #4
  5. Lord0 wrote:
    > Im currently exposing functionality of an existing application as a
    > Web Service - Im using Axis 1.x for this. I have read that the only
    > style of Web Service supported by .NET is "wrapped" as opposed to,
    > say, "document".
    >
    > Anybody got any experience/thoughts on this?


    Create your web services with Axis.

    Let the .NET coders generate stub code based on the URL of
    the WSDL.

    Then everything will work fine.

    No problems.

    Maybe one problem.

    For some servlet containers you will need to tell the .NET
    developers to put:

    ServicePointManager.Expect100Continue = false;

    in their program to avoid confusing the servlet container.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, May 11, 2007
    #5
  6. "Arne Vajhøj" <> wrote in message
    news:4643ce38$0$90267$...
    > Lord0 wrote:
    >> Im currently exposing functionality of an existing application as a
    >> Web Service - Im using Axis 1.x for this. I have read that the only
    >> style of Web Service supported by .NET is "wrapped" as opposed to,
    >> say, "document".
    >>
    >> Anybody got any experience/thoughts on this?

    >
    > Create your web services with Axis.
    >
    > Let the .NET coders generate stub code based on the URL of
    > the WSDL.
    >
    > Then everything will work fine.
    >
    > No problems.
    >
    > Maybe one problem.
    >
    > For some servlet containers you will need to tell the .NET
    > developers to put:
    >
    > ServicePointManager.Expect100Continue = false;
    >
    > in their program to avoid confusing the servlet container.


    Which containers have you found this to be necessary for?
     
    Mike Schilling, May 11, 2007
    #6
  7. Mike Schilling wrote:
    > "Arne Vajhøj" <> wrote in message
    > news:4643ce38$0$90267$...
    >> Lord0 wrote:
    >>> Im currently exposing functionality of an existing application as a
    >>> Web Service - Im using Axis 1.x for this. I have read that the only
    >>> style of Web Service supported by .NET is "wrapped" as opposed to,
    >>> say, "document".
    >>>
    >>> Anybody got any experience/thoughts on this?

    >> Create your web services with Axis.
    >>
    >> Let the .NET coders generate stub code based on the URL of
    >> the WSDL.
    >>
    >> Then everything will work fine.
    >>
    >> No problems.
    >>
    >> Maybe one problem.
    >>
    >> For some servlet containers you will need to tell the .NET
    >> developers to put:
    >>
    >> ServicePointManager.Expect100Continue = false;
    >>
    >> in their program to avoid confusing the servlet container.

    >
    > Which containers have you found this to be necessary for?


    Tomcat.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, May 12, 2007
    #7
  8. "Arne Vajhøj" <> wrote in message
    news:464515d0$0$90265$...
    > Mike Schilling wrote:
    >> "Arne Vajhøj" <> wrote in message
    >> news:4643ce38$0$90267$...
    >>> Lord0 wrote:
    >>>> Im currently exposing functionality of an existing application as a
    >>>> Web Service - Im using Axis 1.x for this. I have read that the only
    >>>> style of Web Service supported by .NET is "wrapped" as opposed to,
    >>>> say, "document".
    >>>>
    >>>> Anybody got any experience/thoughts on this?
    >>> Create your web services with Axis.
    >>>
    >>> Let the .NET coders generate stub code based on the URL of
    >>> the WSDL.
    >>>
    >>> Then everything will work fine.
    >>>
    >>> No problems.
    >>>
    >>> Maybe one problem.
    >>>
    >>> For some servlet containers you will need to tell the .NET
    >>> developers to put:
    >>>
    >>> ServicePointManager.Expect100Continue = false;
    >>>
    >>> in their program to avoid confusing the servlet container.

    >>
    >> Which containers have you found this to be necessary for?

    >
    > Tomcat.


    Odd. At my workplace, we combine .NET clients and services deployed in
    Tomcat (4.0 and 5.5) with some frequency (e.g. in the nightly unit tests),
    don't set that flag, and haven't seen any problems.
     
    Mike Schilling, May 12, 2007
    #8
  9. Mike Schilling wrote:
    > "Arne Vajhøj" <> wrote in message
    > news:464515d0$0$90265$...
    >> Mike Schilling wrote:
    >>> "Arne Vajhøj" <> wrote in message
    >>>> For some servlet containers you will need to tell the .NET
    >>>> developers to put:
    >>>>
    >>>> ServicePointManager.Expect100Continue = false;
    >>>>
    >>>> in their program to avoid confusing the servlet container.
    >>> Which containers have you found this to be necessary for?

    >> Tomcat.

    >
    > Odd. At my workplace, we combine .NET clients and services deployed in
    > Tomcat (4.0 and 5.5) with some frequency (e.g. in the nightly unit tests),
    > don't set that flag, and haven't seen any problems.


    It may very likely only be certain combinations of versions.

    If you google for it, then you find several stories where it
    was necessary to make it work.

    Obviously those without the problem never posted so.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, May 12, 2007
    #9
  10. Lord0

    Guest

    On May 12, 3:56 pm, Arne Vajhøj <> wrote:
    > MikeSchillingwrote:
    > > "Arne Vajhøj" <> wrote in message
    > >news:464515d0$0$90265$...
    > >> MikeSchillingwrote:
    > >>> "Arne Vajhøj" <> wrote in message
    > >>>> For some servlet containers you will need to tell the .NET
    > >>>> developers to put:

    >
    > >>>> ServicePointManager.Expect100Continue= false;

    >
    > >>>> in their program to avoid confusing the servlet container.
    > >>> Which containers have you found this to be necessary for?
    > >>Tomcat.

    >
    > > Odd. At my workplace, we combine .NET clients and services deployed in
    > >Tomcat(4.0 and 5.5) with some frequency (e.g. in the nightly unit tests),
    > > don't set that flag, and haven't seen any problems.

    >
    > It may very likely only be certain combinations of versions.
    >
    > If you google for it, then you find several stories where it
    > was necessary to make it work.
    >
    > Obviously those without the problem never posted so.


    And now we've run into it, and this information is invaluable. score
    one for Usenet, and thanks, Arne.
     
    , Jun 15, 2007
    #10
  11. Lord0

    Lew Guest

    wrote:
    > On May 12, 3:56 pm, Arne Vajhøj <> wrote:
    >> MikeSchillingwrote:
    >>> "Arne Vajhøj" <> wrote ...
    >>>> MikeSchillingwrote:
    >>>>> "Arne Vajhøj" <> wrote
    >>>>>> For some servlet containers you will need to tell the .NET
    >>>>>> developers to put:
    >>>>>> ServicePointManager.Expect100Continue= false;
    >>>>>> in their program to avoid confusing the servlet container.
    >>>>> Which containers have you found this to be necessary for?
    >>>> Tomcat.
    >>> Odd. At my workplace, we combine .NET clients and services deployed in
    >>> Tomcat(4.0 and 5.5) with some frequency (e.g. in the nightly unit tests),
    >>> don't set that flag, and haven't seen any problems.

    >> It may very likely only be certain combinations of versions.
    >>
    >> If you google for it, then you find several stories where it
    >> was necessary to make it work.
    >>
    >> Obviously those without the problem never posted so.

    >
    > And now we've run into it, and this information is invaluable. score
    > one for Usenet, and thanks, Arne.


    At a project last year our team used Apache Web server as a front end to
    Tomcat running Apache Axis to do Web services connecting to both J2EE clients
    and .Net clients. All we had to do was make the WSDL specify
    "document-literal" and follow certain Microsoftisms to assure interoperability.

    Could it be that we were lucky that either Apache Web Server lacks the issue
    or that that version did?

    I'm with DTLLLUmpireSchedules - I'm really glad you showed us this tip.

    --
    Lew
     
    Lew, Jun 16, 2007
    #11
  12. "Lew" <> wrote in message
    news:...
    > wrote:
    >> On May 12, 3:56 pm, Arne Vajhøj <> wrote:
    >>> MikeSchillingwrote:
    >>>> "Arne Vajhøj" <> wrote ...
    >>>>> MikeSchillingwrote:
    >>>>>> "Arne Vajhøj" <> wrote
    >>>>>>> For some servlet containers you will need to tell the .NET
    >>>>>>> developers to put:
    >>>>>>> ServicePointManager.Expect100Continue= false;
    >>>>>>> in their program to avoid confusing the servlet container.
    >>>>>> Which containers have you found this to be necessary for?
    >>>>> Tomcat.
    >>>> Odd. At my workplace, we combine .NET clients and services deployed in
    >>>> Tomcat(4.0 and 5.5) with some frequency (e.g. in the nightly unit
    >>>> tests),
    >>>> don't set that flag, and haven't seen any problems.
    >>> It may very likely only be certain combinations of versions.
    >>>
    >>> If you google for it, then you find several stories where it
    >>> was necessary to make it work.
    >>>
    >>> Obviously those without the problem never posted so.

    >>
    >> And now we've run into it, and this information is invaluable. score
    >> one for Usenet, and thanks, Arne.

    >
    > At a project last year our team used Apache Web server as a front end to
    > Tomcat running Apache Axis to do Web services connecting to both J2EE
    > clients and .Net clients. All we had to do was make the WSDL specify
    > "document-literal" and follow certain Microsoftisms to assure
    > interoperability.
    >
    > Could it be that we were lucky that either Apache Web Server lacks the
    > issue or that that version did?


    DTLLLUmpireSchedules is me, by the way (it's the gmail account I use to
    send out Little League schedules, and the thread was old enough that I could
    only access it from Google Groups).

    We see the issue with .NET 2.0 clients communicating with Tomcat 5.5
    services running under JDK1.5. All three of these versions are different
    from the situations where we didn't see it, and I don't know which are
    important. The issue seems to be a Microsoft bug pure and simple. The
    clients issue requests with the "Expect:100-continue" header, which means
    that they'll wait to get a status message back before sending the body of
    the request. They then send the body of the request without waiting,
    confusing the hell out of the service.
     
    Mike Schilling, Jun 16, 2007
    #12
  13. Lew wrote:
    > At a project last year our team used Apache Web server as a front end to
    > Tomcat running Apache Axis to do Web services connecting to both J2EE
    > clients and .Net clients. All we had to do was make the WSDL specify
    > "document-literal" and follow certain Microsoftisms to assure
    > interoperability.
    >
    > Could it be that we were lucky that either Apache Web Server lacks the
    > issue or that that version did?


    There are a bazillion possible combinations of Axis version, Tomcat
    version, Java version, .NET version, web service style.

    Since it is an HTTP protocol thing, then I am pretty sure that
    neither Java version or web service style has anything to say.

    I have some C# code that calls a plain JSP page where I also
    have set that property - unless that was just a copy paste,
    then Axis version is in the clear to.

    So we are left with Tomcat version and .NET version.

    When I found the problem it must have been Tomcat 5.5 and
    ..NET 1.1.

    Arne
     
    =?UTF-8?B?QXJuZSBWYWpow7hq?=, Jun 16, 2007
    #13
  14. Mike Schilling wrote:
    > We see the issue with .NET 2.0 clients communicating with Tomcat 5.5
    > services running under JDK1.5. All three of these versions are different
    > from the situations where we didn't see it, and I don't know which are
    > important. The issue seems to be a Microsoft bug pure and simple. The
    > clients issue requests with the "Expect:100-continue" header, which means
    > that they'll wait to get a status message back before sending the body of
    > the request. They then send the body of the request without waiting,
    > confusing the hell out of the service.


    I don't think it is very nice of MS to have that option on by default.

    Default should be standard HTTP.

    And if necessary an option to do something non-standard.

    And even though it is described in RFC 2616 (HTTP 1.1)
    section 8.2.3, then I will still call it non-standard
    in the sense that it is a very rarely used feature.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Jun 16, 2007
    #14
  15. "Arne Vajhøj" <> wrote in message
    news:467469c6$0$90269$...
    > Mike Schilling wrote:
    >> We see the issue with .NET 2.0 clients communicating with Tomcat 5.5
    >> services running under JDK1.5. All three of these versions are different
    >> from the situations where we didn't see it, and I don't know which are
    >> important. The issue seems to be a Microsoft bug pure and simple. The
    >> clients issue requests with the "Expect:100-continue" header, which means
    >> that they'll wait to get a status message back before sending the body of
    >> the request. They then send the body of the request without waiting,
    >> confusing the hell out of the service.

    >
    > I don't think it is very nice of MS to have that option on by default.
    >
    > Default should be standard HTTP.
    >
    > And if necessary an option to do something non-standard.
    >
    > And even though it is described in RFC 2616 (HTTP 1.1)
    > section 8.2.3, then I will still call it non-standard
    > in the sense that it is a very rarely used feature.


    It's required behavior for HTTP 1.1 servers:

    Upon receiving a request which includes an Expect request-header
    field with the "100-continue" expectation, an origin server MUST
    either respond with 100 (Continue) status and continue to read
    from the input stream, or respond with a final status code.

    The problem isn't that Microsoft uses the feature, it's that they implement
    it it correctly.
     
    Mike Schilling, Jun 17, 2007
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mkuzen
    Replies:
    0
    Views:
    670
    mkuzen
    Mar 3, 2009
  2. Roger R. Smith

    ASP.NET, DataList, and WebServices

    Roger R. Smith, Jan 22, 2004, in forum: ASP .Net Web Services
    Replies:
    8
    Views:
    183
    Jan Tielens
    Jan 30, 2004
  3. Francois Vanderseypen

    Tivoli authentication, webservices and .Net

    Francois Vanderseypen, Apr 20, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    145
    Dino Chiesa [Microsoft]
    Apr 22, 2004
  4. venkata praveen

    ASP.NET and webservices

    venkata praveen, May 2, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    111
    Sudharsan Guptha M.
    May 3, 2006
  5. Anoop M

    Consuming .NET Webservices in Java and PHP

    Anoop M, Mar 7, 2007, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    206
    John Saunders
    Mar 7, 2007
Loading...

Share This Page