The operation ProcessPayment either has a parameter or a return type that is attributed with MessageContractAttribute. In order to represent the request message using a Message Contract, the operation must have a single parameter attributed with MessageContractAttribute. In order to represent the response message using a Message Contract, the operation's return value must be a type that is attributed with MessageContractAttribute and the operation may not have any out or ref parameters.
<?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="SOAPBinding"> <security mode="None"/> </binding> </basicHttpBinding> <webHttpBinding> <binding name="XMLBinding"/> <binding name="JSONBinding"/> </webHttpBinding> </bindings> <services> <service name="BillingApi.ProductPaymentProcessing" behaviorConfiguration="ServiceBehaviorConfig"> <endpoint address="" binding="basicHttpBinding" contract="BillingApi.IProductPaymentProcessing" bindingConfiguration="SOAPBinding" /> <endpoint address="XML" binding="webHttpBinding" contract="BillingApi.IProductPaymentProcessing" behaviorConfiguration="XMLEndpointConfig" bindingConfiguration="XMLBinding" /> <endpoint address="JSON" binding="webHttpBinding" contract="BillingApi.IProductPaymentProcessing" behaviorConfiguration="JSONEndpointConfig" bindingConfiguration="JSONBinding" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <behaviors> <endpointBehaviors> <behavior name="XMLEndpointConfig"> <webHttp automaticFormatSelectionEnabled="false" helpEnabled="true" defaultOutgoingResponseFormat="Xml"/> </behavior> <behavior name="JSONEndpointConfig"> <!--<enableWebScript/>--> <webHttp automaticFormatSelectionEnabled="false" helpEnabled="true" defaultOutgoingResponseFormat="Json"/> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="ServiceBehaviorConfig"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> <!--<standardEndpoints> </standardEndpoints>--> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>
out
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)