Topic
12 replies Latest Post - ‏2014-10-17T07:39:02Z by mjuneja
SLKP
SLKP
61 Posts
ACCEPTED ANSWER

Pinned topic BOD and REST

‏2012-10-07T08:14:44Z |
Hi All,

Im new to REST webservices..So can any one of you help me to sort out the difference between SOI and REST..As per my understanding ,Component Services are classified into SOI and BOD..SOI is using SOAP protocol for communication between services, and REST architecture is based on BOD framework like Nouns and verbs..SOI is based on command framework and Rest on BOD framwork..Is this understanding right?

ALso Rest is mainly used to access a resource like data..eg:getting a username based on a userid and SOAP is mainly for performing an Operation on that data..

Anyone please provide a clear picture based on this input..
Thanks in Advance.
Updated on 2013-02-11T17:16:20Z at 2013-02-11T17:16:20Z by SLKP
  • WenjianQiao
    WenjianQiao
    1 Post
    ACCEPTED ANSWER

    Re: BOD and REST

    ‏2012-10-08T12:44:38Z  in response to SLKP
    WebSphere Commerce REST services are based on component services including both SOI based and BOD based services.

    REST services can be used to create, read, update, and delete resources. You can call REST services to perform operations on a resource such as registering a shopper, adding a product item to your shopping cart, submitting your order and so on.

    InfoCenter has a list of REST services at http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.starterstores.doc/concepts/cwvrestapi.htm.
    • balusethuraman
      balusethuraman
      117 Posts
      ACCEPTED ANSWER

      Re: BOD and REST

      ‏2012-11-10T06:26:01Z  in response to WenjianQiao
      Hi,
      I am new to REST services. I did some R&D and understood some things about REST. My requirement is to fetch the data from database based on the given category ID or searchterm. For this I could find 'ProductViewHandler service' which uses catalog navigation view noun.
      When I hit this URl,
      http:localhost/wcs/resources/store/11051/productview/bySearchTerm/sofa?responseFormat=xml&minprice=100&maxprice=200

      it is fetching the details of 'sofa' with price range between 100 to 200 in a XML format.
      Now I want to fetch the details of multiple categories like sofa, table, lamp, etc at a single go. How to do this?? Is there any inbuilt services present in wcs7 or we need to customize the REST service?? If we need to customize then how to customize it?? Expecting your help.. Thanks in advance.
      • SystemAdmin
        SystemAdmin
        8614 Posts
        ACCEPTED ANSWER

        Re: BOD and REST

        ‏2012-11-15T19:22:37Z  in response to balusethuraman
        If you're using the Solr search you might want to do that there directly with your own service. I like the BOD services for some things, but what you're doing is going to have huge overhead and be unusable if it's going to be hit a lot of times (anything not administrative) Otherwise if you're using Endeca you might hit that directly likewise. I think it would be required to understand what you're doing. In addition the REST services released in the most recent WC7 feature/fix packs are built on top of BOD services and I personally would rather do a direct JSON XML over HTTP web service for what you're outlining for best performance at high velocity.

        geo

        George Niece
        WebSphere Commerce Jedi Master
        IBM Champion for WebSphere
        eGlobal Solutions
        http://www.eGlobal-Sol.com
        Twitter: @WebSphrCommerce
        • balusethuraman
          balusethuraman
          117 Posts
          ACCEPTED ANSWER

          Re: BOD and REST

          ‏2012-11-19T13:29:56Z  in response to SystemAdmin
          Hi,
          We need to customize findbySearchTerm rest service. We need to pass multiple values for a search term (like lamp,sofa,table,etc.)is our requirement.

          http://localhost/wcs/resources/store/11151/productview/bySearchTerm/lamp?responseFormat=xml

          We want to know how findbySearchTerm works exactly.We searched and found the Xpath expression for findbySearchTerm from get-data-config.xml as,

          {_wcf.ap=IBM_Store_CatalogEntrySearch;_wcf.search.profile=IBM_findCatalogEntryByName;_wcf.search.category=10002;_wcf.search.type=0;_wcf.search.sort='$orderBy$';_wcf.search.source=0;_wcf.search.facet='$facet$';_wcf.search.exclude.facet='$filterFacet$';_wcf.search.meta='$metaData$'}/CatalogNavigationView

          The Xpath key for the Xpath expression is "/CatalogNavigationView" which doesn't contain any identifer. In this case, the xpath key will be mapped to CatalogNavigationView.xsd is what our assumption. If our assumption is right then can we create new xsd file and map that with xpath key??
  • SLKP
    SLKP
    61 Posts
    ACCEPTED ANSWER

    Re: BOD and REST

    ‏2013-02-09T22:21:51Z  in response to SLKP
    Hi I need a help for mapping Rest request to BOD in the case of overlays..Here Im extending OrderNoun's orderItemType to ORderExtItemType so as to add a attribute Registry.. In rest-cart-client-objects.xml, if i want to include this new element so as to get the value in my customised controller command's request properties,what should I do?

    I tried this way,but not working
    <_config:URLParameter name="orderItem/registry" nounElement="/OrderItem/Registry" key="true" return="true" />
    Is configNoundefinition tag has any significance on this?
    • SystemAdmin
      SystemAdmin
      8614 Posts
      ACCEPTED ANSWER

      Re: BOD and REST

      ‏2013-02-11T15:36:23Z  in response to SLKP
      Include as UserData as specified in the rest-cart-client-objects.xml.

      {
      "orderItem": [
      {
      "productId": "3191367",
      "quantity": "1.0",
      "xitem_price": "129.0"
      }
      ],
      "x_catalogId": "354545"

      }

      two userdata will be passed to the command as NVP (price=129,catalog_id=354545)
  • SLKP
    SLKP
    61 Posts
    ACCEPTED ANSWER

    Re: BOD and REST

    ‏2013-02-11T17:16:20Z  in response to SLKP
    Thanks Abdul..
    But my need is to get it using Overlays..With userdata it was working fine..But my requirement is to use Overlays as the new elements added to the extended xsd are the logical parts of Order Noun..

    Is there any way to get it using Rest-cart-client-object.xml other than building the noun using overlay as OOB does??
    Thanks
  • mjuneja
    mjuneja
    3 Posts
    ACCEPTED ANSWER

    Re: BOD and REST

    ‏2014-10-01T11:43:14Z  in response to SLKP

    Hi

    I want to save one extra field on ADDRESS capture JSP. I want to use field1 in address table for this. What steps should i follow to save new value to field1.  Which customizations should i do to existing BOD/REST framework.

     

     

    Thanks

    Meenu

    Updated on 2014-10-01T11:53:49Z at 2014-10-01T11:53:49Z by mjuneja
    • chetan_raju
      chetan_raju
      6 Posts
      ACCEPTED ANSWER

      Re: BOD and REST

      ‏2014-10-02T05:16:26Z  in response to mjuneja

      You can have a hidden field in your JSP as below. Rest is taken care automatically.

      <input type="hidden" name="addressField1" value="custom_data" id="address_field1" />

      • mjuneja
        mjuneja
        3 Posts
        ACCEPTED ANSWER

        Re: BOD and REST

        ‏2014-10-02T17:54:54Z  in response to chetan_raju

        Thanks a lot. This has resolved my issue.   I want to understand where this mapping is defined. Can u please explain me the flow in short?

        • chetan_raju
          chetan_raju
          6 Posts
          ACCEPTED ANSWER

          Re: BOD and REST

          ‏2014-10-06T04:48:35Z  in response to mjuneja

          Following are the details of the mapping

          http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.services.doc/refs/rmsmemberlogicalschema.htm?lang=en

          Regards,
          Chetan

          • mjuneja
            mjuneja
            3 Posts
            ACCEPTED ANSWER

            Re: BOD and REST

            ‏2014-10-06T07:35:58Z  in response to chetan_raju

            Thanks a lot :)

             

            • This reply was deleted by SystemAdmin 2014-10-16T18:16:32Z.
            • mjuneja
              mjuneja
              3 Posts
              ACCEPTED ANSWER

              Address Validation Third Party

              ‏2014-10-08T09:54:00Z  in response to mjuneja

              Hi

              I have to do SOAP based integration with third party for Address Validation.   Can someone provide a good tutorial.

               

              Thanks

              Meenu

            • mjuneja
              mjuneja
              3 Posts
              ACCEPTED ANSWER

              Re: BOD and REST

              ‏2014-10-17T07:39:02Z  in response to mjuneja

              Hi

              I am working on Guest Checkout. I want to call my command instead of oob service for capturing billing/shipping address details. I have extended AddressAddCmd  . It works fine when i call service in service declaration JS,for saving details, But when i change URL to my new command that is mapped to AddressAddCmd  interface,   and submit the form, it says

              com.ibm.commerce.browseradapter.HttpBrowserAdapter preInvokeCommand(ViewCommandContext, HttpRequestAttributes) CMN1091E: The customer did not log on to the system.

               

              Can someone guide me what should i do???

              Thanks

              Meenu