Listing 1

WCF service implementation
[ServiceContract()]
public interface IMyService
{
    [OperationContract]
    int MathOp(int param1, int param2);
}

public class MyService : IMyService
{
    public int MathOp(int param1, int param2)
    {
        return param1*param2;
    }
}


Listing 2

Multiple endpoint-binding configurations
<configuration>
  <system.serviceModel>
    <services>

      <service name="MyService" behaviorConfiguration="returnFaults">

        <endpoint address="/MyServiceEndpoint1" contract="IMyService" binding="wsHttpBinding"
		 bindingConfiguration="SecureReliableBinding"/>

	  <endpoint address="/MyServiceEndpoint2" contract="IMyService" binding="basicHttpBinding"
	   bindingConfiguration="BasicBinding"/>

    </service>
    </services>

	  <bindings>
		  <wsHttpBinding>
			  <binding name="SecureReliableBinding">
				  <reliableSession enabled="true" />
				  <security mode="Message" />
			  </binding>
		  </wsHttpBinding>

		  <basicHttpBinding>
			  <binding name="BasicBinding">
				  <security mode="None" />
			  </binding>
		  </basicHttpBinding>
	  </bindings>

    <behaviors>
      <serviceBehaviors>
        <behavior name="returnFaults" >
			<serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

  <system.Web>
    <compilation debug="true"/>
  </system.Web>
</configuration>


Listing 3

Configuration for supporting both REST and SOAP messaging
public class MyService
{
public int MathOp(int param1, int param2)
    {
      return param1*param2;
    }
}

Oracle Web Service implementation

<oracle-Webservices xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/oracle-Webservices-10_0.xsd">
    <Webservice-description name="MyWebService1">
        <port-component name="MyWebService1SoapHttpPort">
            <rest-support>true</rest-support>
            <operations>
                <operation name="MathOp" input="{http://interopsample/types/}MathOpElement"/>
            </operations>
        </port-component>
    </Webservice-description>
</oracle-Webservices>