Здравствуйте. Хочу сделать шифрование сообшений с RSA для моего простейшего веб-сервиса. Много чего "перерыл" но что-то совсем дело несдвигаеться. Использую axis2 вот у меня код веб-сервиса desc.xml| Код | <?xml version="1.0" encoding="UTF-8"?> <definitions name="descWSDL" targetNamespace="http://localhost/GeoIp" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://localhost/GeoIp" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types> <schema targetNamespace="http://localhost/GeoIp" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://localhost/GeoIp">
<complexType name="IpInfo"> <sequence> <element name="info" nillable="false" type="xsd:anyType" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType>
<element name="IpInfoStruct"> <complexType> <sequence> <element name="info" nillable="false" type="xsd:anyType" minOccurs="0" maxOccurs="10" /> </sequence> </complexType> </element>
<element name="IpInfoStructArray"> <complexType> <sequence> <element name="infoArray" nillable="false" type="tns:IpInfo" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> </element>
<element name="IP"> <complexType> <sequence> <element name="ip" nillable="false" type="xsd:string" /> </sequence> </complexType> </element> <element name="text"> <complexType> <sequence> <element name="message" nillable="false" type="xsd:string" /> </sequence> </complexType> </element>
<element name="getIpInfoFault"> <complexType> <sequence> <element name="getIpInfoFault" nillable="false" type="string"></element> </sequence> </complexType> </element> <element name="getCityIpsInfoFault"> <complexType> <sequence> <element name="getCityIpsInfoFault" nillable="false" type="string"> </element> </sequence> </complexType> </element>
</schema> </types>
<message name="getIpInfoRequest"> <part name="part1" element="tns:IP" /> </message> <message name="getIpInfoResponse"> <part name="part1" element="tns:IpInfoStruct" /> </message> <message name="getIpInfoFault"> <part name="part1" element="tns:getIpInfoFault"></part> </message>
<message name="insertIpInfoRequest"> <part name="part1" element="tns:IpInfoStruct" /> </message> <message name="insertIpInfoResponse"> <part name="part1" element="tns:text"></part> </message> <message name="insertIpInfoFault"> <part name="part1" element="tns:text" /> </message>
<message name="getCityIpsInfoRequest"> <part name="part1" element="tns:text" /> </message> <message name="getCityIpsInfoResponse"> <part name="part1" element="tns:IpInfoStructArray" /> </message> <message name="getCityIpsInfoFault"> <part name="part1" element="tns:getCityIpsInfoFault"></part> </message>
<portType name="GeoIpType"> <operation name="getIpInfo"> <input message="tns:getIpInfoRequest" /> <output message="tns:getIpInfoResponse" /> <fault message="tns:getIpInfoFault" name="Exception" /> </operation> <operation name="insertIpInfo"> <input message="tns:insertIpInfoRequest" /> <output message="tns:insertIpInfoResponse"></output> <fault message="tns:insertIpInfoFault" name="Exception" /> </operation> <operation name="getCityIpsInfo"> <input message="tns:getCityIpsInfoRequest" /> <output message="tns:getCityIpsInfoResponse" /> <fault message="tns:getCityIpsInfoFault" name="Exception" /> </operation> </portType>
<binding name="GeoIpSoapBinding" type="tns:GeoIpType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="getIpInfo"> <soap:operation soapAction="http://localhost/GeoIp/getIpInfo" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> <fault name="Exception"> <soap:fault name="Exception" use="literal" /> </fault> </operation>
<operation name="insertIpInfo"> <soap:operation soapAction="http://localhost/GeoIp/insertIpInfo" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> <fault name="Exception"> <soap:fault name="Exception" use="literal" /> </fault> </operation>
<operation name="getCityIpsInfo"> <soap:operation soapAction="http://localhost/GeoIp/getCityIpsInfo" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> <fault name="Exception"> <soap:fault name="Exception" use="literal" /> </fault> </operation>
</binding>
<service name="GeoIpService"> <documentation>My GeoIp service</documentation> <port name="GeoIpPort" binding="tns:GeoIpSoapBinding"> <soap:address location="http://localhost/GeoIp" /> </port> </service>
</definitions>
|
вот так генерирую | Цитата | %AXIS2_HOME%\bin\WSDL2Java -uri desc.wsdl -d adb -s -ss -sd -ssi -o service_server
|
Вот тут есть статья как это делаеться http://blog.sweetxml.org/2007/12/rampart-b...you-add-ws.htmlНо я что-то ничего не понимаю как мне подправить desc.xml? Буду рад если кто-то что-то ответит. Это сообщение отредактировал(а) Ccoder - 18.5.2011, 17:46
|