随笔-295  评论-26  文章-1  trackbacks-0
type:表示所有的数据类型
Message: 指明被调用的函数的参数
Port:    指明服务的具体内容,包括输入输出
Binding:  服务所绑定的协议

addTwo Method invocation



Method parameter(s)

TypeValue
int55
int676

Method returned

int : "731"

SOAP Request


<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Header/>
    <S:Body>
        <ns2:addTwo xmlns:ns2="http://my/">
            <mm>55</mm>
            <gg>676</gg>
        </ns2:addTwo>
    </S:Body>
</S:Envelope>

SOAP Response


<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <ns2:addTwoResponse xmlns:ns2="http://my/">
            <return>731</return>
        </ns2:addTwoResponse>
    </S:Body>
</S:Envelope>


<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.2-hudson-112-M1. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.2-hudson-112-M1. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://my/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://my/" name="firstService">
<types>
<xsd:schema>
<xsd:import namespace="http://my/" schemaLocation="http://localhost:8080/ssServ/firstService?xsd=1"></xsd:import>
</xsd:schema>
</types>
<message name="usrLogin">
<part name="parameters" element="tns:usrLogin"></part>
</message>
<message name="usrLoginResponse">
<part name="parameters" element="tns:usrLoginResponse"></part>
</message>
<message name="addTwo">
<part name="parameters" element="tns:addTwo"></part>
</message>
<message name="addTwoResponse">
<part name="parameters" element="tns:addTwoResponse"></part>
</message>
<message name="userLogin">
<part name="parameters" element="tns:userLogin"></part>
</message>
<message name="userLoginResponse">
<part name="parameters" element="tns:userLoginResponse"></part>
</message>
<portType name="first">
<operation name="usrLogin">
<input message="tns:usrLogin"></input>
<output message="tns:usrLoginResponse"></output>
</operation>
<operation name="addTwo">
<input message="tns:addTwo"></input>
<output message="tns:addTwoResponse"></output>
</operation>
<operation name="userLogin">
<input message="tns:userLogin"></input>
<output message="tns:userLoginResponse"></output>
</operation>
</portType>
<binding name="firstPortBinding" type="tns:first">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<operation name="usrLogin">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
<operation name="addTwo">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
<operation name="userLogin">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="firstService">
<port name="firstPort" binding="tns:firstPortBinding">
<soap:address location="http://localhost:8080/ssServ/firstService"></soap:address>
</port>
</service>
</definitions>

从本质上说:客户端发一个请求即SOAP 请求头,到指定的web service地址wsdl,然后经过webservice的处理之后,返回一个 SOAP 相应, 然后再在客户端解析他们

大盘预测 国富论
posted on 2007-07-05 18:27 华梦行 阅读(160) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: