Applying Enterprise JavaBeans(TM): Component-Based Development for the J2EE(TM) Platform

Code Example A.14 shows the WSDL description of the InsurancePlanAdmin Web service provided by Star Enterprise, as described in Chapter 9.

Code Example A.14 InsurancePlanAdmin Web Service Description

[View full width]

<?xml version="1.0" encoding="UTF-8"?> <definitions name="InsurancePlanAdminService" targetNamespace="http://example.com/InsurancePlanAdmin" xmlns:tns="http://example.com/InsurancePlanAdmin" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <types> <schema targetNamespace="http://example.com/InsurancePlanAdmin" xmlns:xsi="http://www. w3.org/2001/XMLSchema-instance" xmlns:tns="http://example.com/InsurancePlanAdmin" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas. xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace= "http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="ArrayOfDoctorInfo"> <complexContent> <restriction base="soap-enc:Array"> <attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:DoctorInfo[]"/> </restriction></complexContent> </complexType> <complexType name="DoctorInfo"> <sequence> <element name="firstName" type="string"/> <element name="hospitals" type="tns:ArrayOfstring"/> <element name="lastName" type="string"/> <element name="practiceSince" type="int"/> <element name="specialty" type="string"/></sequence> </complexType> <complexType name="ArrayOfstring"> <complexContent> <restriction base="soap-enc:Array"> <attribute ref="soap-enc:arrayType" wsdl:arrayType="string[]"/> </restriction></complexContent></complexType> <complexType name="PlanInfo"> <sequence> <element name="ageFactor" type="double"/> <element name="coverageFactor" type="double"/> <element name="planId" type="string"/> <element name="planName" type="string"/> <element name="planType" type="int"/> <element name="smokerCost" type="double"/> </sequence></complexType></schema></types> <message name="InsurancePlanAdmin_addDoctors"> <part name="String_1" type="xsd:string"/> <part name="arrayOfDoctorInfo_2" type="tns:ArrayOfDoctorInfo"/> </message> <message name="InsurancePlanAdmin_addDoctorsResponse"/> <message name="InsurancePlanAdmin_createInsurancePlan"> <part name="String_1" type="xsd:string"/> <part name="String_2" type="xsd:string"/> <part name="int_3" type="xsd:int"/> <part name="double_4" type="xsd:double"/> <part name="double_5" type="xsd:double"/> <part name="double_6" type="xsd:double"/></message> <message name="InsurancePlanAdmin_createInsurancePlanResponse"/> <message name="InsurancePlanAdmin_getAllDoctors"> <part name="String_1" type="xsd:string"/></message> <message name="InsurancePlanAdmin_getAllDoctorsResponse"> <part name="result" type="tns:ArrayOfDoctorInfo"/></message> <message name="InsurancePlanAdmin_getPlanInfo"> <part name="String_1" type="xsd:string"/></message> <message name="InsurancePlanAdmin_getPlanInfoResponse"> <part name="result" type="tns:PlanInfo"/></message> <message name="InsurancePlanAdmin_removeDoctors"> <part name="String_1" type="xsd:string"/> <part name="arrayOfDoctorInfo_2" type="tns:ArrayOfDoctorInfo"/> </message> <message name="InsurancePlanAdmin_removeDoctorsResponse"/> <message name="InsurancePlanAdmin_setAgeFactor"> <part name="String_1" type="xsd:string"/> <part name="double_2" type="xsd:double"/></message> <message name="InsurancePlanAdmin_setAgeFactorResponse"/> <message name="InsurancePlanAdmin_setCoverageFactor"> <part name="String_1" type="xsd:string"/> <part name="double_2" type="xsd:double"/></message> <message name="InsurancePlanAdmin_setCoverageFactorResponse"/> <message name="InsurancePlanAdmin_setSmokerCost"> <part name="String_1" type="xsd:string"/> <part name="double_2" type="xsd:double"/></message> <message name="InsurancePlanAdmin_setSmokerCostResponse"/> <portType name="InsurancePlanAdmin"> <operation name="addDoctors" parameterOrder="String_1 arrayOfDoctorInfo_2"> <input message="tns:InsurancePlanAdmin_addDoctors"/> <output message="tns:InsurancePlanAdmin_addDoctorsResponse"/> </operation> <operation name="createInsurancePlan" parameterOrder="String_1 String_2 int_3 double_4 double_5 double_6"> <input message="tns:InsurancePlanAdmin_createInsurancePlan"/> <output message= "tns:InsurancePlanAdmin_createInsurancePlanResponse"/> </operation> <operation name="getAllDoctors" parameterOrder="String_1"> <input message="tns:InsurancePlanAdmin_getAllDoctors"/> <output message= "tns:InsurancePlanAdmin_getAllDoctorsResponse"/> </operation> <operation name="getPlanInfo" parameterOrder="String_1"> <input message="tns:InsurancePlanAdmin_getPlanInfo"/> <output message="tns:InsurancePlanAdmin_getPlanInfoResponse"/> </operation> <operation name="removeDoctors" parameterOrder="String_1 arrayOfDoctorInfo_2"> <input message="tns:InsurancePlanAdmin_removeDoctors"/> <output message= "tns:InsurancePlanAdmin_removeDoctorsResponse"/> </operation> <operation name="setAgeFactor" parameterOrder="String_1 double_2"> <input message="tns:InsurancePlanAdmin_setAgeFactor"/> <output message="tns:InsurancePlanAdmin_setAgeFactorResponse"/> </operation> <operation name="setCoverageFactor" parameterOrder="String_1 double_2"> <input message="tns:InsurancePlanAdmin_setCoverageFactor"/> <output message= "tns:InsurancePlanAdmin_setCoverageFactorResponse"/> </operation> <operation name="setSmokerCost" parameterOrder="String_1 double_2"> <input message="tns:InsurancePlanAdmin_setSmokerCost"/> <output message= "tns:InsurancePlanAdmin_setSmokerCostResponse"/> </operation></portType> <binding name="InsurancePlanAdminBinding" type="tns:InsurancePlanAdmin"> <operation name="addDoctors"> <input> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </input> <output> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </output> <soap:operation soapAction=""/></operation> <operation name="createInsurancePlan"> <input> <soap:body encodingStyle= "http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://example.com/ InsurancePlanAdmin"/> </input> <output> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </output> <soap:operation soapAction=""/></operation> <operation name="getAllDoctors"> <input> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </input> <output> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </output> <soap:operation soapAction=""/></operation> <operation name="getPlanInfo"> <input> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </input> <output> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </output> <soap:operation soapAction=""/></operation> <operation name="removeDoctors"> <input> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </input> <output> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </output> <soap:operation soapAction=""/></operation> <operation name="setAgeFactor"> <input> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </input> <output> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </output> <soap:operation soapAction=""/></operation> <operation name="setCoverageFactor"> <input> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </input> <output> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </output> <soap:operation soapAction=""/></operation> <operation name="setSmokerCost"> <input> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </input> <output> <soap:body encoding use="encoded" namespace="http://example.com/InsurancePlanAdmin"/> </output> <soap:operation soapAction=""/></operation> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /></binding> <service name="InsurancePlanAdminService"> <port name="InsurancePlanAdminPort" binding="tns:InsurancePlanAdminBinding"> <soap:address location= "http://www.example.com/star/InsurancePlanAdmin"/></port> </service> </definitions>

Категории