I think most of you prefer to implement service port type first while try to build a wcf service. That is ok, however, did you ever take the final stub class in your consideration, in the meanwhile you are coding a wcf service?
As known, we can use ?WSDL to get wsdl displayed in IE. Most of time, we will get the following WSDL:
<wsdl:import namespace=http://services/ location=http://XXXX/Service.svc?wsdl=wsdl0 />
<wsdl:types />
Unfortunately, Schemas and Messages are missing. It will be a big impact to generate proxy class by wsdl.exe or access by SOAP UI.
At then, we have to query like http://XXXX/Service.svc?wsdl=wsdl0, http://XXXX/Service.svc?xsd=xsdn (n starts from 0) to get schemas and Messages.
If this service is large enough, you will find it will be a tough job.
Ok, what should we do now? I think we have two approaches:
1, facilitate a static wsdl file before developing services. and configure <system.serviceModel> section like the following:
<services>
<!-- Replace the parameters below for your service implementation -->
<service name="ServicePortType" behaviorConfiguration="ServiceBehavior" >
<endpoint address="" binding="basicHttpBinding" bindingNamespace=http://service/ contract="IServicePortType"
/>
</
service>
</
services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior" >
<serviceMetadata httpGetEnabled="true" externalMetadataLocation="..\service.wsdl"/>
</
behavior>
</
serviceBehaviors>
</
behaviors>
Ok, job is done. Next time , if you attempt to link http://XXXX/Service.svc?wsdl, you wil get a flat wsdl.
2, Develop a custom behavior to support Inlined XSD.
posted @ 2011-03-31 14:40 方夜羽 阅读(115) 评论(0)
编辑
通过中软的面试+笔试以后,你会获得microsoft的电话面试机会.
去中江路之后,回来的路上就接到microsoft的电话,不过我没有听到,大概是5点48的时候打来的.到了晚上6点36的时候,microsoft又拨了个电话过来,不过巧的是,我在拨弄我的手机,听到一声响后,我居然把电话挂了.我回拨过去才知道是microsoft的电话,号码是021-34244720.
之后我就忐忑地等待着这个电话,终于在5月29日这一天的下午,电话来了.一个GG,普通话说得很好,一开始就让我自我介绍了一下.然后问我熟悉microsoft的那些技术?我说熟悉asp.net,winform,ado.net,还有一些asp.net webservice的知识.然后开始balabala......
我依稀还记得他的一些个问题.
CLR里有些什么内容?
dipose()与finalize()有什么区别?
值类型与引用类型的区别?
什么是多态?如何实现?
ado.net里有些什么内容?
dataadpter的command有几种?
如果updatecommand或者deletecommand没有自动生成会是什么原因?
httphandler与httpmodule?
如何实现一个masterTable?
如何标示一个session?
用过那些数据绑定的控件,asp.net或者winform里的都可以描述一下.
什么简单绑定,什么是复杂绑定?
总之还有很多东西,都是很基础的...电话持续了大约34分钟.
然后他问我现在是什么情况,我说你说的是什么意思呢?
他说你是在上班还是什么状态?我说我现在离职在上海找工作.\
他让我这两天保持手机开机,他会随时联系我.
听到这些我知道我已经通过电话面试了.
等到晚上6点12分,漂亮的miss gu都电话告知我在星期五的早上10点到美罗大厦23楼找她.
posted @ 2008-01-23 13:16 方夜羽 阅读(336) 评论(0)
编辑