Thursday, November 13, 2014

OverRide OOB outbound order XML to write to a table !!

If we need OverRide OOB outbound order XML process to write to a table, please find the below steps:

1. Create an EJB for a custom table XOrderTransfer table.
2. Override wc-component-client.xml as mentioned below
3. Override class as mentioned below.
4. In WC adminconsole, set up a broadcast job for the command "RaiseECEvent"

OverRide XML:
C:\IBM\WCDE_ENT70\workspace\WC\xml\config\com.ibm.commerce.order.external-ext\wc-component-client.xml

<_config:DevelopmentClientConfiguration xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-component-client.xsd">
<_config:invocationservice>

<_config:invocationbinding
bindingImpl="com.custom.commerce.foundation.internal.client.services.invocation.impl.CustomJCAInvocationBindingImpl">
</_config:invocationbinding>

<_config:action name="ProcessOrder" asynchronous="false">
</_config:action>

</_config:invocationservice>
</_config:DevelopmentClientConfiguration>


public class CustomJCAInvocationBindingImpl extends JCAInvocationBindingImpl implements InvocationBinding {

public InvocationServiceObject invoke(Action action, InvocationServiceObject requestDataObject) throws InvocationServiceException {
final String methodName = "invoke";
LOGGER.entering(CLASSNAME, methodName);
String inputXML = new String(requestDataObject.getXML());
//get the orderId from the request data object
ProcessOrderType processOrderType = (ProcessOrderType) requestDataObject.getDataObject();
OrderType currentOrder = (OrderType)processOrderType.getDataArea().getOrder().get(0);
String orderId = currentOrder.getOrderIdentifier().getUniqueID();
Long orderIdLong = new Long(orderId);

//persist the order XML in the XORDERTransfer table.
XOrderTransferAccessBean orderTransferAB = new XOrderTransferAccessBean(orderIdLong, inputXML);
orderTransferAB.setInsertedTime(TimestampHelper.now());
orderTransferAB.setProcessedFlag('0');
orderTransferAB.commitCopyHelper();

//invoke super class's implementation for actual message transfer
InvocationServiceObject invocationServiceObject = super.invoke(action, requestDataObject);

LOGGER.exiting(CLASSNAME, methodName);
return invocationServiceObject;
}

13 comments:

  1. The standard span of these credits is only fourteen days and such advances are taken to meet costs till the following payday. These sorts of advances are commonly include little sums running from £500 to about £1000. Payday credits are otherwise called loan and the financing cost is on the higher side.

    ReplyDelete
  2. In addition, this advance office is generally served under the classification of unsecured advance, where the borrower appreciates the opportunity of no security accommodation.

    ReplyDelete
  3. To the extent the reimbursement is concerned, the borrower require just present a post dated check to the moneylender at the season of credit endorsement.

    ReplyDelete
  4. When it comes time to pay your duties, you require that cash now, since Uncle Sam isn't the sort to take pardons.

    ReplyDelete
  5. Looking for a dependable source is a sorry bother with this credit design as the significant hazard factor is on the moneylender's side.

    ReplyDelete
  6. Buenas!! que interesante tu artículo, ha sido una información muy útil que estoy segura que usaré. Estoy deseando que subas nuevo contenido pronto. saludos <3

    ReplyDelete
  7. Que buen blog tenéis, me encanta leer todos vuestros artículos es de los mejores blog. Además son super útiles y claros.

    ReplyDelete
  8. Es un blog muy interesante, me ha gustado mucho leerlo, ya que puede ser algo de gran utilidad para poner en práctica.

    ReplyDelete
  9. Enhorabuena por el artículo, muy buena redacción, se nota claramente que le pones esfuerzo y ganas.

    ReplyDelete
  10. Muy buen post, gracias por compartir esta información, sin duda seguiré esperando a que subas más contenido.

    ReplyDelete
  11. Muy chulo el artículo, contiene información muy interesante, gracias por tu interés.

    ReplyDelete
  12. Me encanta todo lo que cuentas en el post, es muy interesante y me encantaría que explicaras más sobre el tema.

    ReplyDelete
  13. No es lo que buscaba en estos momentos, pero me he parado a leerlo y me ha interesado más de lo que me esperaba , muchísimas gracias.

    ReplyDelete