0

I have a WCF web service method that returns a List<> object and also has an out variable in its method signature as in code below. Will this work with a Java client? I am trying to create Java compatible web services. My concern is the out variable as I know the return type of List<> will be accepted by Java since 'Contract' class is simply a class with integer or string properties.

 List<Contract> GetContractsWithcount(out int totalCount, string contractSearchText, int startRowIndex, int maximumRows)
Sunil
  • 20,653
  • 28
  • 112
  • 197
  • There sits a layer of SOAP/XML messaging between client and server, and this layer is basically responsible for shielding the two ends from each others details. As long as you can ensure that the wsdl generated from C# service is understood by the java client , this should work , but I am not sure how the wsdl will come with a `out` param. – Bhaskar Jul 30 '12 at 16:18

1 Answers1

1

The short answer is the out keyword won't work in Java but see the following link for an example of a workaround that may work.

Does Java have something like C#'s ref and out keywords?

Community
  • 1
  • 1
Him_Jalpert
  • 2,476
  • 9
  • 31
  • 55