[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Generic vs Specific WSDL

  • From: David Carver <d_a_carver@y...>
  • To: "xml-dev@l... Developers" <xml-dev@l...>
  • Date: Tue, 27 Feb 2007 15:28:08 -0500

Generic vs Specific WSDL
A question has come up in our organization about implementing SOAP Web 
Services using a generic WSDL (i.e. common endpoint for all services 
with a generic payload), or Specific Services with a specific payload 
schema defined.     The question comes down to can these two type of 
services inter operate with each other.   I know you can make the SOAP 
message that surrounds the payload compatible between the two.   So the 
question comes down to which is fundamentally better to implement, or is 
this really an architecture preference and design?

Included below is a copy of the template WSDL in question that 
implements the generic implementation.  Advantages, disadvantages, 
security problems to this approach???  What additional benefits if any 
does a specific implementation provide, disadvantages.:

<?xml version="1.0"?>
<definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            
 xmlns:tns="http://www.starstandards.org/webservices/2005/10/transport/bindings" 

            
 xmlns:starws="http://www.starstandards.org/webservices/2005/10/transport"
            
 targetNamespace="http://www.starstandards.org/webservices/2005/10/transport/bindings" 

             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns="http://schemas.xmlsoap.org/wsdl/">

    <!-- Types -->

    <types>
        <xsd:schema 
targetNamespace="http://www.starstandards.org/webservices/2005/10/transport" 
elementFormDefault="qualified">

            <!-- Payload -->

            <xsd:complexType name="Payload">
                <xsd:sequence>
                    <xsd:element name="content" type="starws:Content" 
minOccurs="0" maxOccurs="unbounded" />
                </xsd:sequence>
                <xsd:anyAttribute/>
            </xsd:complexType>

            <xsd:complexType name="Content">
                <xsd:sequence>
                    <xsd:any namespace="##any" minOccurs="1" 
maxOccurs="1" />
                </xsd:sequence>
                <xsd:attribute name="id" type="xsd:ID" use="required" />
                <xsd:anyAttribute/>
            </xsd:complexType>


            <!-- Attachment -->

            <xsd:element name="attachment" type="starws:Attachment" />

            <xsd:complexType name="Attachment">
                <xsd:choice minOccurs="1" maxOccurs="1">
                    <xsd:element name="binary" type="starws:BinaryData" />
                    <xsd:element name="text" type="starws:TextData" />
                    <xsd:element name="uriReference" 
type="starws:UriReference" />                    <!-- points to a 
resource at a URI (not embedded nor attached) -->
                    <xsd:element name="attachmentReference" 
type="starws:AttachmentReference" />    <!-- points to a MIME or DIME 
attachment -->
                </xsd:choice>
                <xsd:attributeGroup ref="starws:AttachmentAttributes" />
            </xsd:complexType>

            <xsd:attributeGroup name="AttachmentAttributes">
                <xsd:attribute name="id" type="xsd:ID" use="optional" />
                <xsd:attribute name="mimeCode" type="xsd:token" 
use="optional" />
                <xsd:attribute name="fileName" type="xsd:token" 
use="optional" />
                <xsd:attribute name="dateTime" type="xsd:dateTime" 
use="optional" />
                <xsd:attribute name="size" type="xsd:long" use="optional" />
                <xsd:attribute name="from" type="xsd:string" 
use="optional" />
                <xsd:attribute name="to" type="xsd:string" use="optional" />
                <xsd:attribute name="action" type="xsd:anyURI" 
use="optional" />
            </xsd:attributeGroup>

            <xsd:simpleType name="BinaryData">
                    <xsd:restriction base="xsd:base64Binary"/>
            </xsd:simpleType>

            <xsd:simpleType name="TextData">
                    <xsd:restriction base="xsd:string"/>
            </xsd:simpleType>

            <xsd:complexType name="UriReference">
                <xsd:attribute name="href" type="xsd:anyURI" 
use="required" />
            </xsd:complexType>

            <xsd:complexType name="AttachmentReference">
                <xsd:attribute name="href" type="xsd:anyURI" 
use="required" />
            </xsd:complexType>


            <!-- Manifest -->

            <xsd:element name="payloadManifest" 
type="starws:PayloadManifest" />

            <xsd:complexType name="PayloadManifest">
                <xsd:sequence>
                    <xsd:element name="manifest" type="starws:Manifest" 
minOccurs="0" maxOccurs="unbounded" />
                </xsd:sequence>
            </xsd:complexType>

            <xsd:complexType name="Manifest">
                <xsd:attribute name="contentID" type="xsd:IDREF" 
use="required" />
                <xsd:attribute name="namespaceURI" type="xsd:anyURI" 
use="required" />
                <xsd:attribute name="element" type="xsd:string" 
use="required" />
                <xsd:attribute name="relatedID" type="xsd:string" 
use="optional" />
                <xsd:attribute name="version" type="xsd:string" 
use="optional" />
            </xsd:complexType>


            <!-- Methods -->

            <xsd:element name="ProcessMessage">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="payload" 
type="starws:Payload" minOccurs="0" maxOccurs="1" form="qualified" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="ProcessMessageResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="payload" 
type="starws:Payload" minOccurs="0" maxOccurs="1" form="qualified" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="PutMessage">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="payload" 
type="starws:Payload" minOccurs="0" maxOccurs="1" form="qualified" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="PutMessageResponse">
                <xsd:complexType />
            </xsd:element>

            <xsd:element name="PullMessage">
                <xsd:complexType/>
            </xsd:element>

            <xsd:element name="PullMessageResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="payload" 
type="starws:Payload" minOccurs="0" maxOccurs="1" form="qualified" />
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:schema>
    </types>


    <!-- Messages -->

    <message name="ProcessMessageIn">
        <part name="parameters" element="starws:ProcessMessage" />
    </message>

    <message name="ProcessMessageOut">
        <part name="parameters" element="starws:ProcessMessageResponse" />
    </message>

    <message name="PutMessageIn">
        <part name="parameters" element="starws:PutMessage" />
    </message>

    <message name="PutMessageOut">
        <part name="parameters" element="starws:PutMessageResponse" />
    </message>

    <message name="PullMessageIn">
        <part name="parameters" element="starws:PullMessage" />
    </message>

    <message name="PullMessageOut">
        <part name="parameters" element="starws:PullMessageResponse" />
    </message>

    <message name="ManifestHeader">
        <part name="header" element="starws:payloadManifest" />
    </message>


    <!-- PortTypes -->

    <portType name="starTransportPortTypes">
        <operation name="ProcessMessage">
            <input message="tns:ProcessMessageIn" />
            <output message="tns:ProcessMessageOut" />
        </operation>

        <operation name="PutMessage">
            <input message="tns:PutMessageIn" />
            <output message="tns:PutMessageOut" />
        </operation>

        <operation name="PullMessage">
            <input message="tns:PullMessageIn" />
            <output message="tns:PullMessageOut" />
        </operation>
    </portType>

    <!-- Bindings -->

    <binding name="starTransport" type="tns:starTransportPortTypes">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
style="document" />
        <operation name="ProcessMessage">
            <soap:operation 
soapAction="http://www.starstandards.org/webservices/2005/10/transport/operations/ProcessMessage" 
style="document" />
            <input>
                <soap:header message="tns:ManifestHeader" part="header" 
use="literal" />
                <soap:body use="literal" />
            </input>
            <output>
                <soap:header message="tns:ManifestHeader" part="header" 
use="literal" />
                <soap:body use="literal" />
            </output>
        </operation>
       
        <operation name="PutMessage">
            <soap:operation 
soapAction="http://www.starstandards.org/webservices/2005/10/transport/operations/PutMessage" 
style="document" />
            <input>
                <soap:header message="tns:ManifestHeader" part="header" 
use="literal" />
                <soap:body use="literal" />
            </input>
            <output>
                <soap:body use="literal" />
            </output>
        </operation>
       
        <operation name="PullMessage">
            <soap:operation 
soapAction="http://www.starstandards.org/webservices/2005/10/transport/operations/PullMessage" 
style="document" />
            <input>
                <soap:body use="literal" />
            </input>
            <output>
                <soap:header message="tns:ManifestHeader" part="header" 
use="literal" />
                <soap:body use="literal" />
            </output>
        </operation>
       
    </binding>
</definitions>


Any information would be helpful, particularly articles that discuss 
this topic.

Thanks.

Dave



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.