Member Web service

Posted by Unknown on

Here are 3 simple steps to give you a head start with WCS member Web services, once you understand the input/output request format for a Web service it will be easy to build an external application which can consume these services.

Step 1:  Load the service definition WSDL in SOAP UI project 




Step 2: Review the Nouns to look for actions they support.

Member service support 3 types of Nouns

a)Person http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.services.doc/Member/Person/noun.htm

b)Organization
http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.services.doc/Member/Organization/noun.htm

c)MemberGroup
http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.services.doc/Member/MemberGroup/noun.htm

Step 3: Review the corresponding actions Request/Response XML

E.g let's say we want to use "Authentication" webservice
Following is a sample XML
http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.services.doc/Member/Person/AuthenticatePassword_Req.xml

Use this to build the corresponding request for the action in SOAP UI project


Request XML:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:Security 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
</soapenv:Header>

<soapenv:Body>
<_mbr:ProcessPerson releaseID="9.0" versionID="7.0.0.0" 
xmlns:_mbr="http://www.ibm.com/xmlns/prod/commerce/9/member" 
xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation" 
xmlns:oa="http://www.openapplications.org/oagis/9" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  
  <oa:ApplicationArea xsi:type="_wcf:ApplicationAreaType">
    <oa:CreationDateTime>2012-08-11T03:48:15.340Z</oa:CreationDateTime>
    <oa:BODID></oa:BODID>
    <_wcf:BusinessContext>
      <_wcf:ContextData name="currency">USD</_wcf:ContextData>
      <_wcf:ContextData name="catalogId">10301</_wcf:ContextData>
      <_wcf:ContextData name="langId">-1</_wcf:ContextData>
      <_wcf:ContextData name="locale">en_US</_wcf:ContextData>
      <_wcf:ContextData name="storeId">10951</_wcf:ContextData>
    </_wcf:BusinessContext>
  </oa:ApplicationArea>
  <_mbr:DataArea>
    <oa:Process>
      <oa:ActionCriteria>
        <oa:ActionExpression actionCode="AuthenticatePassword" expressionLanguage="_wcf:XPath"/>
      </oa:ActionCriteria>
    </oa:Process>
    <_mbr:Person>
      <_mbr:Credential>
        <_mbr:LogonID>test_user2</_mbr:LogonID>
        <_mbr:Password>XXXXXXX</_mbr:Password>
      </_mbr:Credential>
      <_mbr:PersonalProfile/>
      <_mbr:ContactInfo>
        <_wcf:ContactInfoIdentifier>
          <_wcf:ExternalIdentifier/>
        </_wcf:ContactInfoIdentifier>
        <_wcf:Address/>
      </_mbr:ContactInfo>
    </_mbr:Person>
  </_mbr:DataArea>
</_mbr:ProcessPerson>
</soapenv:Body>
</soapenv:Envelope>


Response XML:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <_mbr:AcknowledgePerson releaseID="9.0" xmlns:_mbr="http://www.ibm.com/xmlns/prod/commerce/9/member" xmlns:_wcf="http://www.ibm.com/xmlns/prod/commerce/9/foundation" xmlns:oa="http://www.openapplications.org/oagis/9">
         <oa:ApplicationArea xsi:type="_wcf:ApplicationAreaType">
            <oa:CreationDateTime>2012-08-11T03:55:05.273Z</oa:CreationDateTime>
            <oa:BODID>55785940-e368-11e1-877c-843f5025cded</oa:BODID>
         </oa:ApplicationArea>
         <_mbr:DataArea>
            <oa:Acknowledge>
               <oa:OriginalApplicationArea>
                  <oa:CreationDateTime>2012-08-11Z</oa:CreationDateTime>
                  <oa:BODID/>
               </oa:OriginalApplicationArea>
            </oa:Acknowledge>
            <_mbr:Person>
               <_mbr:PersonIdentifier>
                  <_wcf:UniqueID>3014</_wcf:UniqueID>
               </_mbr:PersonIdentifier>
               <_mbr:Credential>
                  <_wcf:UserData>
                     <_wcf:UserDataField name="identityTokenID">51560</_wcf:UserDataField>
                     <_wcf:UserDataField name="identityTokenSignature">6Kw5LWr1d0ZfSLba0d1IBVvjVzE=</_wcf:UserDataField>
                  </_wcf:UserData>
               </_mbr:Credential>
            </_mbr:Person>
         </_mbr:DataArea>
      </_mbr:AcknowledgePerson>
   </soapenv:Body>
</soapenv:Envelope>



3 comments:

  1. What if we want to do the subsequent request, let say I want to call getPerson?

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Cleaning can help us to lead a healthy and happy life by secure us from several kinds of disease. And our house also looks fascinating. The people who are busy with their daily routines for them this cannot be an easy task. For that HausmeisterService in Offenburg (Housemaster service) company 1A facility can help you to keep your house neat and clean. They can provide you all kinds of necessary services for your house from top to bottom. Our recommendations are dedicated to helping you with guidance, affordable installation, and customer-focused finance.

    ReplyDelete