Steps for creating, deploying, testing and debugging a Consumer BSSV: 1.) Open OMW. 2.) Click on Add. 3.) Select Interactive Application. Create a Form that will call the following BSFN (BOPTKAP –> Acorde Business Function - AP Short). This BSFN contains the logic for calling BSSV. BSFN C File: #include <jde.h> #define boptkap_c /***************************************************************************** * Source File: boptkap * * Description: Acorde Business Function - AP Short Source File * * History: * Date Programmer SAR# - Description * ---------- ---------- ------------------------------------------* Author 8/1/2013 Track 3 Unknown - Created * * Copyright (c) J.D. Edwards World Source Company, 1996 * * This unpublished material is proprietary to J.D. Edwards World Source Company. * All rights reserved. The methods and techniques described herein are * considered trade secrets and/or confidential. Reproduction or * distribution, in whole or in part, is forbidden except by express * written permission of J.D. Edwards World Source Company. ****************************************************************************/ /************************************************************************** * Notes: * **************************************************************************/ #include <boptkap.h> /************************************************************************** * Business Function: PassAPShortToAcorde * * Description: Pass AP Short Structure to Acorde * * Parameters: * LPBHVRCOM lpBhvrCom Business Function Communications * LPVOID lpVoid Void Parameter - DO NOT USE! * LPDSDOPT lpDS Parameter Data Structure Pointer * *************************************************************************/ JDEBFRTN (ID) JDEBFWINAPI PassAPShortToAcorde (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSDOPTKAP lpDS) { #ifdef SOA_ENABLED /************************************************************************ * Variable declarations ************************************************************************/ XRCS_hParser hParser = NULL; XRCS_Status XRCSStatus = XRCS_SUCCESS; XRCS_hDocument hDoc = NULL; XRCS_hDocument hBSSVDoc = NULL; XRCS_hElement hRootElm = NULL; XRCS_hElement *hElm = NULL; unsigned int nElmCount = 0; XRCS_hElement *hChildElms = NULL; unsigned int nChildCount = 0; JCHAR *elmName = NULL; JCHAR *elmValue = NULL; unsigned int i = 0; ID idReturnValue = ER_SUCCESS; JCHAR *bssvPayloadReturn = NULL; JCHAR *newXMLString = NULL; JCHAR *errorText = NULL; JCHAR szSuppressErrorMessage[2]; JCHAR szActionCode[2]; JCHAR szMathToString[18]; PJSTR pEnv = NULL; JCHAR *xmlString = _J("<?xml version=\"1.0\"?>") _J("<Get-Acorde-URLVO>") _J("<username></username>") _J("<screen-name></screen-name>") _J("<map-name></map-name>") _J("<action-code></action-code>") _J("<module></module>") _J("<supplier-number></supplier-number>") _J("<company></company>") _J("<invoice-doc-type></invoice-doc-type>") _J("<invoice-number></invoice-number>") _J("<invoice-amount></invoice-amount>") _J("<invoice-date></invoice-date>") _J("<business-unit></business-unit>") _J("<purchase-order></purchase-order>") _J("<document-number></document-number>") _J("<check-number></check-number>") _J("<check-date></check-date>") _J("<check-amount></check-amount>") _J("<generic-numeric1></generic-numeric1>") _J("<generic-numeric2></generic-numeric2>") _J("<generic-numeric3></generic-numeric3>") _J("<generic-date1></generic-date1>") _J("<generic-date2></generic-date2>") _J("<generic-date3></generic-date3>") _J("<generic-string1></generic-string1>") _J("<generic-string2></generic-string2>") _J("<generic-string3></generic-string3>") _J("<generic-string4></generic-string4>") _J("<generic-string5></generic-string5>") _J("<generic-string6></generic-string6>") _J("<generic-string7></generic-string7>") _J("<generic-string8></generic-string8>") _J("<generic-string9></generic-string9>") _J("<generic-numeric4></generic-numeric4>") _J("<generic-numeric5></generic-numeric5>") _J("<generic-numeric6></generic-numeric6>") _J("<generic-numeric7></generic-numeric7>") _J("<generic-numeric8></generic-numeric8>") _J("<generic-date4></generic-date4>") _J("<generic-date5></generic-date5>") _J("<generic-date6></generic-date6>") _J("<sz-environment></sz-environment>") _J("<sz-acorde-uRL></sz-acorde-uRL>") _J("<CSuppressErrorMessage></CSuppressErrorMessage>") _J("<sz-error-message-id></sz-error-message-id>") _J("<sz-error-message-text></sz-error-message-text>") _J("</Get-Acorde-URLVO>"); /************************************************************************ * Declare structures ************************************************************************/ DSDE954000 dsDE954000 = {0}; /************************************************************************ * Declare pointers ************************************************************************/ /************************************************************************ * Check for NULL pointers ************************************************************************/ if ((lpBhvrCom == (LPBHVRCOM) NULL) || (lpVoid == (LPVOID) NULL) || (lpDS == (LPDSDOPTKAP) NULL)) { jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL); return ER_ERROR; } /************************************************************************ * Set pointers ************************************************************************/ /************************************************************************ * Main Processing ************************************************************************/ jdeStrcpy((JCHAR *)lpDS->szErrorMessageId,(const JCHAR *)_J(" ")); jdeStrcpy((JCHAR *)lpDS->szErrorMessageText,(const JCHAR *)_J(" ")); /* Initialize Xerces Engine */ XRCSStatus = XRCS_initEngine(); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_initEngine failed")); return ER_ERROR; } /* Get the Xerces Parser */ XRCSStatus = XRCS_getParser(&hParser); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getParser failed")); XRCS_terminateEngine(); return ER_ERROR; } /* Parse the XML String */ XRCSStatus = XRCS_parseXMLString(hParser, xmlString, &hDoc); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_parseXMLString failed")); XRCS_freeParser(hParser); XRCS_terminateEngine(); return ER_ERROR; } /* Get Root Element */ XRCSStatus = XRCS_getDocumentElement(hDoc,&hRootElm); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getDocumentElement failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_terminateEngine(); return ER_ERROR; } /* Get the User Name value element and set its value to passed in User Name parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("username"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0], lpDS->Username); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Screen Name value element and set its value to passed in Screen Name parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("screen-name"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->ScreenName); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Map Name value element and set its value to passed in Map Name parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("map-name"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->MapName); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Action Code value element and set its value to passed in Action Code parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("action-code"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } else { if (lpDS->ActionCode == _J('1')) { lpDS->ActionCode = _J('R'); } else if (lpDS->ActionCode == _J('2')) { lpDS->ActionCode = _J('P'); } } szActionCode[0] = lpDS->ActionCode; szActionCode[1] = 0; XRCSStatus = XRCS_setElementText(hElm[0],szActionCode); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Module value element and set its value to passed in Module parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("module"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->Module); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Supplier Number value element and set its value to passed in Supplier Name parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("supplier-number"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->SupplierNumber)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->SupplierNumber); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Company value element and set its value to passed in Company parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("company"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->Company); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Invoice Doc Type value element and set its value to passed in Invoice Doc Type parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("invoice-doc-type"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->InvoiceDocType); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Invoice Number value element and set its value to passed in Invoice Number parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("invoice-number"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->InvoiceNumber); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Invoice Amount value element and set its value to passed in Invoice Amount parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("invoice-amount"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->InvoiceAmount)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->InvoiceAmount); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Invoice Date value element and set its value to passed in Invoice Date parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("invoice-date"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setJDEDateElementValue(hRootElm, hElm[0], &lpDS->InvoiceDate); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Business Unit value element and set its value to passed in Business Unit parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("business-unit"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->BusinessUnit); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Purchase Order value element and set its value to passed in Purchase Order parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("purchase-order"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->PurchaseOrder); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Document Number value element and set its value to passed in Document Number parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("document-number"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->DocumentNumber)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->DocumentNumber); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Check Number value element and set its value to passed in Check Number parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("check-number"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->CheckNumber)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->CheckNumber); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Check Date value element and set its value to passed in Check Date parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("check-date"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setJDEDateElementValue(hRootElm, hElm[0], &lpDS->CheckDate); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Check Amount value element and set its value to passed in Check Amount parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("check-amount"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->CheckAmount)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->CheckAmount); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Numeric 1 value element and set its value to passed in Generic Numeric 1 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-numeric1"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->GenericNumeric1)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->GenericNumeric1); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Numeric 2 value element and set its value to passed in Generic Numeric 2 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-numeric2"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->GenericNumeric2)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->GenericNumeric2); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Numeric 3 value element and set its value to passed in Generic Numeric 3 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-numeric3"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->GenericNumeric3)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->GenericNumeric3); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Date 1 value element and set its value to passed in Generic Date 1 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-date1"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setJDEDateElementValue(hRootElm, hElm[0], &lpDS->GenericDate1); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Date 2 value element and set its value to passed in Generic Date 2 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-date2"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setJDEDateElementValue(hRootElm, hElm[0], &lpDS->GenericDate2); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Date 3 value element and set its value to passed in Generic Date 3 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-date3"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setJDEDateElementValue(hRootElm, hElm[0], &lpDS->GenericDate3); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 1 value element and set its value to passed in Generic String 1 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string1"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString1); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 2 value element and set its value to passed in Generic String 2 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string2"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString2); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 3 value element and set its value to passed in Generic String 3 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string3"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString3); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 4 value element and set its value to passed in Generic String 4 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string4"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString4); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 5 value element and set its value to passed in Generic String 5 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string5"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString5); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 6 value element and set its value to passed in Generic String 6 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string6"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString6); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 7 value element and set its value to passed in Generic String 7 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string7"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString7); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 8 value element and set its value to passed in Generic String 8 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string8"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString8); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic String 9 value element and set its value to passed in Generic String 9 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-string9"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->GenericString9); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Numeric 4 value element and set its value to passed in Generic Numeric 4 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-numeric4"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->GenericNumeric4)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->GenericNumeric4); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Numeric 5 value element and set its value to passed in Generic Numeric 5 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-numeric5"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->GenericNumeric5)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->GenericNumeric5); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Numeric 6 value element and set its value to passed in Generic Numeric 6 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-numeric6"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->GenericNumeric6)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->GenericNumeric6); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Numeric 7 value element and set its value to passed in Generic Numeric 7 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-numeric7"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->GenericNumeric7)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->GenericNumeric7); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Numeric 8 value element and set its value to passed in Generic Numeric 8 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-numeric8"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } /* Math Numeric to String, Convert */ jdeStrncpyTerminate( szMathToString , _J("") ,DIM( szMathToString )); if(MathZeroTest(&lpDS->GenericNumeric8)!= 0) { FormatMathNumeric((JCHAR*)szMathToString,&lpDS->GenericNumeric8); } XRCSStatus = XRCS_setElementText(hElm[0],szMathToString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Date 4 value element and set its value to passed in Generic Date 4 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-date4"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setJDEDateElementValue(hRootElm, hElm[0], &lpDS->GenericDate4); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Date 5 value element and set its value to passed in Generic Date 5 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-date5"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setJDEDateElementValue(hRootElm, hElm[0], &lpDS->GenericDate5); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Generic Date 6 value element and set its value to passed in Generic Date 6 parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("generic-date6"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } XRCSStatus = XRCS_setJDEDateElementValue(hRootElm, hElm[0], &lpDS->GenericDate6); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Environment value element and set its value to passed in Environment parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("sz-environment"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } else { if (jdestrcmpwithnull(lpDS->szEnvironment,_J(" "))==0 || jdestrcmpwithnull(lpDS>szEnvironment,_J(""))==0) { pEnv = JDB_GetEnvironment(NULL); jdeStrncpy(lpDS->szEnvironment, pEnv, DIM(lpDS->szEnvironment)); } /* if(jdestrcmpwithnull(lpDS->szEnvironment,_J("JPD910"))==0 || jdestrcmpwithnull(lpDS>szEnvironment,_J("PD910"))==0) { jdeStrncpyTerminate( lpDS->szEnvironment , _J("PROD") ,DIM( lpDS->szEnvironment)); } else if(jdestrcmpwithnull(lpDS->szEnvironment,_J("JPY910"))==0 || jdestrcmpwithnull(lpDS>szEnvironment,_J("PY910"))==0 || jdestrcmpwithnull(lpDS->szEnvironment,_J("JQA910"))==0 || jdestrcmpwithnull(lpDS>szEnvironment,_J("QA910"))==0 || jdestrcmpwithnull(lpDS->szEnvironment,_J("JSU910"))==0 || jdestrcmpwithnull(lpDS>szEnvironment,_J("SU910"))==0 || jdestrcmpwithnull(lpDS->szEnvironment,_J("JTN910"))==0 || jdestrcmpwithnull(lpDS>szEnvironment,_J("TN910"))==0 || jdestrcmpwithnull(lpDS->szEnvironment,_J("JCN910"))==0 || jdestrcmpwithnull(lpDS>szEnvironment,_J("CN910"))==0) { jdeStrncpyTerminate( lpDS->szEnvironment , _J("CRP") ,DIM( lpDS->szEnvironment)); } else { jdeStrncpyTerminate( lpDS->szEnvironment , _J("DEV") ,DIM( lpDS->szEnvironment)); } */ } XRCSStatus = XRCS_setElementText(hElm[0],lpDS->szEnvironment); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Get the Suppress Error Messages value element and set its value to passed in Suppress Error Message parameter */ XRCSStatus = XRCS_getElementsByTagName(hRootElm, _J("CSuppressErrorMessage"), &hElm,&nElmCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementsByTagName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); return ER_ERROR; } szSuppressErrorMessage[0] = lpDS->cSuppressErrorMessage; szSuppressErrorMessage[1] = _J('\0'); XRCSStatus = XRCS_setElementText(hElm[0], szSuppressErrorMessage); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_setElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* Serialize the XML DOC to XML String */ XRCSStatus = XRCS_serializeDocumentToXMLStringNoEncoding(hDoc, &newXMLString); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_serializeDocumentToXMLStringNoEncoding failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); return ER_ERROR; } /* call the Business Service */ idReturnValue = jdeCallBusinessService(lpBhvrCom, lpVoid, _J("oracle.e1.bssv.JC55ACSU.AcordeProcessor"), _J("getAcorde"), TRUE, newXMLString, &bssvPayloadReturn); if ( idReturnValue == CallBSSVNoError || idReturnValue == CallBSSVNoErrorWithMessages) { XRCSStatus = XRCS_parseXMLStringRemoveEncoding(hParser, bssvPayloadReturn, &hBSSVDoc); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_parseXMLStringRemoveEncoding failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); jdeFree(newXMLString); jdeFreeBSSVPayloadReturn (&bssvPayloadReturn); return ER_ERROR; } XRCSStatus = XRCS_getDocumentElement(hBSSVDoc,&hRootElm); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getDocumentElement failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElementArray(hElm,nElmCount); XRCS_freeDocument(hBSSVDoc); XRCS_terminateEngine(); jdeFree(newXMLString); jdeFreeBSSVPayloadReturn (&bssvPayloadReturn); return ER_ERROR; } XRCSStatus = XRCS_getElementChildren(hRootElm,&hChildElms,&nChildCount); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElementArray(hElm,nElmCount); XRCS_freeDocument(hBSSVDoc); XRCS_freeElement(hRootElm); XRCS_terminateEngine(); jdeFree(newXMLString); jdeFreeBSSVPayloadReturn (&bssvPayloadReturn); return ER_ERROR; } for ( i=0;i<nChildCount;i++) { XRCSStatus = XRCS_getElementName(hChildElms[i],&elmName); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementName failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElementArray(hElm,nElmCount); XRCS_freeDocument(hBSSVDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hChildElms,nChildCount); XRCS_terminateEngine(); jdeFree(newXMLString); jdeFreeBSSVPayloadReturn (&bssvPayloadReturn); return ER_ERROR; } XRCSStatus = XRCS_getElementText(hChildElms[i],&elmValue); if(XRCSStatus != XRCS_SUCCESS) { jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0, _J("XRCS_getElementText failed")); XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElementArray(hElm,nElmCount); XRCS_freeDocument(hBSSVDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hChildElms,nChildCount); XRCS_terminateEngine(); XRCS_freeString(elmName); jdeFree(newXMLString); jdeFreeBSSVPayloadReturn (&bssvPayloadReturn); return ER_ERROR; } if ( (JCHAR*)NULL != elmValue) { if (jdeStricmp(elmName,_J("sz-acorde-uRL"))==0) { jdeStrncpyTerminate(lpDS->szAcordeURL, elmValue, DIM(lpDS->szAcordeURL)); } else if (jdeStricmp(elmName,_J("sz-error-message-id"))==0) { jdeStrncpyTerminate((JCHAR *)lpDS->szErrorMessageId, elmValue, DIM(lpDS->szErrorMessageId)); } else if (jdeStricmp(elmName,_J("sz-error-message-text"))==0) { jdeStrncpyTerminate((JCHAR *)lpDS->szErrorMessageText, elmValue, DIM(lpDS->szErrorMessageText)); } XRCS_freeString(elmName); XRCS_freeString(elmValue); elmName = (JCHAR*)NULL; elmValue = (JCHAR*)NULL; } } /*end of for loop*/ } else { memset((void *)(&dsDE954000), (int)(_J('\0')), sizeof(dsDE954000)); errorText = jdeGetBusinessServiceErrorText(idReturnValue); jdeVWriteLogEntry(_J("BOPTKAP"), __FILE__, __LINE__, 0,errorText); jdeStrncpy(dsDE954000.szWSCallExceptionInfo, errorText , DIM(dsDE954000.szWSCallExceptionInfo)); jdeStrcpy(lpDS->szErrorMessageId,(const JCHAR *) _J("007FIS")); jdeStrncpy(lpDS->szErrorMessageText, errorText , DIM(lpDS->szErrorMessageText)); if (lpDS->cSuppressErrorMessage !=_J('1')) { jdeSetGBRErrorSubText(lpBhvrCom, lpVoid, (ID) 0, _J("007FIS"), &dsDE954000); } XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hElm,nElmCount); XRCS_terminateEngine(); jdeFree(newXMLString); jdeFreeBSSVPayloadReturn (&bssvPayloadReturn); return ER_ERROR; } /************************************************************************ * Function Clean Up ************************************************************************/ XRCS_freeParser(hParser); XRCS_freeDocument(hDoc); XRCS_freeElementArray(hElm,nElmCount); XRCS_freeDocument(hBSSVDoc); XRCS_freeElement(hRootElm); XRCS_freeElementArray(hChildElms,nChildCount); XRCS_terminateEngine(); jdeFree(newXMLString); jdeFreeBSSVPayloadReturn (&bssvPayloadReturn); #else jdeTraceSz(NULL, _J("BOPTKAP - callGetAcordeDataBSSV() called but system does not have SOA_ENABLED defined.")); #endif return (ER_SUCCESS); } /* Internal function comment block */ /************************************************************************** * Function: Ixxxxxxx_a // Replace "xxxxxxx" with source file number * // and "a" with the function name * Notes: * * Returns: * * Parameters: **************************************************************************/ BSFN Header File: /***************************************************************************** * Header File: BOPTKAP.h * * Description: Acorde Business Function - AP Short Header File * * History: * Date Programmer SAR# - Description * ---------- ---------- ------------------------------------------* Author 8/1/2013 Unknown - Created * * * Copyright (c) J.D. Edwards World Source Company, 1996 * * This unpublished material is proprietary to J.D. Edwards World Source * Company. All rights reserved. The methods and techniques described * herein are considered trade secrets and/or confidential. Reproduction * or distribution, in whole or in part, is forbidden except by express * written permission of J.D. Edwards World Source Company. ****************************************************************************/ #ifndef __BOPTKAP_H #define __BOPTKAP_H /***************************************************************************** * Table Header Inclusions ****************************************************************************/ /***************************************************************************** * External Business Function Header Inclusions ****************************************************************************/ #include <xerceswrapper.h> #include <b0000045.h> /***************************************************************************** * Global Definitions ****************************************************************************/ /***************************************************************************** * Structure Definitions ****************************************************************************/ /***************************************************************************** * DS Template Type Definitions ****************************************************************************/ /***************************************** * TYPEDEF for Data Structure * Template Name: Acorde Data Structure - AP Short * Template ID: DOPTKAP * Generated: Thu Aug 01 15:21:11 2013 * * DO NOT EDIT THE FOLLOWING TYPEDEF * To make modifications, use the OneWorld Data Structure * Tool to Generate a revised version, and paste from * the clipboard. * **************************************/ #ifndef DATASTRUCTURE_DOPTKAP #define DATASTRUCTURE_DOPTKAP typedef struct tagDSDOPTKAP { JCHAR Username[11]; JCHAR ScreenName[41]; JCHAR MapName[41]; JCHAR ActionCode; JCHAR Module[41]; MATH_NUMERIC SupplierNumber; JCHAR Company[6]; JCHAR InvoiceDocType[3]; JCHAR InvoiceNumber[26]; MATH_NUMERIC InvoiceAmount; JDEDATE InvoiceDate; JCHAR BusinessUnit[13]; JCHAR PurchaseOrder[9]; MATH_NUMERIC DocumentNumber; MATH_NUMERIC CheckNumber; JDEDATE CheckDate; MATH_NUMERIC CheckAmount; MATH_NUMERIC GenericNumeric1; MATH_NUMERIC GenericNumeric2; MATH_NUMERIC GenericNumeric3; JDEDATE GenericDate1; JDEDATE GenericDate2; JDEDATE GenericDate3; JCHAR GenericString1[81]; JCHAR GenericString2[81]; JCHAR GenericString3[81]; JCHAR GenericString4[81]; JCHAR GenericString5[81]; JCHAR GenericString6[81]; JCHAR GenericString7[81]; JCHAR GenericString8[81]; JCHAR GenericString9[81]; MATH_NUMERIC GenericNumeric4; MATH_NUMERIC GenericNumeric5; MATH_NUMERIC GenericNumeric6; MATH_NUMERIC GenericNumeric7; MATH_NUMERIC GenericNumeric8; JDEDATE GenericDate4; JDEDATE GenericDate5; JDEDATE GenericDate6; JCHAR szEnvironment[11]; JCHAR szAcordeURL[1025]; JCHAR cSuppressErrorMessage; JCHAR szErrorMessageId[11]; JCHAR szErrorMessageText[256]; } DSDOPTKAP, *LPDSDOPTKAP; #define IDERRUsername_1 #define IDERRScreenName_2 #define IDERRMapName_3 1L 2L 3L #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define IDERRActionCode_4 IDERRModule_5 IDERRSupplierNumber_6 IDERRCompany_7 IDERRInvoiceDocType_8 IDERRInvoiceNumber_9 IDERRInvoiceAmount_10 IDERRInvoiceDate_11 IDERRBusinessUnit_12 IDERRPurchaseOrder_13 IDERRDocumentNumber_14 IDERRCheckNumber_15 IDERRCheckDate_16 IDERRCheckAmount_17 IDERRGenericNumeric1_18 IDERRGenericNumeric2_19 IDERRGenericNumeric3_20 IDERRGenericDate1_21 IDERRGenericDate2_22 IDERRGenericDate3_23 IDERRGenericString1_24 IDERRGenericString2_25 IDERRGenericString3_26 IDERRGenericString4_27 IDERRGenericString5_28 IDERRGenericString6_29 IDERRGenericString7_30 IDERRGenericString8_31 IDERRGenericString9_32 IDERRGenericNumeric4_33 IDERRGenericNumeric5_34 IDERRGenericNumeric6_35 IDERRGenericNumeric7_36 IDERRGenericNumeric8_37 IDERRGenericDate4_38 IDERRGenericDate5_39 IDERRGenericDate6_40 IDERRszEnvironment_41 IDERRszAcordeURL_42 IDERRcSuppressErrorMessage_43 IDERRszErrorMessageId_44 IDERRszErrorMessageText_45 4L 5L 6L 7L 8L 9L 10L 11L 12L 13L 14L 15L 16L 17L 18L 19L 20L 21L 22L 23L 24L 25L 26L 27L 28L 29L 30L 31L 32L 33L 34L 35L 36L 37L 38L 39L 40L 41L 42L 43L 44L 45L #endif /***************************************** * TYPEDEF for Data Structure * Template Name: Error Text For WS Reference Implementation * Template ID: DE954000 * Generated: Thu May 24 13:16:20 2007 * * DO NOT EDIT THE FOLLOWING TYPEDEF * To make modifications, use the OneWorld Data Structure * Tool to Generate a revised version, and paste from * the clipboard. * **************************************/ #ifndef DATASTRUCTURE_DE954000 #define DATASTRUCTURE_DE954000 typedef struct tagDSDE954000 { JCHAR szWSCallExceptionInfo[1025]; } DSDE954000, *LPDSDE954000; #define IDERRszWSCallExceptionInfo_2 2L #endif /***************************************************************************** * Source Preprocessor Definitions ****************************************************************************/ #if defined (JDEBFRTN) #undef JDEBFRTN #endif #if defined (WIN32) #if defined (WIN32) #define JDEBFRTN(r) __declspec(dllexport) r #else #define JDEBFRTN(r) __declspec(dllimport) r #endif #else #define JDEBFRTN(r) r #endif /***************************************************************************** * Business Function Prototypes ****************************************************************************/ JDEBFRTN (ID) JDEBFWINAPI PassAPShortToAcorde (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSDOPTKAP lpDS); /***************************************************************************** * Internal Function Prototypes ****************************************************************************/ #endif 4.) 5.) 6.) 7.) /* __BOPTKAP_H */ Now for creating a consumer BSSV, Select Business Function. Click Ok. Select BSSV in source language and give page prefix as “oracle.e1.bssv”. Create a BSSV object with following details. 8.) Go to Design Aid -> Design Tools. 9.) Select JDeveloper Install path and give Middleware installation path. 10.) Click on Invoke JDeveloper. 11.) Select your project. 12.) Right click and go to project properties. 13.) Select “Libraries and Classpath”. 14.) Select “JAX WS-Web Services” and move it to top using Move up button. 15.) Click Ok and then click on save button. 16.) Select project again. Right click and select New. 17.) Select “All Technologies”. 18.) Select “Business Tier” -> “Web Services”-> “Web Service Proxy”. 19.) Click Ok. Click Next. 20.) Give WSDL URL of the web service which you want to invoke through consumer BSSV. In this case give “http://usosbdev01:8011/ipmsearch?WSDL”. 21.) Click Next. 22.) Give “Package Name” as “oracle.e1.bssv.JC55ACSU.proxy” and “Root Package for Generated Types” as “oracle.e1.bssv.JC55ACSU.proxy.types”. 23.) Click Next. 24.) Click Next. 25.) Click Next. 26.) Click Next. 27.) Click Finish. 28.) JDeveloper will generate the proxy and types folder under “JC55ASCU” as follows: 29.) Rename references to the Business Services Package to uppercase. When JDeveloper created the proxy, it also created a package oracle.e1.bssv.JC55ACSU. However, there may be references in the proxy code where this has been generated in lowercase. Select Replace in Files from the Search menu and enter the lowercase name “jc55acsu” in the Search Text and the uppercase name “JC55ACSU” in Replace With. Ensure that Match Case is selected and Search Path Active Project and press OK. 30.) Press the Save All button on the toolbar and then rebuild the code by pressing the Rebuild button on the toolbar (or by pressing Alt-F9) to ensure that there are no errors. 31.) Create Value Object Class. Use the wizard to create a Value Object to pass data to the Business Service Class. We will be creating a new Business Service class in the next step that will call the Web Service Proxy. A Value Object class is used to pass the data from the Business Function to the Business Service class. In effect, it defines the parameters to the Business Service. 32.) Select the project. 33.) Right Click. 34.) Select New. 35.) Select “EnterpriseOne” -> “Classes” -> “Business Function Value Object Class”. 36.) Give Business Function name as “BOPTKAP” and click on Find. 37.) Select All. 38.) Click Next. Give value object name as “GetAcordeURLVO”. 39.) Select scope as Internal. 40.) Click Finish to generate the Value Object Class source. 41.) The fields in the Value Object Class cannot be accessed directly as they are private strings. The Java convention for accessing these fields is to use public methods, commonly called ‘getters’ and ‘setters’. JDeveloper allows us to create these automatically. Right click in the white space of the value object class and select Generate Accessors. 42.) Create a Business Service class. Use the wizard to create the Business Service Class. 43.) Complete the coding for the class to call the Web Service Proxy and handle any exceptions. 44.) Right click on the Project node (JC55ACSU) and select New. 45.) Select category EnterpriseOne/Classes and item Business Service Class and press OK. 46.) Enter the following information on the Create EnterpriseOne BSSV Class dialog and press OK. 47.) Wizard will generate the code. 48.) Replace the generated code with the below code. It contains the logic to call the proxy. package oracle.e1.bssv.JC55ACSU; import java.net.MalformedURLException; import java.net.URL; import oracle.e1.bssvfoundation.base.BusinessService; import oracle.e1.bssvfoundation.base.IContext; import oracle.e1.bssvfoundation.connection.IConnection; import oracle.e1.bssvfoundation.util.E1MessageList; import java.util.Iterator; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; import oracle.e1.bssv.JC55ACSU.proxy.IPMInterfaceService; import oracle.e1.bssv.JC55ACSU.proxy.IPMInterfaceService_Service; import oracle.e1.bssvfoundation.util.SoftCodingRecordAccess; import org.w3c.dom.Element; import oracle.e1.bssv.JC55ACSU.proxy.types.ArrayOfKeyValuePairOfstringstring; import oracle.e1.bssv.JC55ACSU.proxy.types.KeyValuePairOfstringstring; import oracle.e1.bssv.JC55ACSU.proxy.types.ObjectFactory; import oracle.e1.bssv.JC55ACSU.proxy.types.WftIPMReply; import oracle.e1.bssv.JC55ACSU.proxy.types.WftIPMRequest; import oracle.e1.bssv.JC55ACSU.valueobject.GetAcordeURLVO; import oracle.e1.bssvfoundation.exception.InvalidSoftCodingRecordException; import oracle.e1.bssvfoundation.impl.util.SBFLogger; import oracle.e1.bssvfoundation.util.E1Message; /** * TODO: Java Doc for BusinessService */ public abstract class AcordeProcessor extends BusinessService { /** * TODO: Create Java Doc for: getAcorde * Method getEndeca is used for...? * @param context conditionally provides the connection for the database operation and logging information * @param connection can either be an explicit connection or null. If null the default connection is used. * @param internalVO represents data that is passed to EnterpriseOne for processing TODO: complete javadoc for VO. * @return an E1Message containing the text of any errors or warnings that may have occurred */ public static E1MessageList getAcorde(IContext context, IConnection connection, GetAcordeURLVO internalVO) { //Call start internal method, passing the context (which was passed from PublishedBusinessService). startInternalMethod(context, "getAcorde", internalVO); //Create new message list for BusinessService processing. E1MessageList messages = new E1MessageList(); //TODO: call method (created by the wizard), which then executes Business Function or Database operation. String softCodingKey = "E1_JC55ACSU"; // Fetch the Suppress Error Messages flag from the value object boolean suppressErrorMessages = false; if(internalVO.getCSuppressErrorMessage().equals("1")) { suppressErrorMessages = true; } //Element softCodingRecord; Element softCodingRecord = null; IPMInterfaceService_Service es = null; String url = null; try { //retrieve from SoftCoding record softCodingRecord = SoftCodingRecordAccess.getSoftCodingRecord(context,softCodingKey); if(softCodingRecord != null) { //1. WS URL url = SoftCodingRecordAccess.getSoftcodingRecordFieldvalue(context, "value", softCodingRecord); //2. username String softCodingUsername = SoftCodingRecordAccess.getSoftcodingRecordFieldvalue(context, "username", softCodingRecord); //3. password String softCodingPassword = SoftCodingRecordAccess.getSoftcodingRecordFieldvalue(context,"password", softCodingRecord); QName serviceName = new QName("http://www.weatherford.com/IPM/interface/v1", "IPMInterfaceService"); IPMInterfaceService ipmInterfaceService = null; if(url!=null && ((softCodingUsername == null) && (softCodingPassword == null))) { SBFLogger.getInstance().debug(context,"Only Softcoding URL is set"); URL wsdlLocation = null; wsdlLocation = new URL(url); es = new IPMInterfaceService_Service(wsdlLocation, serviceName); ipmInterfaceService = es.getIpminterfaceport(); }else{ SBFLogger.getInstance().debug(context,"No Softcoding"); es = new IPMInterfaceService_Service(); ipmInterfaceService = es.getIpminterfaceport(); } IPMInterfaceService port = es.getIpminterfaceport(); ObjectFactory objectFactory = new ObjectFactory(); WftIPMRequest object = objectFactory.createWftIPMRequest(); JAXBElement<String> applicationGroup = objectFactory.createWftIPMRequestApplicationGroup(internalVO.getScreenName()); JAXBElement<String> applicationName = objectFactory.createWftIPMRequestApplicationName("E910"); JAXBElement<String> applicationSearch = objectFactory.createWftIPMRequestApplicationSearch(internalVO.getMapName()); JAXBElement<String> applicationSecurity = objectFactory.createWftIPMRequestApplicationSecurity(internalVO.getModule()); JAXBElement<String> environment = objectFactory.createWftIPMRequestEnvironment(internalVO.getSzEnvironment()); ArrayOfKeyValuePairOfstringstring arrayValuePair = new ArrayOfKeyValuePairOfstringstring(); if(internalVO.getSupplierNumber() != null && !internalVO.getSupplierNumber().isEmpty()){ System.out.println("getAcordeURLVO.getSupplierNumber() =====:"+internalVO.getSupplierNumber()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("SupplierNumber"); keyValueList.setValue(internalVO.getSupplierNumber()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getCompany() != null && !internalVO.getCompany().isEmpty()){ System.out.println("getAcordeURLVO.getCompany() =====:"+internalVO.getCompany()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("Company"); keyValueList.setValue(internalVO.getCompany()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getInvoiceDocType() != null && !internalVO.getInvoiceDocType().isEmpty()){ System.out.println("getAcordeURLVO.getInvoiceDocType() =====:"+internalVO.getInvoiceDocType()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("InvoiceDocType"); keyValueList.setValue(internalVO.getInvoiceDocType()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getInvoiceNumber() != null && !internalVO.getInvoiceNumber().isEmpty()){ System.out.println("getAcordeURLVO.getInvoiceNumber() =====:"+internalVO.getInvoiceNumber()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("InvoiceNumber"); keyValueList.setValue(internalVO.getInvoiceNumber()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getInvoiceDate() != null && !internalVO.getInvoiceDate().isEmpty() && !internalVO.getInvoiceDate().startsWith(" T")){ if(!internalVO.getInvoiceDate().contains("T")){ System.out.println("getAcordeURLVO.getInvoiceDate() 1 =====:"+internalVO.getInvoiceDate()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("InvoiceDate"); keyValueList.setValue(internalVO.getInvoiceDate()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } else{ System.out.println("getAcordeURLVO.getInvoiceDate() 2 =====:"+internalVO.getInvoiceDate()); System.out.println("Date Only =====:"+internalVO.getInvoiceDate().substring(0,internalVO.getInvoiceDate().indexOf('T'))); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("InvoiceDate"); keyValueList.setValue(internalVO.getInvoiceDate().substring(0,internalVO.getInvoiceDate().indexOf('T'))); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } } if(internalVO.getBusinessUnit() != null && !internalVO.getBusinessUnit().isEmpty()){ System.out.println("getAcordeURLVO.getBusinessUnit() =====:"+internalVO.getBusinessUnit()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("APBranchPlant"); keyValueList.setValue(internalVO.getBusinessUnit()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getPurchaseOrder() != null && !internalVO.getPurchaseOrder().isEmpty()){ System.out.println("getAcordeURLVO.getPurchaseOrder() =====:"+internalVO.getPurchaseOrder()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("PurchaseOrder"); keyValueList.setValue(internalVO.getPurchaseOrder()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getDocumentNumber() != null && !internalVO.getDocumentNumber().isEmpty()){ System.out.println("getAcordeURLVO.getDocumentNumber() =====:"+internalVO.getDocumentNumber()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("DocumentNumber"); keyValueList.setValue(internalVO.getDocumentNumber()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getCheckNumber() != null && !internalVO.getCheckNumber().isEmpty()){ System.out.println("getAcordeURLVO.getCheckNumber() =====:"+internalVO.getCheckNumber()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("CheckNumber"); keyValueList.setValue(internalVO.getCheckNumber()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getCheckDate() != null && !internalVO.getCheckDate().isEmpty() && !internalVO.getCheckDate().startsWith("T")){ if(!internalVO.getCheckDate().contains("T")){ System.out.println("getAcordeURLVO.getCheckDate() 1 =====:"+internalVO.getCheckDate()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("CheckDate"); keyValueList.setValue(internalVO.getCheckDate()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } else{ System.out.println("getAcordeURLVO.getCheckDate() 2 =====:"+internalVO.getCheckDate()); System.out.println("Date Only =====:"+internalVO.getCheckDate().substring(0,internalVO.getCheckDate().indexOf('T'))); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("CheckDate"); keyValueList.setValue(internalVO.getCheckDate().substring(0,internalVO.getCheckDate().indexOf('T'))); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } } if(internalVO.getCheckAmount() != null && !internalVO.getCheckAmount().isEmpty()){ System.out.println("getAcordeURLVO.getInvoiceNumber() =====:"+internalVO.getCheckAmount()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("CheckAmount"); keyValueList.setValue(internalVO.getCheckAmount()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericNumeric1() != null && !internalVO.getGenericNumeric1().isEmpty()){ System.out.println("getAcordeURLVO.getGenericNumeric1() =====:"+internalVO.getGenericNumeric1()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericNumeric1"); keyValueList.setValue(internalVO.getGenericNumeric1()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericNumeric2() != null && !internalVO.getGenericNumeric2().isEmpty()){ System.out.println("getAcordeURLVO.getGenericNumeric2() =====:"+internalVO.getGenericNumeric2()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericNumeric2"); keyValueList.setValue(internalVO.getGenericNumeric2()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericNumeric3() != null && !internalVO.getGenericNumeric3().isEmpty()){ System.out.println("getAcordeURLVO.getGenericNumeric3() =====:"+internalVO.getGenericNumeric3()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericNumeric3"); keyValueList.setValue(internalVO.getGenericNumeric3()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericDate1() != null && !internalVO.getGenericDate1().isEmpty() && !internalVO.getGenericDate1().startsWith("T")){ if(!internalVO.getGenericDate1().contains("T")){ System.out.println("getAcordeURLVO.getGenericDate1() 1 =====:"+internalVO.getGenericDate1()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate1"); keyValueList.setValue(internalVO.getGenericDate1()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } else{ System.out.println("getAcordeURLVO.getGenericDate1() 2 =====:"+internalVO.getGenericDate1()); System.out.println("Date Only =====:"+internalVO.getGenericDate1().substring(0,internalVO.getGenericDate1().indexOf('T'))); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate1"); keyValueList.setValue(internalVO.getGenericDate1().substring(0,internalVO.getGenericDate1().indexOf('T'))); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } } if(internalVO.getGenericDate2() != null && !internalVO.getGenericDate2().isEmpty() && !internalVO.getGenericDate2().startsWith("T")){ if(!internalVO.getGenericDate2().contains("T")){ System.out.println("getAcordeURLVO.getGenericDate2() 1 =====:"+internalVO.getGenericDate2()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate2"); keyValueList.setValue(internalVO.getGenericDate2()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } else{ System.out.println("getAcordeURLVO.getGenericDate2() 2 =====:"+internalVO.getGenericDate2()); System.out.println("Date Only =====:"+internalVO.getGenericDate2().substring(0,internalVO.getGenericDate2().indexOf('T'))); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate2"); keyValueList.setValue(internalVO.getGenericDate2().substring(0,internalVO.getGenericDate2().indexOf('T'))); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } } if(internalVO.getGenericDate3() != null && !internalVO.getGenericDate3().isEmpty() && !internalVO.getGenericDate3().startsWith("T")){ if(!internalVO.getGenericDate3().contains("T")){ System.out.println("getAcordeURLVO.getGenericDate3() 1 =====:"+internalVO.getGenericDate3()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate3"); keyValueList.setValue(internalVO.getGenericDate3()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } else{ System.out.println("getAcordeURLVO.getGenericDate3() 2 =====:"+internalVO.getGenericDate3()); System.out.println("Date Only =====:"+internalVO.getGenericDate3().substring(0,internalVO.getGenericDate3().indexOf('T'))); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate3"); keyValueList.setValue(internalVO.getGenericDate3().substring(0,internalVO.getGenericDate3().indexOf('T'))); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } } if(internalVO.getGenericString1() != null && !internalVO.getGenericString1().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString1() =====:"+internalVO.getGenericString1()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString1"); keyValueList.setValue(internalVO.getGenericString1()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString2() != null && !internalVO.getGenericString2().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString2() =====:"+internalVO.getGenericString2()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString2"); keyValueList.setValue(internalVO.getGenericString2()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString3() != null && !internalVO.getGenericString3().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString3() =====:"+internalVO.getGenericString3()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString3"); keyValueList.setValue(internalVO.getGenericString3()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString4() != null && !internalVO.getGenericString4().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString4() =====:"+internalVO.getGenericString4()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString4"); keyValueList.setValue(internalVO.getGenericString4()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString5() != null && !internalVO.getGenericString5().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString5() =====:"+internalVO.getGenericString5()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString5"); keyValueList.setValue(internalVO.getGenericString5()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString6() != null && !internalVO.getGenericString6().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString6() =====:"+internalVO.getGenericString6()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString6"); keyValueList.setValue(internalVO.getGenericString6()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString7() != null && !internalVO.getGenericString7().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString7() =====:"+internalVO.getGenericString7()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString7"); keyValueList.setValue(internalVO.getGenericString7()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString8() != null && !internalVO.getGenericString8().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString8() =====:"+internalVO.getGenericString8()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString8"); keyValueList.setValue(internalVO.getGenericString8()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString9() != null && !internalVO.getGenericString9().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString9() =====:"+internalVO.getGenericString9()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString9"); keyValueList.setValue(internalVO.getGenericString9()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericString5() != null && !internalVO.getGenericString5().isEmpty()){ System.out.println("getAcordeURLVO.getGenericString5() =====:"+internalVO.getGenericString5()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericString5"); keyValueList.setValue(internalVO.getGenericString5()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericNumeric4() != null && !internalVO.getGenericNumeric4().isEmpty()){ System.out.println("getAcordeURLVO.getGenericNumeric4() =====:"+internalVO.getGenericNumeric4()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericNumeric4"); keyValueList.setValue(internalVO.getGenericNumeric4()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericNumeric5() != null && !internalVO.getGenericNumeric5().isEmpty()){ System.out.println("getAcordeURLVO.getGenericNumeric5() =====:"+internalVO.getGenericNumeric5()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericNumeric5"); keyValueList.setValue(internalVO.getGenericNumeric5()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericNumeric6() != null && !internalVO.getGenericNumeric6().isEmpty()){ System.out.println("getAcordeURLVO.getGenericNumeric6() =====:"+internalVO.getGenericNumeric6()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericNumeric6"); keyValueList.setValue(internalVO.getGenericNumeric6()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericNumeric7() != null && !internalVO.getGenericNumeric7().isEmpty()){ System.out.println("getAcordeURLVO.getGenericNumeric7() =====:"+internalVO.getGenericNumeric7()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericNumeric7"); keyValueList.setValue(internalVO.getGenericNumeric7()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericNumeric8() != null && !internalVO.getGenericNumeric8().isEmpty()){ System.out.println("getAcordeURLVO.getGenericNumeric8() =====:"+internalVO.getGenericNumeric8()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericNumeric8"); keyValueList.setValue(internalVO.getGenericNumeric8()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getGenericDate4() != null && !internalVO.getGenericDate4().isEmpty() && !internalVO.getGenericDate4().startsWith("T")){ if(!internalVO.getGenericDate4().contains("T")){ System.out.println("getAcordeURLVO.getGenericDate4() 1 =====:"+internalVO.getGenericDate4()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate4"); keyValueList.setValue(internalVO.getGenericDate4()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } else{ System.out.println("getAcordeURLVO.getGenericDate4() 2 =====:"+internalVO.getGenericDate4()); System.out.println("Date Only =====:"+internalVO.getGenericDate4().substring(0,internalVO.getGenericDate4().indexOf('T'))); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate4"); keyValueList.setValue(internalVO.getGenericDate4().substring(0,internalVO.getGenericDate4().indexOf('T'))); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } } if(internalVO.getGenericDate5() != null && !internalVO.getGenericDate5().isEmpty() && !internalVO.getGenericDate5().startsWith("T")){ if(!internalVO.getGenericDate5().contains("T")){ System.out.println("getAcordeURLVO.getGenericDate5() 1 =====:"+internalVO.getGenericDate5()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate5"); keyValueList.setValue(internalVO.getGenericDate5()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } else{ System.out.println("getAcordeURLVO.getGenericDate5() 2 =====:"+internalVO.getGenericDate5()); System.out.println("Date Only =====:"+internalVO.getGenericDate5().substring(0,internalVO.getGenericDate5().indexOf('T'))); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate5"); keyValueList.setValue(internalVO.getGenericDate5().substring(0,internalVO.getGenericDate5().indexOf('T'))); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } } if(internalVO.getGenericDate6() != null && !internalVO.getGenericDate6().isEmpty() && !internalVO.getGenericDate6().startsWith("T")){ if(!internalVO.getGenericDate6().contains("T")){ System.out.println("getAcordeURLVO.getGenericDate6() 1 =====:"+internalVO.getGenericDate6()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate6"); keyValueList.setValue(internalVO.getGenericDate6()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } else{ System.out.println("getAcordeURLVO.getGenericDate6() 2 =====:"+internalVO.getGenericDate6()); System.out.println("Date Only =====:"+internalVO.getGenericDate6().substring(0,internalVO.getGenericDate6().indexOf('T'))); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("GenericDate6"); keyValueList.setValue(internalVO.getGenericDate6().substring(0,internalVO.getGenericDate6().indexOf('T'))); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } } if(internalVO.getCSuppressErrorMessage() != null && !internalVO.getCSuppressErrorMessage().isEmpty()){ System.out.println("getAcordeURLVO.getCSuppressErrorMessage() =====:"+internalVO.getCSuppressErrorMessage()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("CSuppressErrorMessage"); keyValueList.setValue(internalVO.getCSuppressErrorMessage()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getSzErrorMessageId() != null && !internalVO.getSzErrorMessageId().isEmpty()){ System.out.println("getAcordeURLVO.getSzErrorMessageId() =====:"+internalVO.getSzErrorMessageId()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("SzErrorMessageId"); keyValueList.setValue(internalVO.getSzErrorMessageId()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } if(internalVO.getSzErrorMessageText() != null && !internalVO.getSzErrorMessageText().isEmpty()){ System.out.println("getAcordeURLVO.getSzErrorMessageText() =====:"+internalVO.getSzErrorMessageText()); KeyValuePairOfstringstring keyValueList = new KeyValuePairOfstringstring(); keyValueList.setKey("ErrorMessageText"); keyValueList.setValue(internalVO.getSzErrorMessageText()); arrayValuePair.getKeyValuePairOfstringstring().add(keyValueList); } System.out.println("arrayValuePair == "+arrayValuePair.getKeyValuePairOfstringstring().size()); JAXBElement<ArrayOfKeyValuePairOfstringstring> valuePair = objectFactory.createWftIPMRequestNameValuePairList(arrayValuePair); //JAXBElement<ArrayOfKeyValuePairOfstringstring> valuePair = objectFactory.createArrayOfKeyValuePairOfstringstring(arrayValuePair); JAXBElement<String> securityCode = objectFactory.createWftIPMRequestSecurityCode("12345"); JAXBElement<String> userId = objectFactory.createWftIPMRequestUserId(internalVO.getUsername()); object.setActionCode(internalVO.getActionCode()); object.setApplicationGroup(applicationGroup); object.setApplicationName(applicationName); object.setApplicationSearch(applicationSearch); object.setApplicationSecurity(applicationSecurity); object.setEnvironment(environment); object.setNameValuePairList(valuePair); object.setSecurityCode(securityCode); object.setUserId(userId); object.setUniqueId(0); // String status = port.ipmOperations(object).getStatus().getValue(); // System.out.println("status =====:"+status); if( internalVO.getActionCode().trim().equalsIgnoreCase("R") ){ url = port.ipmOperations(object).getRedirectUrl().getValue(); System.out.println("url =====:"+ url); internalVO.setSzAcordeURL(url); } else{ String message = port.ipmOperations(object).getMessage().getValue(); System.out.println("Error Message =====:"+message); internalVO.setSzAcordeURL(message); } } } catch (InvalidSoftCodingRecordException e) { //Build text substitution elements for error message separated by pipe character String substitutionText = e.getStackTrace()[0].getClassName() + "." + e.getStackTrace()[0].getMethodName() + "|" + e.getMessage() + "|" + softCodingKey; //Create new E1 Message for invalid soft coding record exception. E1Message msg = new E1Message(context, "004FIS", substitutionText); //Add messages to final message list to be returned. if (!suppressErrorMessages) { messages.addMessage(msg); } //Send message to the logs and return error id and text to calling function context.getBSSVLogger().app(context, msg.getCallObjError().getGlossaryText(), null, null, e); System.out.println(msg.getCallObjError().getGlossaryText()); internalVO.setSzErrorMessageId(msg.getCallObjError().getDDItem()); internalVO.setSzErrorMessageText(msg.getCallObjError().getAlphaDescription()); } catch (Exception e) { //Build text substitution elements for error message separated by pipe character String substitutionText = e.getStackTrace()[0].getClassName() + "." + e.getStackTrace()[0].getMethodName() + "|" + e.getMessage(); //Create new E1 Message for the web service exception. E1Message msg = new E1Message(context, "003FIS", substitutionText); //Add messages to final message list to be returned. if (!suppressErrorMessages) { messages.addMessage(msg); } //Send message to the logs and return error id and text to calling function context.getBSSVLogger().app(context, msg.getCallObjError().getGlossaryText(), null, null, e); System.out.println(msg.getCallObjError().getGlossaryText()); internalVO.setSzErrorMessageId(msg.getCallObjError().getDDItem()); internalVO.setSzErrorMessageText(msg.getCallObjError().getAlphaDescription()); } //TODO: add messages returned from E1 processing to BusinessService message list. //Call finish internal method passing context. finishInternalMethod(context, "getAcorde"); //Call finish internal method passing context. return messages; } } 49.) Select menu option Source/Reformat to re-insert leading tabs removed by the copy/paste from the document. 50.) Press the Rebuild button on the toolbar or press Alt-F9 to compile the class. Ensure that there are no errors in the Messages log. 51.) Press the Save All button on the toolbar. 52.) Configure the Soft Coding Record in EnterpriseOne. 53.) The Soft Coding Record is used to hold information such as the web service endpoint (ie: the URL to where the web service can be found) and security information. By having these values soft-coded, provides the possibility of having different sets of values for different environments, or for user/role based variations in web service credentials. 54.) We use a standard EnterpriseOne application to enter the Soft Coding Records (P954000). Launch the EnterpriseOne menu by selecting the Tools/EnterpriseOne menu option from the Solutions Explorer menu. 55.) After the Work with Web Service Soft Coding Records application launches, press the Add button. 56.) Enter the following formation on the Add Web Service Soft Coding Record form. 57.) Give soft coding value as follows: <port-info> <stub-property> <name>javax.xml.rpc.service.endpoint.address</name> <value>http://usosbdev01:8011/ipmsearch</value> </stub-property> </port-info> 58.) Note that the Soft Coding Value here does not contain any logon credentials, since this is not required for the web service that we are calling. Further information about coding logon credentials in the Soft Coding Value can be found in the JD Edwards EnterpriseOne Tools 8.98 Business Services Development Guide. 59.) For testing the Business Service Class creates an XML document that can be passed to the Business Service, create a test class to call the Business Service and run the Test Class. 60.) To test the Business Service, we need to generate the Business Service payload that would normally be sent through from the Business Function in the form of an XML document. We can generate this automatically based on our value object. 61.) Expand the following folders under the Project node (JC55ACSU) in JDeveloper: Application Sources oracle.e1.bssv JC55ACSU Valueobject 62.) Right click on the GetAcordeURLVO.java value object and select Generate XML Document Template. 63.) Wizard will generate the code. 64.) Enter the payload data as follows: <?xml version='1.0' ?> <Get-Acorde-URLVO> <username>WFT\E190197</username> <screen-name>W0011A</screen-name> <map-name></map-name> <action-code>R</action-code> <module></module> <supplier-number>12345678</supplier-number> <company></company> <invoice-doc-type></invoice-doc-type> <invoice-number></invoice-number> <invoice-amount></invoice-amount> <invoice-date>T00:00:00</invoice-date> <business-unit></business-unit> <purchase-order></purchase-order> <document-number></document-number> <check-number></check-number> <check-date>T00:00:00</check-date> <check-amount></check-amount> <generic-numeric1>2128061</generic-numeric1> <generic-numeric2></generic-numeric2> <generic-numeric3></generic-numeric3> <generic-date1>T00:00:00</generic-date1> <generic-date2>T00:00:00</generic-date2> <generic-date3>T00:00:00</generic-date3> <generic-string1></generic-string1> <generic-string2></generic-string2> <generic-string3></generic-string3> <generic-string4></generic-string4> <generic-string5></generic-string5> <generic-string6></generic-string6> <generic-string7></generic-string7> <generic-string8></generic-string8> <generic-string9></generic-string9> <generic-numeric4></generic-numeric4> <generic-numeric5></generic-numeric5> <generic-numeric6></generic-numeric6> <generic-numeric7></generic-numeric7> <generic-numeric8></generic-numeric8> <generic-date4>T00:00:00</generic-date4> <generic-date5>T00:00:00</generic-date5> <generic-date6>T00:00:00</generic-date6> <sz-environment>JDV910</sz-environment> <sz-acorde-uRL/> <CSuppressErrorMessage></CSuppressErrorMessage> <sz-error-message-id/> <sz-error-message-text/> </Get-Acorde-URLVO> 65.) Click Save All on the toolbar. 66.) Now create a test class that will call the Business Service, passing this XML document. Right click on the Project node (JC55ACSU). Select New. 67.) In General select following: 68.) Click Ok. 69.) Enter following and click ok. 70.) Wizard will generate the following code. package oracle.e1.bssv.JC55ACSU; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import javax.xml.bind.JAXBElement; import oracle.e1.bssv.JC55ACSU.proxy.types.ArrayOfKeyValuePairOfstringstring; import oracle.e1.bssv.JC55ACSU.proxy.types.KeyValuePairOfstringstring; import oracle.e1.bssv.JC55ACSU.proxy.types.ObjectFactory; import oracle.e1.bssv.JC55ACSU.valueobject.GetAcordeURLVO; import oracle.e1.bssvfoundation.base.TestBusinessService; import oracle.e1.bssvfoundation.connection.IConnection; public class TestAcorde { public static void main(String[] args) { try { //call required prior to executing test from application (main()) TestBusinessService.startTest(); } finally { //call required at the end of testing from application (main()) TestBusinessService.finishTest(); } } } 71.) Replace it with following code in order to invoke the Business service. package oracle.e1.bssv.JC55ACSU; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import javax.xml.bind.JAXBElement; import oracle.e1.bssv.JC55ACSU.proxy.types.ArrayOfKeyValuePairOfstringstring; import oracle.e1.bssv.JC55ACSU.proxy.types.KeyValuePairOfstringstring; import oracle.e1.bssv.JC55ACSU.proxy.types.ObjectFactory; import oracle.e1.bssv.JC55ACSU.valueobject.GetAcordeURLVO; import oracle.e1.bssvfoundation.base.TestBusinessService; import oracle.e1.bssvfoundation.connection.IConnection; public class TestAcorde { public static void main(String[] args) { try { //call required prior to executing test from application (main()) TestBusinessService.startTest(); String file = "D:\\E910\\DV910\\java\\source\\oracle\\e1\\bssv\\JC55ACSU\\valueobject\\GetAcordeURLVO.xml"; TestBusinessService.callBSSVWithXMLFile("oracle.e1.bssv.JC55ACSU.AcordeProcessor", "getAcorde", file, IConnection.AUTO); } finally { //call required at the end of testing from application (main()) TestBusinessService.finishTest(); } } } 72.) Select Reformat from the Source menu. 73.) Press the Rebuild button on the toolbar or Alt-F9 to compile the classes in the project. Ensure that there are no errors. 74.) Press Save All to save the code. 75.) To test the Business Service, select anywhere in the main method and press the Run button on the toolbar or press F11. Any messages will appear in the Running log at the bottom of the screen. 76.) Deploying BSSV using JDeveloper. Select JC55ACSU. Compile it and make sure that there are no errors. Go to Project Properties. Select Deployment. For selected WAR file click on Edit. Select Contributors in WEB-INF/lib. Check SBF Config and SBFProjects. Click Ok. In Libraries and Classpath, again check SBF Config and SBFProjects. Select (only select no check) JAX-WS Web service and move it to top using Move Up button. Click Ok and then save the project. Run Integrated Web logic server. Expand the project and select the manager class. Right click and select “Create Web Service”. Click Next. Select SOAP 1.1 Binding. In SOAP Message Format select “Document/Literal”. Check all available methods and click Finish. Save and then again select the project. Right click and deploy. Select Project name. Deploy to Application Server -> Integrated Web logic Server. Select the instance wherever you want to deploy. Then select Deploy as shared application. Click Finish. Go to http://localhost:7101/console ,click on deployments and check whether it’s gets deployed correctly. Select the Deployed file. Expand it and click on manager class. Click on testing you will get both WSDL and Test Client. 77.) OCM mapping. Create the OCM Service Configuration record to point to the Development Business Services Server. EnterpriseOne needs to know where the Business Services Server is located. There could be several Business Services Servers, eg: one for each EnterpriseOne environment. In our case we want to ensure that any calls to the Business Server from the Business Function BOPTKAP are sent to our Development Business Services Server. The configuration of the location of the Business Services Server is handled by the OCM Service Configuration. 78.) In fast path enter GH9011. On the EnterpriseOne Solution Explorer menu, expand folders System Administration Tools, System Administration Tools and Environment Management. 79.) Double click on the Environment/Service Configuration menu option to launch the Object Configuration Manager (OCM) Machine Search and Select screen. 80.) Select the System – 910 data source and press the Select button on the toolbar to display the Work with Service Configuration screen. 81.) Press the Add button on the toolbar to display the Service Configuration Revisions screen. Enter the following information: Environment Name: The E1 environment name that you are logged in to (eg: DV910) Service Name: BSSV User/Role: *PUBLIC Server: LOCALHOST Port: 6667 82.) Press OK to return to the Work with Service Configuration screen. 83.) Select the row that you have just added and press row exit Change Status. 84.) The Object Status should change to ‘AV’. 85.) Ping and check that BSSV server is up and running. 86.) Press the Close button twice on the toolbar to exit back to the Solution Explorer menu.