3

For reasons unnecessary to go into on this thread, I'm trying to create a wrapper for svcutil, which will then standardise the wsdl & xsd docs created to point at certain addresses. However, one of my WCF services has two different service contracts, one for internal processing, one published to external clients. When I run svcutil /target:metadata serviceAddress.svc from cmd.exe, I get a full wsdl doc with the following entry:

<wsdl:service name="MyServiceMain">
    <wsdl:port name="BasicHttpBinding_IMyService" binding="tns:BasicHttpBinding_IMyService">
        <soap:address location="MyServiceMain.svc" />
    </wsdl:port>
    <wsdl:port name="BasicHttpBinding_IInternalServiceContract" binding="tns:BasicHttpBinding_IInternalServiceContract">
        <soap:address location="MyServiceMain.svc" />
    </wsdl:port>
</wsdl:service>

However, if I use a Process object (with a ProcessStartInfo object with the same environment variables set up, definitely using the same version of svcutil) to run the same command, one of those wsdl:port elements mysteriously disappears:

<wsdl:service name="MyServiceMain">
    <wsdl:port name="BasicHttpBinding_IMyService" binding="tns:BasicHttpBinding_IMyService">
        <soap:address location="MyServiceMain.svc" />
    </wsdl:port>
</wsdl:service>

Any idea as to why? Or even something that can point me in the right direction that might indicate something different happening under the hood. Because I'm stumped right now.

Codo
  • 75,595
  • 17
  • 168
  • 206
  • 1
    Welcome to StackOverflow. Please use the `{ }` button to format your code; otherwise XML code disappears. I've fixed it this time, and I've removed the unnecessary linefeeds as well. – Codo Nov 30 '12 at 12:06
  • Thanks. I knew there had to be something I'd done wrong. – David Mercer Nov 30 '12 at 12:08

0 Answers0