public static void XmlSerializerFormat_RoundTrips_CompositeType() { BasicHttpBinding binding = new BasicHttpBinding(); EndpointAddress endpointAddress = new EndpointAddress(s_basicEndpointAddress); ChannelFactory <IWcfServiceXmlGenerated> factory = new ChannelFactory <IWcfServiceXmlGenerated>(binding, endpointAddress); IWcfServiceXmlGenerated serviceProxy = factory.CreateChannel(); var input = new XmlCompositeType(); input.StringValue = "message"; input.BoolValue = false; var response = serviceProxy.GetDataUsingXmlSerializer(input); Assert.True(response != null); Assert.Equal("message", response.StringValue); Assert.True(!input.BoolValue); }
public static void XmlSerializerFormat_RoundTrips_CompositeType() { BasicHttpBinding binding = new BasicHttpBinding(); EndpointAddress endpointAddress = new EndpointAddress(s_basicEndpointAddress); ChannelFactory<IWcfServiceXmlGenerated> factory = new ChannelFactory<IWcfServiceXmlGenerated>(binding, endpointAddress); IWcfServiceXmlGenerated serviceProxy = factory.CreateChannel(); var input = new XmlCompositeType(); input.StringValue = "message"; input.BoolValue = false; var response = serviceProxy.GetDataUsingXmlSerializer(input); Assert.True(response != null); Assert.Equal("message", response.StringValue); Assert.True(!input.BoolValue); }