Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1051393
  • 博文数量: 155
  • 博客积分: 5339
  • 博客等级: 大校
  • 技术积分: 1436
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-10 21:41
文章分类

全部博文(155)

文章存档

2016年(3)

2015年(7)

2014年(3)

2013年(1)

2012年(8)

2011年(5)

2010年(1)

2009年(5)

2008年(4)

2007年(26)

2006年(46)

2005年(46)

分类: Java

2012-01-20 17:45:19

直接看WSDL,schema定义部分:
  1. <schema targetNamespace="" xmlns="">
  2.          <element name="reqhead1" nillable="false" type="xs:string"/>
  3.         <element name="reqhead2" nillable="false" type="xs:string"/>
  4.         <element name="ReqXsd">
  5.                 <complexType>
  6.                     <sequence>
  7.                         <element minOccurs="1" name="f1" nillable="false" type="xs:string"/>
  8.                         <element minOccurs="1" name="f2" nillable="false" type="xs:dateTime"/>
  9.                         <element minOccurs="1" name="f3" nillable="false" type="xs:dateTime"/>
  10.                     </sequence>
  11.                 </complexType>
  12.         </element>
  13.         <element name="reshead1" nillable="false" type="xs:string"/>
  14.         <element name="reshead2" nillable="false" type="xs:string"/>
  15.         <element name="ResXsd">
  16.                 <complexType>
  17.                     <sequence>
  18.                         <element minOccurs="1" name="r1" nillable="false" type="xs:int"/>
  19.                         <element minOccurs="1" name="r2" nillable="true" type="xs:string"/>
  20.                     </sequence>
  21.                 </complexType>
  22.         </element>
  23. </schema>
message定义:
  1. <wsdl:message name="Request">
  2.         <wsdl:part name="ReqPart" element="tns:ReqXsd"/>
  3.         <wsdl:part name="reqhead1part" element="tns:reqhead1"/>
  4.         <wsdl:part name="reqhead2part" element="tns:reqhead2"/>
  5.     </wsdl:message>
  6.     <wsdl:message name="Response">
  7.         <wsdl:part name="ResPart" element="tns:ResXsd"/>
  8.         <wsdl:part name="reshead1part" element="tns:reshead1"/>
  9.         <wsdl:part name="reshead2part" element="tns:reshead2"/>
  10.     </wsdl:message>
portType定义:
  1. <wsdl:portType name="ServicePortType">
  2.     <wsdl:operation name="intf1">
  3.             <wsdl:input name="intf1Req" message="tns:Request">
  4.     </wsdl:input>
  5.             <wsdl:output name="intfRes" message="tns:Response">
  6.     </wsdl:output>
  7.         </wsdl:operation>
  8. </wsdl:portType>
binding定义:
  1. <wsdl:binding name="ServiceBinding" type="tns:ServicePortType">
  2. <wsdlsoap:binding style="document" transport=""/>
  3.         <wsdl:operation name="intf1">
  4.             <wsdlsoap:operation soapAction=""/>
  5.             <wsdl:input>
  6.                 <wsdlsoap:body parts="ReqPart" use="literal"/>
  7.                 <wsdlsoap:header message="tns:Request" part="reqhead1part" use="literal"/>
  8.                 <wsdlsoap:header message="tns:Request" part="reqhead2part" use="literal"/>
  9.             </wsdl:input>
  10.             <wsdl:output>
  11.                 <wsdlsoap:body parts="ResPart" use="literal"/>
  12.                 <wsdlsoap:header message="tns:Response" part="reshead1part" use="literal"/>
  13.                 <wsdlsoap:header message="tns:Response" part="reshead2part" use="literal"/>
  14.             </wsdl:output>
  15.         </wsdl:operation>
  16. </wsdl:binding>
一环扣一环,注意相互之间的对应关系即可











阅读(4630) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~