locked
SOA naming guidelines RRS feed

  • Question

  • Im currently trying to establish naming guidelines for WebServices that will connect two words: world of Microsoft and world o Java.

    Everything is clear to me but: first letter of field name, should it be uppercase?

     

    Following code is taken from amazon's wsdl:

    -
    Code Snippet
    <xsd:complexType name="ThirdPartyProductDetails">
    - <xsd:all>
      <xsd:element name="OfferingType" type="xsd:string" minOccurs="0" />
      <xsd:element name="SellerId" type="xsd:string" minOccurs="0" />
      <xsd:element name="SellerNickname" type="xsd:string" minOccurs="0" />
      <xsd:element name="ExchangeId" type="xsd:string" minOccurs="0" />
      <xsd:element name="OfferingPrice" type="xsd:string" minOccurs="0" />
      <xsd:element name="Condition" type="xsd:string" minOccurs="0" />
      <xsd:element name="ConditionType" type="xsd:string" minOccurs="0" />
      <xsd:element name="ExchangeAvailability" type="xsd:string" minOccurs="0" />
      <xsd:element name="SellerCountry" type="xsd:string" minOccurs="0" />
      <xsd:element name="SellerState" type="xsd:string" minOccurs="0" />
      <xsd:element name="ShipComments" type="xsd:string" minOccurs="0" />
      <xsd:element name="SellerRating" type="xsd:string" minOccurs="0" />
      </xsd:all>
      </xsd:complexType>
    - <xsd:complexType name="KeywordRequest">
    - <xsd:all>
      <xsd:element name="keyword" type="xsd:string" />
      <xsd:element name="page" type="xsd:string" />
      <xsd:element name="mode" type="xsd:string" />
      <xsd:element name="tag" type="xsd:string" />
      <xsd:element name="type" type="xsd:string" />
      <xsd:element name="devtag" type="xsd:string" />
      <xsd:element name="sort" type="xsd:string" minOccurs="0" />
      <xsd:element name="variations" type="xsd:string" minOccurs="0" />
      <xsd:element name="locale" type="xsd:string" minOccurs="0" />
      </xsd:all>
      </xsd:complexType>

     

    Which complex type is defined right?
    Tuesday, May 15, 2007 10:18 AM

Answers

  • Element names should use Pascal casing (upper case first letter of each word).

    Attribute names should use Camel casing (lowercase first letter of the first word, upper case first letter of all other words.

    See for instance ws-addressing (http://schemas.xmlsoap.org/ws/2004/08/addressing/).
    Tuesday, May 15, 2007 2:31 PM