[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Should the 'interface' attribute of interface.wsdl point to the portTypeURI?
Currently the interface attribute of the interface.wsdl element points to the URI of the portType in the WSDL definitions file. There must be a good reason for this. I'm looking at writing functions to attach policySets to interface elements and it would be better if the attribute pointed to the file itself. WSDL 1.1 Element Identifiers: http://www.w3.org/TR/wsdl11elementidentifiers specifies how to identify individual interface elements in a WSDL 1.1 file using fragment identifiers following the URI of the definitions file. The following example is taken from that document. Assume that the URI of the definitions file is: :http://example.org/TicketAgent.wsdl11 The URI for the portType is: http://example.org/TicketAgent.wsdl11#wsdl11.portType(TicketAgent) Now, if you want to refer to a particular message you need tosay: http://example.org/TicketAgent.wsdl11#wsdl11.portTypeOperation.output(TicketAgent/listFlights) Construction the identifier for the message seems more complicated than if you started with the URI for the file itself. ======================================================================= Example: Consider WSDL 1.1 document located at http://example.org/TicketAgent.wsdl. Each WSDL 1.1 Element Identifier is shown in comments above the WSDL 1.1 element <!-- http://example.org/TicketAgent.wsdl11#wsd11.definitions() --> <wsdl:types> <xs:schema xmlns:xsTicketAgent="http://example.org/TicketAgent.xsd" targetNamespace="http://example.org/TicketAgent.xsd"> <xs:element name="listFlightsRequest" type="xsTicketAgent:tListFlights"/> <xs:complexType name="tListFlights"> <xs:sequence> <xs:element name="travelDate" type="xs:date"/> <xs:element name="startCity" type="xs:string"/> <xs:element name="endCity" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:element name="listFlightsResponse" type="xsTicketAgent:tFlightsResponse"/> <xs:complexType name="tFlightsResponse"> <xs:sequence> <xs:element name="flightNumber" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types> <wsdl:message name="listFlightsRequest"> <!-- Starting from here, http://example.org/TicketAgent.wsdl11 will be shortened to http://... --> <!-- http://...#wsdl11.message(listFlightsRequest) --> <wsdl:part name="body" element="xsTicketAgent:listFlightsRequest"/> <!-- http://...#wsdl11.messagePart(listFlightsRequest/body) --> </wsdl:message> <wsdl:message name="listFlightsResponse"> <!-- http://...#wsdl11.message(listFlightsResponse) --> <wsdl:part name="body" element="xsTicketAgent:listFlightsResponse"/> <!-- http://...#wsdl11.messagePart(listFlightsResponse/body) --> </wsdl:message> <wsdl:portType name="TicketAgent"> <!-- http://...#wsdl11.portType(TicketAgent) --> <wsdl:operation name="listFlights"> <!-- http://...#wsdl11.portTypeOperation(TicketAgent/listFlights) --> <wsdl:input message="tns:listFlightsRequest"/> <!-- http://...#wsdl11.portTypeOperation.input(TicketAgent/listFlights) --> <wsdl:output message="tns:listFlightsResponse"/> <!-- http://...#wsdl11.portTypeOperation.output(TicketAgent/listFlights) --> </wsdl:operation> </wsdl:portType> <wsdl:binding name="TicketAgentSoap" type="tns:TicketAgent"> <!-- http://...#wsdl11.binding(TicketAgentSoap) --> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <!-- http://...#wsdl11.extension(http://schemas.xmlsoap.org/wsdl/soap/, w11soap.binding( wsdl11.binding(TicketAgentSoap)) --> <wsdl:operation name="listFlights"> <!-- http://...#wsdl11.bindingOperation(TicketAgentSoap/listFlights) --> <wsdl:input> <!-- http://...#wsdl11.bindingOperation.input(TicketAgentSoap/listFlights) --> <soap:body parts="body" use="literal"/> <!-- http://...#wsdl11.extension(http://schemas.xmlsoap.org/wsdl/soap/, w11soap.body(wsdl11.bindingOperation.input (TicketAgentSoap/listFlights)) --> </wsdl:input> <wsdl:output> <!-- http://...#wsdl11.bindingOperation.output(TicketAgentSoap/listFlights) --> <soap:body parts="body" use="literal"/> <!-- http://...#wsdl11.extension(http://schemas.xmlsoap.org/wsdl/soap/, w11soap.body(wsdl11.bindingOperation.output (TicketAgentSoap/listFlights)) --> </wsdl:output> </wsdl:operation> </wsdl:binding> -- All the best, Ashok
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]