Developing a Microsoft .NET Client

This section describes how to develop a .NET client that uses data binding.

Do the following steps to generate a Microsoft .NET client from a Java web service WSDL file:

  1. Generate WCF web service client artifacts using the svcutil.exe tool:
  2.   svcutil.exe <java-web-service-wsdl>

    svcutil.exe has the following options for selecting a serializer.

      svcutil.exe /serializer:auto (default)
      svcutil.exe /serializer:DataContractSerializer
      svcutil.exe /serializer:XmlSerializer

    We recommend using the default (/serializer:auto) option. This option ensures that svcutil.exe falls back to XmlSerializer if an XML schema construct is used that cannot be processed by DataContractSerializer.

    For example, in the following class field price is mapped to an XML attribute that cannot be consumed by DataContractSerializer.

        public class POType {
          @javax.xml.bind.annotation.XmlAttribute
          public java.math.BigDecimal price;
        }
    
        <!-- XML schema fragment -->
        <xs:complexType name="poType">
          <xs:sequence/>
          <xs:attribute name="price" type="xs:decimal"/>
        </xs:complexType> 
    
  3. Develop the .NET client using the generated artifacts.