Saturday, June 22, 2019

Sample Program using CallAPI with Service Name

Sample Code #1:

/* Bof - Fetch EnterpriseCode based on User's Node */
   YFCElement inXMLEnterpriseId = YFCDocument.createDocument("Label").getDocumentElement() ;
   inXMLEnterpriseId.setAttribute("Node", sNode);

%>
<yfc:callAPI serviceName="WMListNodeEnterpriseCode" inputElement='<%=inXMLEnterpriseId%>' outputNamespace="outEntCode" />
<%
errorDesc=checkForError() ;

if(isVoid(errorDesc)){
sEnterpriseCode = getValue("outEntCode", "xml:/OrganizationList/@EnterpriseCode");

if (sEnterpriseCode != "") {
request.setAttribute("xml:/Label/@EnterpriseCode",sEnterpriseCode);
System.out.println("=======EnterpriseCode======="+sEnterpriseCode);
} else {
errorDesc = "EnterpriseCode Cannot be empty!";
}

}

/* Eof - Fetch EnterpriseCode based on User's Node */


Sample Code #2:



No comments:

Post a Comment

Popular Posts