Author: apatel
Date: Tue Jul 24 03:45:05 2007 New Revision: 559005 URL: http://svn.apache.org/viewvc?view=rev&rev=559005 Log: element namespace prefix fixed. Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/ConfirmBod.ftl Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java?view=diff&rev=559005&r1=559004&r2=559005 ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java (original) +++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java Tue Jul 24 03:45:05 2007 @@ -210,34 +210,34 @@ Element confirmBodElement = doc.getDocumentElement(); confirmBodElement.normalize(); - Element docCtrlAreaElement = UtilXml.firstChildElement(confirmBodElement, "N1:CNTROLAREA"); - Element bsrElement = UtilXml.firstChildElement(docCtrlAreaElement, "N1:BSR"); - String bsrVerb = UtilXml.childElementValue(bsrElement, "N2:VERB"); - String bsrNoun = UtilXml.childElementValue(bsrElement, "N2:NOUN"); - String bsrRevision = UtilXml.childElementValue(bsrElement, "N2:REVISION"); + Element docCtrlAreaElement = UtilXml.firstChildElement(confirmBodElement, "os:CNTROLAREA"); + Element bsrElement = UtilXml.firstChildElement(docCtrlAreaElement, "os:BSR"); + String bsrVerb = UtilXml.childElementValue(bsrElement, "of:VERB"); + String bsrNoun = UtilXml.childElementValue(bsrElement, "of:NOUN"); + String bsrRevision = UtilXml.childElementValue(bsrElement, "of:REVISION"); - Element docSenderElement = UtilXml.firstChildElement(docCtrlAreaElement, "N1:SENDER"); - String logicalId = UtilXml.childElementValue(docSenderElement, "N2:LOGICALID"); - String component = UtilXml.childElementValue(docSenderElement, "N2:COMPONENT"); - String task = UtilXml.childElementValue(docSenderElement, "N2:TASK"); - String referenceId = UtilXml.childElementValue(docSenderElement, "N2:REFERENCEID"); - String confirmation = UtilXml.childElementValue(docSenderElement, "N2:CONFIRMATION"); - //String language = UtilXml.childElementValue(docSenderElement, "N2:LANGUAGE"); - //String codepage = UtilXml.childElementValue(docSenderElement, "N2:CODEPAGE"); - String authId = UtilXml.childElementValue(docSenderElement, "N2:AUTHID"); - String sentDate = UtilXml.childElementValue(docCtrlAreaElement, "N1:DATETIMEANY"); + Element docSenderElement = UtilXml.firstChildElement(docCtrlAreaElement, "os:SENDER"); + String logicalId = UtilXml.childElementValue(docSenderElement, "of:LOGICALID"); + String component = UtilXml.childElementValue(docSenderElement, "of:COMPONENT"); + String task = UtilXml.childElementValue(docSenderElement, "of:TASK"); + String referenceId = UtilXml.childElementValue(docSenderElement, "of:REFERENCEID"); + String confirmation = UtilXml.childElementValue(docSenderElement, "of:CONFIRMATION"); + //String language = UtilXml.childElementValue(docSenderElement, "of:LANGUAGE"); + //String codepage = UtilXml.childElementValue(docSenderElement, "of:CODEPAGE"); + String authId = UtilXml.childElementValue(docSenderElement, "of:AUTHID"); + String sentDate = UtilXml.childElementValue(docCtrlAreaElement, "os:DATETIMEANY"); Element dataAreaElement = UtilXml.firstChildElement(confirmBodElement, "n:DATAAREA"); Element dataAreaConfirmBodElement = UtilXml.firstChildElement(dataAreaElement, "n:CONFIRM_BOD"); Element dataAreaConfirmElement = UtilXml.firstChildElement(dataAreaConfirmBodElement, "n:CONFIRM"); - Element dataAreaCtrlElement = UtilXml.firstChildElement(dataAreaConfirmElement, "N1:CNTROLAREA"); - Element dataAreaSenderElement = UtilXml.firstChildElement(dataAreaCtrlElement, "N1:SENDER"); - String dataAreaLogicalId = UtilXml.childElementValue(dataAreaSenderElement, "N2:LOGICALID"); - String dataAreaComponent = UtilXml.childElementValue(dataAreaSenderElement, "N2:COMPONENT"); - String dataAreaTask = UtilXml.childElementValue(dataAreaSenderElement, "N2:TASK"); - String dataAreaReferenceId = UtilXml.childElementValue(dataAreaSenderElement, "N2:REFERENCEID"); - String dataAreaDate = UtilXml.childElementValue(dataAreaCtrlElement, "N1:DATETIMEANY"); - String origRef = UtilXml.childElementValue(dataAreaConfirmElement, "N2:ORIGREF"); + Element dataAreaCtrlElement = UtilXml.firstChildElement(dataAreaConfirmElement, "os:CNTROLAREA"); + Element dataAreaSenderElement = UtilXml.firstChildElement(dataAreaCtrlElement, "os:SENDER"); + String dataAreaLogicalId = UtilXml.childElementValue(dataAreaSenderElement, "of:LOGICALID"); + String dataAreaComponent = UtilXml.childElementValue(dataAreaSenderElement, "of:COMPONENT"); + String dataAreaTask = UtilXml.childElementValue(dataAreaSenderElement, "of:TASK"); + String dataAreaReferenceId = UtilXml.childElementValue(dataAreaSenderElement, "of:REFERENCEID"); + String dataAreaDate = UtilXml.childElementValue(dataAreaCtrlElement, "os:DATETIMEANY"); + String origRef = UtilXml.childElementValue(dataAreaConfirmElement, "of:ORIGREF"); Timestamp timestamp = UtilDateTime.nowTimestamp(); Map oagisMsgInfoCtx = new HashMap(); @@ -289,8 +289,8 @@ if (oagisMsgInfo != null){ while (dataAreaConfirmMsgListItr.hasNext()){ Element dataAreaConfirmMsgElement = (Element) dataAreaConfirmMsgListItr.next(); - String description = UtilXml.childElementValue(dataAreaConfirmMsgElement, "N2:DESCRIPTN"); - String reasonCode = UtilXml.childElementValue(dataAreaConfirmMsgElement, "N2:REASONCODE"); + String description = UtilXml.childElementValue(dataAreaConfirmMsgElement, "of:DESCRIPTN"); + String reasonCode = UtilXml.childElementValue(dataAreaConfirmMsgElement, "of:REASONCODE"); oagisMsgErrorCtx.put("reasonCode", reasonCode); oagisMsgErrorCtx.put("description", description); @@ -359,10 +359,10 @@ Element rootElement = doc.getDocumentElement(); rootElement.normalize(); - Element controlAreaElement = UtilXml.firstChildElement(rootElement, "N1:CNTROLAREA"); - Element bsrElement = UtilXml.firstChildElement(controlAreaElement, "N1:BSR"); - String bsrVerb = UtilXml.childElementValue(bsrElement, "N2:VERB"); - String bsrNoun = UtilXml.childElementValue(bsrElement, "N2:NOUN"); + Element controlAreaElement = UtilXml.firstChildElement(rootElement, "os:CNTROLAREA"); + Element bsrElement = UtilXml.firstChildElement(controlAreaElement, "os:BSR"); + String bsrVerb = UtilXml.childElementValue(bsrElement, "of:VERB"); + String bsrNoun = UtilXml.childElementValue(bsrElement, "of:NOUN"); if (bsrVerb.equalsIgnoreCase("CONFIRM") && bsrNoun.equalsIgnoreCase("BOD")) { try { @@ -392,8 +392,8 @@ Element dataAreaElement = UtilXml.firstChildElement(rootElement, "n:DATAAREA"); Element ackDeliveryElement = UtilXml.firstChildElement(dataAreaElement, "n:ACKNOWLEDGE_DELIVERY"); Element receiptlnElement = UtilXml.firstChildElement(ackDeliveryElement, "n:RECEIPTLN"); - Element docRefElement = UtilXml.firstChildElement(receiptlnElement, "N1:DOCUMNTREF"); - String docType = UtilXml.childElementValue(docRefElement, "N2:DOCTYPE"); + Element docRefElement = UtilXml.firstChildElement(receiptlnElement, "os:DOCUMNTREF"); + String docType = UtilXml.childElementValue(docRefElement, "of:DOCTYPE"); if (docType.equalsIgnoreCase("PO")){ try { serviceResult = dispatcher.runSync("receivePoAcknowledge", UtilMisc.toMap("document",doc)); Modified: ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/ConfirmBod.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/ConfirmBod.ftl?view=diff&rev=559005&r1=559004&r2=559005 ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/ConfirmBod.ftl (original) +++ ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/ConfirmBod.ftl Tue Jul 24 03:45:05 2007 @@ -18,43 +18,47 @@ under the License. --> -<n:CONFIRM_BOD_004 xmlns:n="http://www.openapplications.org/002_confirm_bod_004" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openapplications.org/002_confirm_bod_004 file:///C:/Documents%20and%20Settings/022523/My%20Documents/Vudu/XML%20Specs/OAG%20721/002_confirm_bod_004.xsd" xmlns:N1="http://www.openapplications.org/oagis_segments" xmlns:N2="http://www.openapplications.org/oagis_fields"> - <N1:CNTROLAREA> - <N1:BSR> - <N2:VERB>CONFIRM</N2:VERB> - <N2:NOUN>BOD</N2:NOUN> - <N2:REVISION>004</N2:REVISION> - </N1:BSR> - <N1:SENDER> - <N2:LOGICALID>${logicalId}</N2:LOGICALID> - <N2:COMPONENT>EXCEPTION</N2:COMPONENT> - <N2:TASK>RECEIPT</N2:TASK> - <N2:REFERENCEID>${referenceId}</N2:REFERENCEID> - <N2:CONFIRMATION>1</N2:CONFIRMATION> - <N2:LANGUAGE>ENG</N2:LANGUAGE> - <N2:CODEPAGE>NONE</N2:CODEPAGE> - <N2:AUTHID>${authId?if_exists}</N2:AUTHID> - </N1:SENDER> - <N1:DATETIMEANY>${sentDate?if_exists}</N1:DATETIMEANY> - </N1:CNTROLAREA> +<n:CONFIRM_BOD_004 xmlns:n="http://www.openapplications.org/002_confirm_bod_004" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openapplications.org/002_confirm_bod_004 file:///C:/Documents%20and%20Settings/022523/My%20Documents/Vudu/XML%20Specs/OAG%20721/002_confirm_bod_004.xsd" + xmlns:os="http://www.openapplications.org/oagis_segments" + xmlns:of="http://www.openapplications.org/oagis_fields"> + <os:CNTROLAREA> + <os:BSR> + <of:VERB>CONFIRM</of:VERB> + <of:NOUN>BOD</of:NOUN> + <of:REVISION>004</of:REVISION> + </os:BSR> + <os:SENDER> + <of:LOGICALID>${logicalId}</of:LOGICALID> + <of:COMPONENT>EXCEPTION</of:COMPONENT> + <of:TASK>RECEIPT</of:TASK> + <of:REFERENCEID>${referenceId}</of:REFERENCEID> + <of:CONFIRMATION>1</of:CONFIRMATION> + <of:LANGUAGE>ENG</of:LANGUAGE> + <of:CODEPAGE>NONE</of:CODEPAGE> + <of:AUTHID>${authId?if_exists}</of:AUTHID> + </os:SENDER> + <os:DATETIMEANY>${sentDate?if_exists}</os:DATETIMEANY> + </os:CNTROLAREA> <n:DATAAREA> <n:CONFIRM_BOD> <n:CONFIRM> - <N1:CNTROLAREA> - <N1:SENDER> - <N2:LOGICALID>${errorLogicalId?if_exists}</N2:LOGICALID> - <N2:COMPONENT>${errorComponent?if_exists}</N2:COMPONENT> - <N2:TASK>${errorTask?if_exists}</N2:TASK> - <N2:REFERENCEID>${errorReferenceId?if_exists}</N2:REFERENCEID> - </N1:SENDER> - <N1:DATETIMEANY></N1:DATETIMEANY> - </N1:CNTROLAREA> - <N2:ORIGREF>${origRef?if_exists}</N2:ORIGREF> + <os:CNTROLAREA> + <os:SENDER> + <of:LOGICALID>${errorLogicalId?if_exists}</of:LOGICALID> + <of:COMPONENT>${errorComponent?if_exists}</of:COMPONENT> + <of:TASK>${errorTask?if_exists}</of:TASK> + <of:REFERENCEID>${errorReferenceId?if_exists}</of:REFERENCEID> + </os:SENDER> + <os:DATETIMEANY></os:DATETIMEANY> + </os:CNTROLAREA> + <of:ORIGREF>${origRef?if_exists}</of:ORIGREF> <#if errorMapList?exists> <#list errorMapList as errorMap> <n:CONFIRMMSG> - <N2:DESCRIPTN>${errorMap.description?if_exists}</N2:DESCRIPTN> - <N2:REASONCODE>${errorMap.reasonCode?if_exists}</N2:REASONCODE> + <of:DESCRIPTN>${errorMap.description?if_exists}</of:DESCRIPTN> + <of:REASONCODE>${errorMap.reasonCode?if_exists}</of:REASONCODE> </n:CONFIRMMSG> </#list> </#if> |
Free forum by Nabble | Edit this page |