c# - How do I get WSDL file from a running service? -


here's how start web service:

try {     //load shedluer static constructor     servicehost svh = new servicehost(typeof(orderexecutor));      var tcpbinding = new nettcpbinding(securitymode.none);      //remove limits on max array size     var httplocation = "http://" + address + ":1234";      svh.addserviceendpoint(typeof(iorderexecutor), new wshttpbinding(securitymode.none), httplocation);      servicemetadatabehavior smb = svh.description.behaviors.find<servicemetadatabehavior>();      if (smb == null)         smb = new servicemetadatabehavior();      smb.metadataexporter.policyversion = policyversion.policy15;     svh.description.behaviors.add(smb);      // add mex endpoint      svh.addserviceendpoint(                 servicemetadatabehavior.mexcontractname,                 metadataexchangebindings.createmexhttpbinding(),                 httplocation + "/mex"                 );       svh.open();     console.writeline("service mounted @ {0}", httplocation);     console.writeline("press ctrl+c exit");      var re = new manualresetevent(false);     re.waitone();     svh.close(); } catch (exception e) {     console.writeline("exception");     console.writeline(e); }  

the service starts , works ok, visual studio can connect , create working client.

but, need wsdl file make inter-operate php.

i've tried

http://localhost:1234?wsdl http://localhost:1234/iorderexecutor?wsdl http://localhost:1234/iorderexecutor.wsdl 

without success.

i've tried

svcutil /servicename:iorderexecutor order-executor.exe 

with following result:

warning: unable load service configname 'iorderexecutor'. export  service provide both assembly containing service type , executab le configuration service.     details:either none of assemblies passed executables configura tion files or none of configuration files contained services config  name 'iorderexecutor'.  warning: no metadata files generated. no service contracts exported.  export service, use /servicename option. export data contracts, spe cify /datacontractonly option. can occur in security contexts, such when assembly loaded on unc network file share. if case, try copying assembly trusted environment , runnin g it. 

how wsdl file running wcf service?

have tried localhost:1234/iorderexecutor/?wsdl

try may works


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -