Vous êtes sur la page 1sur 5

/*

* To change this template, choose Tools | Templates


* and open the template in the editor.
*/
package psapps;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import java.util.*;
/**
*
* @author Madasamy
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
// Create Method
/** try { // Call Web Service Operation
System.out.println("Program Starting...");
_30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.CITESTEMP
CI service = new _30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.
CITESTEMPCI();
_30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.CITESTEMP
CIPortType port = service.getCITESTEMPCIPort();
// TODO initialize WS operation arguments here
_30._221._225._10._8060.enterprise.fscm.schema.m769270.CreateCompIntfcTE
STEMPCITypeShape parameter = new _30._221._225._10._8060.enterprise.fscm.schema.
m769270.CreateCompIntfcTESTEMPCITypeShape();
// TODO process result here
System.out.println("Initializing....");
// Header Values
_30._221._225._10._8060.enterprise.fscm.schema.m769270.EMPLIDTypeShape E
mplid = new _30._221._225._10._8060.enterprise.fscm.schema.m769270.EMPLIDTypeSha
pe();
Emplid.setValue("C0001");
parameter.setEMPLID(Emplid);
// Detail Values
_30._221._225._10._8060.enterprise.fscm.schema.m769270.TESTEMPDTLTypeSha
pe Empdtl = new _30._221._225._10._8060.enterprise.fscm.schema.m769270.TESTEMPDT
LTypeShape();
//Effective Date
_30._221._225._10._8060.enterprise.fscm.schema.m769270.EFFDTTypeShape Ef
fdt1 = new _30._221._225._10._8060.enterprise.fscm.schema.m769270.EFFDTTypeShape
();
//javax.xml.datatype.XMLGregorianCalendar date1 = new javax.xml.datatype
.XMLGregorianCalendar();
DatatypeFactory df = DatatypeFactory.newInstance();
XMLGregorianCalendar date1 = df.newXMLGregorianCalendar();
date1.setYear(1990);
date1.setMonth(01);
date1.setDay(01);
System.out.println("Date:" + date1);
Effdt1.setValue(date1);
Empdtl.setEFFDT(Effdt1);
//Effective Status
_30._221._225._10._8060.enterprise.fscm.schema.m769270.EFFSTATUSTypeShap
e EffStat1 = new _30._221._225._10._8060.enterprise.fscm.schema.m769270.EFFSTATU
STypeShape();
EffStat1.setValue("A");
Empdtl.setEFFSTATUS(EffStat1);
//Address1
_30._221._225._10._8060.enterprise.fscm.schema.m769270.EMPLOYERADDR1Type
Shape EmpAddr1 = new _30._221._225._10._8060.enterprise.fscm.schema.m769270.EMPL
OYERADDR1TypeShape();
EmpAddr1.setValue("77,New Street");
Empdtl.setEMPLOYERADDR1(EmpAddr1);
//Address2
_30._221._225._10._8060.enterprise.fscm.schema.m769270.EMPLOYERADDR2Type
Shape EmpAddr2 = new _30._221._225._10._8060.enterprise.fscm.schema.m769270.EMPL
OYERADDR2TypeShape();
EmpAddr2.setValue("Bangalore-34");
Empdtl.setEMPLOYERADDR2(EmpAddr2);
// Passing the Detail Values to the parameter
parameter.getTESTEMPDTL().add(Empdtl);
System.out.println("Created...");
_30._221._225._10._8060.enterprise.fscm.schema.m283599.CreateCompIntfcTE
STEMPCIResponseTypeShape result = port.create(parameter);
System.out.println("Result = " + result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}*/

// Get Method
/** try { // Call Web Service Operation
_30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.CITESTEMP
CI service = new _30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.
CITESTEMPCI();
_30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.CITESTEMP
CIPortType port = service.getCITESTEMPCIPort();
// TODO initialize WS operation arguments here
_30._221._225._10._8060.enterprise.fscm.schema.m818618.GetCompIntfcTESTE
MPCITypeShape parameter = new _30._221._225._10._8060.enterprise.fscm.schema.m81
8618.GetCompIntfcTESTEMPCITypeShape();
// TODO process result here
System.out.println("Starting Get Method");
_30._221._225._10._8060.enterprise.fscm.schema.m818618.EMPLIDTypeShape E
mplid = new _30._221._225._10._8060.enterprise.fscm.schema.m818618.EMPLIDTypeSha
pe();
Emplid.setValue("C0001");
parameter.setEMPLID(Emplid);
_30._221._225._10._8060.enterprise.fscm.schema.m915423.GetCompIntfcTESTE
MPCIResponseTypeShape result = port.get(parameter);
System.out.println("Result = " + result);
System.out.println("Detail Values");
List ls = result.getTESTEMPDTL();
Iterator li = ls.iterator();
while (li.hasNext()) {
_30._221._225._10._8060.enterprise.fscm.schema.m915423.TESTEMPDTLTypeSha
pe Empdtl = (_30._221._225._10._8060.enterprise.fscm.schema.m915423.TESTEMPDTLTy
peShape) li.next();
System.out.println("Effective Date:" + Empdtl.getEFFDT().getValue().getY
ear() + "/" + Empdtl.getEFFDT().getValue().getMonth() + "/" + Empdtl.getEFFDT().
getValue().getDay());
System.out.println("Effective Status:" + Empdtl.getEFFSTATUS().getValue(
));
System.out.println("Address1:" + Empdtl.getEMPLOYERADDR1().getValue());
System.out.println("Address2:" + Empdtl.getEMPLOYERADDR2().getValue());
}
} catch (Exception ex) {
// TODO handle custom exceptions here m769270
}
*/

//Update Method -- Which is used to Update key values. means, it will


insert a new row into the table.
/** try { // Call Web Service Operation
_30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.CITES
TEMPCI service = new _30._221._225._10._8060.enterprise.fscm.service.ci_test_emp
_ci.CITESTEMPCI();
_30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.CITES
TEMPCIPortType port = service.getCITESTEMPCIPort();
// TODO initialize WS operation arguments here
_30._221._225._10._8060.enterprise.fscm.schema.m854538.UpdateCompInt
fcTESTEMPCITypeShape parameter = new _30._221._225._10._8060.enterprise.fscm.sch
ema.m854538.UpdateCompIntfcTESTEMPCITypeShape();
// TODO process result here
_30._221._225._10._8060.enterprise.fscm.schema.m854538.EMPLIDTypeSha
pe Emplid = new _30._221._225._10._8060.enterprise.fscm.schema.m854538.EMPLIDTyp
eShape();
Emplid.setValue("C0001");
parameter.setEMPLID(Emplid);
_30._221._225._10._8060.enterprise.fscm.schema.m854538.TESTEMPDTLTyp
eShape Empdtl = new _30._221._225._10._8060.enterprise.fscm.schema.m854538.TESTE
MPDTLTypeShape();
//Effective Date
_30._221._225._10._8060.enterprise.fscm.schema.m854538.EFFDTTypeShap
e Effdt1 = new _30._221._225._10._8060.enterprise.fscm.schema.m854538.EFFDTTypeS
hape();
DatatypeFactory df = DatatypeFactory.newInstance();
XMLGregorianCalendar date1 = df.newXMLGregorianCalendar();
date1.setYear(2010);
date1.setMonth(01);
date1.setDay(01);
Effdt1.setValue(date1);
Empdtl.setEFFDT(Effdt1);
//Effective Status
_30._221._225._10._8060.enterprise.fscm.schema.m854538.EFFSTATUSType
Shape EffStat1 = new _30._221._225._10._8060.enterprise.fscm.schema.m854538.EFFS
TATUSTypeShape();
EffStat1.setValue("A");
Empdtl.setEFFSTATUS(EffStat1);
//Address1
_30._221._225._10._8060.enterprise.fscm.schema.m854538.EMPLOYERADDR1
TypeShape Addr1 = new _30._221._225._10._8060.enterprise.fscm.schema.m854538.EMP
LOYERADDR1TypeShape();
Addr1.setValue("Test");
Empdtl.setEMPLOYERADDR1(Addr1);
// Passing the Detail Values to the parameter
parameter.getTESTEMPDTL().add(Empdtl);
_30._221._225._10._8060.enterprise.fscm.schema.m377779.UpdateCompInt
fcTESTEMPCIResponseTypeShape result = port.update(parameter);
System.out.println("Result = " + result);
} catch (Exception ex) {
// TODO handle custom exceptions here
} */

