Alexander Zwitbaum
Alexander Zwitbaum

Reputation: 4846

Sharing DataContracts between java web services (or reuse types) for WCF Client

How to provide common data contracts in the multiple java web services (hosted e.g. on the jboss), so they will be generates one time by adding a ServiceReference in the VS2010 and reused in a WCF client.

For the WCF services to wcf client the solution is clear, like it was written here Sharing DataContracts between WCF Services.

How to solve it for java web services? Is it possible?

Upvotes: 0

Views: 1030

Answers (2)

Cheeso
Cheeso

Reputation: 192577

The recommended approach for interoperability is

  • Start by defining the message formats in XSD.
  • generate the code in your Java web services framework
  • and generate classes for use in .NET

The XSD is what allows you to "re-use classes", but the specific steps required will vary depending on the web services stack you use on the Java side.

For some tutorials you can scan http://blogs.msdn.com/dotnetinterop - there are writeups on using AXIS2, JAXWS, and others.

Upvotes: 0

Chandermani
Chandermani

Reputation: 42659

You can try contract first development for WCF. See this article. It is not a popular approach. What you can also try is to create WCF service, generate its WSDL and use some tool in java to generate a java class for the WSDL

Upvotes: 1

Related Questions