Global vs. per-profile WSDLs

When viewing search WSDLs, you have the option of requesting a WSDL specific to a single profile, or a global All Profiles WSDL, which can be used for any profile.

If you do not make use of Additional Fields, then there will be no difference between per-profile and global WSDLs.

Both per-profile and global WSDLs refer to the same search interface. The same SOAP response is generated for both WSDLs. The only difference is in how specific the WSDLs are - per-profile WSDLs specify which Additional Fields occur in the results, but the global WSDL must use <xsd:any> as a catch-all, as the Additional Fields may change from one profile to another.

Which you use is a trade-off that you must decide on.

  • per-profile WSDLs

    • Advantage Additional Fields for the profile are "hard-coded" in the WSDL itself, so a SOAP client consuming the WSDL can make better use of the Additional Fields.

      For example, if your profile has Additional Fields called price and location, then a per-profile WSDL will specify that each result contains <price> and <location> elements. WSDL tools can do things like declare response.price and response.location variables.

    • Disadvantage Because the per-profile WSDL is specific to that profile's Additional Fields, a different WSDL must be used for every profile you want to interact with. If you're interacting with many different profiles (or it often changes), an global WSDL may be better suited.

  • Global WSDLs

    • Advantage The All Profiles wsdl can be used for any profile. This is better if your application needs to query multiple profiles, or if you don't work with Additional Fields.

    • Disadvantage Additional Fields are represented in the All Profiles WSDL with <xsd:any>, which allows it to not declare which Additional Fields will occur in the XML (as it may change from one profile to another).

      This means that programs consuming the WSDL cannot know which Additional Fields will be returned, and will instead do things like offer an array of Additional Field XML elements that you must manually loop over to find the ones you want.


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.