Results 1 to 7 of 7

Thread: c# and J2EE Web Service

  1. #1
    Join Date
    Sep 2006
    Posts
    3

    Default c# and J2EE Web Service

    Hi, I'm new to the Spring Framework and I want to know if it is possible to expose a J2EE Web Service using Spring that can be accessed by a C# Desktop GUI?

    Thanks

    martinC

  2. #2
    Join Date
    Jun 2006
    Location
    outside boston
    Posts
    108

    Default yes it is

    It definetly is - we are doing it where I'm working. We are using jaxb2 for marshalling/unmarshalling.
    You still can have issues however with things like namespaces in nested schemas, etc but in general it's possible.

  3. #3
    Join Date
    Sep 2006
    Posts
    3

    Default

    exactly what I wanted to know - thanks! Any issues with complex objects, arrays etc?

    martinC

  4. #4
    Join Date
    Jan 2005
    Posts
    17

    Default

    The fact that you're using Spring-WS for your web service is completely transparent to the client - this is because of the contract-first approach favored by Spring-WS.

    So with Spring-WS, you create your WSDL independent from the Spring-WS framework. I assume you're using the .NET WSDL code generator, so as long as your WSDL is correct, you'll have no problems, you can use any type defined by the WSDL and XSD specifications.

    On the server-side, it's then up to you to determine how you handle the XML payload of the incoming SOAP request and how you construct the XML payload of the outgoing SOAP response.

    This involves a little more than typical code-first approaches, but it also absolutely makes the question of "Can I invoke a web service published by ABC framework within a C# client?" go away. You'll never have to worry about that with Spring-WS's contract-first approach.

  5. #5
    Join Date
    Mar 2006
    Location
    Germany, Karlsruhe
    Posts
    157

    Default Ws-i

    Hi MartinC,

    i want to suggest that you take a look at WS-I.
    If you follow these additional rules, all is working very well.

    Cheers,

    Ingo
    Last edited by res1st; Sep 18th, 2006 at 07:22 AM.

  6. #6
    Join Date
    Sep 2006
    Posts
    3

    Default

    Thanks guys, appreciate the help

    martinC

  7. #7
    Join Date
    Jun 2006
    Location
    outside boston
    Posts
    108

    Default following up

    Just a couple of follow up comments here.
    We have run into a few issues, but they are not because we are using spring-ws. As stated above, the contract first nature of spring-ws means you have control over the data you return rather than mechanisms that use reflection (such as the axis model). Of course you must ensure the wsdl matches what you return!

    The issues we have had however seem to be on the .net side. For one thing, using datasets to process the returned information has been problematic with nested schemas (when there are multiple namespaces involved in a complicated schema the .net code has had errors). Also, programatically calling a web service and logging in with basic authentication (rather than popping up a form for a user to type in) has had issues because the .net code doesn't seem to follow the standard for doing this correctly (so we have to make a call in a try catch to log in, and then call again to call the service).
    The bottom line from my perspective is the issues we have had are not related to the spring platform, but there may still be issues needing resolution because of differences in the platform (probably as stated - moreso if you don't follow the WS-I spec completely (which is probably true for using datasets on the .net side)).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •