When you want to use a Web service that accesses RepositoryItems
, you can create a mechanism for translating foreign content into different formats:
A serializer will convert content from a native format into XML that will eventually undergo another conversion into a
RepositoryItem
. You need to create a serializer for “set” operations in which the client sends content to the Web service in the context of the call.A deserializer constructs XML content that was originally formatted as
RepositoryItems
into a native content format. You need to create a deserializer for “get” operations in which a Web call returns content that represents aRepositoryItem
.
Both a serializer and a deserializer will need to understand the RepositoryItem
schema. When you create the XML schema and a mapping file, you’ll need some information about the Web service itself. You can find that information in the sections that describe the Web service:
For
getProfile
, see the ATG Personalization Programming Guide.For
getOrderAsXML
,getOrdersAsXML
,getProductXMLById
,getProductXMLByDescription
,getProductXMLByRQL
,getProductSkusXML
,getPromotionAsXML
, see the ATG Commerce Programming Guide.For Repository Web services , see the ATG Repository Guide.
Two Repository Web services, getRepositoryItem
and performRQLQuery
, require a serializer and deserializer, but they can apply to any RepositoryItems
you choose, which is different from the other Web services that are only available to specific RepositorityItems
and item descriptors.
The serializers and deserializers you create require a Repository schema, which you can create by following these steps:
Create a Mapping file that determines which
RepositoryItem
properties will be captured by the Web Service and returned by the call. See Creating a Mapping File.Use the
generateXMLSchema
tool to convert theRepositoryItem
class into a standard XML schema. See Generating an XML Schema.Insert a reference to the XML schema in your instance document, which is a document that represents an instance of the Web service call. You complete this step when you configure the client stub; see Creating and Compiling a Client Stub for instructions.