SOA夜未眠 11

 

服务的开发人员

---------------------------------------------------------------------------------------------------------------------

有一次,客户问我,“我想要找些人来开发服务,我怎么知道这个人适不适合做服务的开发呢?”

我给他出了几个问题,能回答上来的人基本上都是能够担任服务开发的。

1.       根据下述WSDL写出该服务的SOAP请求报文和回复报文。

<?xml version="1.0" encoding="utf-8"?>

<!-- @editor-info:link autogen="true" source="pub.jws" -->

<wsdl:definitions xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.openuri.org/">

  <wsdl:types>

 

  </wsdl:types>

  <wsdl:message name="pubSoapIn">

    <wsdl:part name="ii" type="s:int"/>

    <wsdl:part name="j" type="s:string"/>

  </wsdl:message>

  <wsdl:message name="pubSoapOut"/>

  <wsdl:message name="pubHttpGetIn">

    <wsdl:part name="ii" type="s:string"/>

    <wsdl:part name="j" type="s:string"/>

  </wsdl:message>

  <wsdl:message name="pubHttpGetOut"/>

  <wsdl:message name="pubHttpPostIn">

    <wsdl:part name="ii" type="s:string"/>

    <wsdl:part name="j" type="s:string"/>

  </wsdl:message>

  <wsdl:message name="pubHttpPostOut"/>

  <wsdl:portType name="pubSoap">

    <wsdl:operation name="pub">

      <wsdl:input message="s0:pubSoapIn"/>

      <wsdl:output message="s0:pubSoapOut"/>

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:portType name="pubHttpGet">

    <wsdl:operation name="pub">

      <wsdl:input message="s0:pubHttpGetIn"/>

      <wsdl:output message="s0:pubHttpGetOut"/>

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:portType name="pubHttpPost">

    <wsdl:operation name="pub">

      <wsdl:input message="s0:pubHttpPostIn"/>

      <wsdl:output message="s0:pubHttpPostOut"/>

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="pubSoap" type="s0:pubSoap">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>

    <wsdl:operation name="pub">

      <soap:operation soapAction="http://www.openuri.org/pub" style="rpc"/>

      <wsdl:input>

        <soap:body use="encoded" namespace="http://www.openuri.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

      </wsdl:input>

      <wsdl:output>

        <soap:body use="encoded" namespace="http://www.openuri.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:binding name="pubHttpGet" type="s0:pubHttpGet">

    <http:binding verb="GET"/>

    <wsdl:operation name="pub">

      <http:operation location="/pub"/>

      <wsdl:input>

        <http:urlEncoded/>

      </wsdl:input>

      <wsdl:output/>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:binding name="pubHttpPost" type="s0:pubHttpPost">

    <http:binding verb="POST"/>

    <wsdl:operation name="pub">

      <http:operation location="/pub"/>

      <wsdl:input>

        <mime:content type="application/x-www-form-urlencoded"/>

      </wsdl:input>

      <wsdl:output/>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="pub">

    <wsdl:port name="pubSoap" binding="s0:pubSoap">

      <soap:address location="http://localhost:7001/UntitledWeb/processes/pub.jws"/>

    </wsdl:port>

    <wsdl:port name="pubHttpGet" binding="s0:pubHttpGet">

      <http:address location="http://localhost:7001/UntitledWeb/processes/pub.jws"/>

    </wsdl:port>

    <wsdl:port name="pubHttpPost" binding="s0:pubHttpPost">

      <http:address location="http://localhost:7001/UntitledWeb/processes/pub.jws"/>

    </wsdl:port>

  </wsdl:service>

</wsdl:definitions>

2.       Web Servicesstyle="document"style="rpc"的区别是什么?

3.       WSDLsoapAction的作用是什么?

4.       请描述下列任一框架中,Web Services中读取和设置SOAP Header的方法

AXIS, XFire, Weblogic Workshop, CXF, .Net

 

对于服务的开发人员,一般要求他们对Web Services有一定的了解,对XMLXSD有了解,用过常用的Web Services框架,对XPATHXQuery有了解。

如果他们不具备上述技能,那么在开发之前的首要任务就是能够他们快速熟悉这些技能。

 

客户有时候会对如何提高开发人员的技能提出些令人哭笑不得的建议,有一个客户曾对我说:“你写一些样例代码出来,让他们照着抄抄,他们就能开发了。”样例代码只能起一个指导作用,服务的开发人员通常要开发各种复杂的业务逻辑,这是没法抄袭的。另外,对于企业级应用,如果开发人员对技术理解不够透彻,很容易造成内存泄漏、死锁等错误。所以,样例代码固然要提供,但仍然需要提醒他们编程时的关键点,还要做好测试。

 

如果开发人员的技能并不熟练,SOA项目就像一条航行的船,船员都是生手,这时就需要船长、大副、二副、三副等等时时提醒和监督了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值