Posts

Showing posts from December, 2014

Service Oriented Integration (SOI) - Websphere Commerce Web Services

Image
Service Oriented Integration (SOI) - Websphere Commerce Web Services As part of the WebSphere Commerce transition to SOA, there is an effort to decouple components to allow re-use of WebSphere Commerce business services in other environments besides the WebSphere Commerce application. In order to support this decoupling, the core infrastructure is the first piece that needs to run independently so it can be leveraged in other environments as well. The request handling has changed to create a lightweight runtime environment that new and existing components can use. This lightweight runtime focuses on the processing of business object documents (BODs). This new architecture paves the road to SOA adoption by standardizing on how clients will talk with SOA components. WebSphere Commerce now provides 4 SOI service modules -- logical groupings of business objects that have been grouped to standardize communication. These service modules are: Member Order Catalog Contract The

BOD and SOI

BOD   BOD uses pattern matching and DSL to the enter the database SOI  SOI uses controller commands\data beans \access beans. Two ways to customize SOI :  1. One way is to take advantage of the UserData hooks within the existing types to pass unstructured      information. 2. The other way is to use the Overlay methodology. The limitation of this method is UserData provides the ability to pass name-value pairs only. Overlays , a part of the OAGIS model, extend complex types similar to the inheritance model in Java. Within the Overlay model, you extend your complex type defined within the noun and generate Java code to represent that complex type. More specifically, where you referenced the default WebSphere Commerce version of the complex type, you reference your new version of the complex type and substitute it in. Within the client server framework, when the complex type is sent from the client to the server the business logic retrieves your version of the extended

Pass an extra parameter to store Custom data while add to cart by using UserData Noun extenstion (SOI based Service)

Image
Pass an extra parameter to store Custom data while add to cart  by using UserData Noun extenstion (SOI based Service) Step1: Register your new Client API Open struts-config-ext.xml. Copy the following text into the bottom of the file, before the </struts-config> tag: <plug-in className="com.ibm.commerce.struts.ComponentPlugIn"> <set-property property="componentId" value="order"/> <set-property property="clientFacadeClassName" value="com.mycompany.commerce.customization.order.ExtendedOrderFacadeClient"/> </plug-in> step 2:  Write the new client class which extends  OrderFacadeClient.Modified to send the value of field1 as part of the BOD request using userdata using field1  column public class ExtendedOrderFacadeClient extends OrderFacadeClient {      protected com.ibm.commerce.order.facade.datatypes.OrderType buildOrder(Map parameters,      String actionName)  throws Or

Debugging access control policy

Image
Complete flow http://www.ibm.com/developerworks/websphere/library/techarticles/0805_callaghan/0805_callaghan.html For a new view  Policy xml <Action Name="MyNewView"  CommandName="MyNewView">  </Action>  <ActionGroup Name="AllSiteUsersViews" OwnerID="RootOrganization">  <ActionGroupAction Name="MyNewView"/> </ActionGroup> By Query, you can check :  select ACACTION_ID from ACACTION where ACTION = 'MyNewView' select acactgrp_id from acactactgp where acaction_id in (select ACACTION_ID from ACACTION  where ACTION = 'MyNewView') select distinct acpolicy_id from acpolicy where acactgrp_id in (select acactgrp_id  from acactactgp where acaction_id  in (select ACACTION_ID from ACACTION where ACTION = 'MyNewView')) For Commands Policy File <ResourceCategory Name="com.yourcompany.MyOrderItemAddCmdCategory"