0

Here is the app.config I got:

<?xml version="1.0"?>
<configuration>
  <system.serviceModel>
    <extensions>
      <behaviorExtensions>
        <add name="wsdlExtensions" type="WCFExtras.Wsdl.WsdlExtensionsConfig, WCFExtras, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
      </behaviorExtensions>
    </extensions>

    <behaviors>
      <endpointBehaviors>
        <behavior name="WsdlSampleEndpointBehavior">
          <wsdlExtensions singleFile="true" />
        </behavior>
      </endpointBehaviors>

      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="True"/>
          <serviceDebug includeExceptionDetailInFaults="True"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <diagnostics>
      <messageLogging
           logEntireMessage="true"
           logMalformedMessages="true"
           logMessagesAtServiceLevel="true"
           logMessagesAtTransportLevel="true"
           maxMessagesToLog="3000"
           maxSizeOfMessageToLog="20000"/>
    </diagnostics>
<services>
  <service name="VogService">
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8733/"/>
      </baseAddresses>
    </host>
    <endpoint address="GoToTheMarketService"
    binding="basicHttpBinding" bindingConfiguration="GoToTheMarketService"
    contract="GoToTheMarketService" name="GoToTheMarketService" behaviorConfiguration="WsdlSampleEndpointBehavior">
      <identity>
        <dns value="localhost"/>
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  </service>
</services>

<bindings>
  <basicHttpBinding>
    <binding name="GoToTheMarketService" closeTimeout="00:01:00"
      openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
      allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
      maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
      messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
      useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="Transport">
        <transport clientCredentialType="None" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </system.serviceModel>

  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel.MessageLogging">
        <listeners>
          <add name="messages"
          type="System.Diagnostics.XmlWriterTraceListener"
          initializeData="C:\messages.svclog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>

  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>

I added wcfextras to project references and even set it to copy local.

In the result it just generates same WSDL file with imports of XSD and so on:

...
<wsdl:import namespace="aaa" location="http://localhost:8733/?wsdl=wsdl0"/>
...
<xsd:schema targetNamespace="aaa/Imports">
<xsd:import schemaLocation="http://localhost:8733/?xsd=xsd0" namespace="aaa"/>
<xsd:import schemaLocation="http://localhost:8733/?xsd=xsd1" namespace="http://lalala.com/asdas12"/>
</xsd:schema>
...

How can I make it to generate just one, single WSDL file?

kseen
  • 359
  • 8
  • 56
  • 104

1 Answers1

1

To get a traditional WSDL, we use the following steps:

  1. In your svc.vb, Import System.Web.Services
  2. In your .svc.vb, markup each exposed method with <WebMethod()>
  3. Add an .asmx file (same directory as .svc) Code in .asmx:

  4. Now in browser hit your url to the new .asmx?wsdl
  5. Boom. WSDL
lcryder
  • 486
  • 2
  • 8