//Update Data Method -- Which is used to Update Non key values


try { // Call Web Service Operation
_30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.CITES
TEMPCI service = new _30._221._225._10._8060.enterprise.fscm.service.ci_test_emp
_ci.CITESTEMPCI();
_30._221._225._10._8060.enterprise.fscm.service.ci_test_emp_ci.CITES
TEMPCIPortType port = service.getCITESTEMPCIPort();
// TODO initialize WS operation arguments here
_30._221._225._10._8060.enterprise.fscm.schema.m118036.UpdatedataCom
pIntfcTESTEMPCITypeShape parameter = new _30._221._225._10._8060.enterprise.fscm
.schema.m118036.UpdatedataCompIntfcTESTEMPCITypeShape();
// TODO process result here
_30._221._225._10._8060.enterprise.fscm.schema.m118036.EMPLIDTypeSha
pe Emplid = new _30._221._225._10._8060.enterprise.fscm.schema.m118036.EMPLIDTyp
eShape();
Emplid.setValue("C0001");
parameter.setEMPLID(Emplid);
_30._221._225._10._8060.enterprise.fscm.schema.m118036.TESTEMPDTLTyp
eShape Empdtl = new _30._221._225._10._8060.enterprise.fscm.schema.m118036.TESTE
MPDTLTypeShape();
//Effective Date
_30._221._225._10._8060.enterprise.fscm.schema.m118036.EFFDTTypeShap
e Effdt1 = new _30._221._225._10._8060.enterprise.fscm.schema.m118036.EFFDTTypeS
hape();
DatatypeFactory df = DatatypeFactory.newInstance();
XMLGregorianCalendar date1 = df.newXMLGregorianCalendar();
date1.setYear(2010);
date1.setMonth(01);
date1.setDay(01);
Effdt1.setValue(date1);
Empdtl.setEFFDT(Effdt1);
//Effective Status
_30._221._225._10._8060.enterprise.fscm.schema.m118036.EFFSTATUSType
Shape EffStat1 = new _30._221._225._10._8060.enterprise.fscm.schema.m118036.EFFS
TATUSTypeShape();
EffStat1.setValue("A");
Empdtl.setEFFSTATUS(EffStat1);
//Address1
_30._221._225._10._8060.enterprise.fscm.schema.m118036.EMPLOYERADDR1
TypeShape Addr1 = new _30._221._225._10._8060.enterprise.fscm.schema.m118036.EMP
LOYERADDR1TypeShape();
Addr1.setValue("18th Main road");
Empdtl.setEMPLOYERADDR1(Addr1);
//Address2
_30._221._225._10._8060.enterprise.fscm.schema.m118036.EMPLOYERADDR2
TypeShape Addr2 = new _30._221._225._10._8060.enterprise.fscm.schema.m118036.EMP
LOYERADDR2TypeShape();
Addr2.setValue("Koramangala");
Empdtl.setEMPLOYERADDR2(Addr2);
// Passing the Detail Values to the parameter
parameter.getTESTEMPDTL().add(Empdtl);
_30._221._225._10._8060.enterprise.fscm.schema.m490148.UpdatedataCom
pIntfcTESTEMPCIResponseTypeShape result = port.updatedata(parameter);
System.out.println("Result = "+result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}
}
}

Vous aimerez peut-être aussi