Used to Soapui,apache-cxf,eclipse.
1. Address validity provided using the SOAPUI test
WSDL Address: http://192.168.56.101:8800/PSIGW/PeopleSoftServiceListeningConnector/PSFT_HR/C_HR_CLUB.1.wsdl
Creating SoapUI Projects File->new SoapUI Project
Click OK.
Display the interface, double-click Request1, click the Green button, execute, see response result
The right side is the response result.
2. Generate Java Client code
Now to invoke the interface on the Java side, first, in the Soapui interface, file->preferences, configure global settings.
Use CXF to generate Java code.
Under D:\SRC\COM\CXF see (through the cmd command, Wsdl2java is the same)
3. Import this package into eclipse
The test code is as follows:
Import Com.cxf.ApplyJoinClub;
Import Com.cxf.CHRCLUB;
Import Com.cxf.CHRCLUBPortType;
Import Com.cxf.GetJoinClubStatus;
public class Stringtest {
Public static void Main (string[] args) {
//spring Management
//applicationcontext ctx = new Classpathxmlapplicationcontext ("Applicationcontext-cxf.xml");
//chrclubporttype cc = Ctx.getbean ("Testservice", chrclubporttype.class);
applyjoinclub AA = new Applyjoinclub ();
aa.setname ("zzz");
aa.setemail ("[email protected]");
aa.setclubid ("101");
//java tests
chrclub C = new Chrclub ();
Chrclubporttype CCC = C.getchrclubport ();
Getjoinclubstatus GJ = ccc.capplyjoinclub (aa);
System.out.println ("----" +gj.getrescode () + "=" +gj.getresdescr () + "=" +gj.getresdescrlong ());
}
}
Remember: The parameter name returned by PS cannot be used: Faultcode,faultstring,detail, because CXF internally, use these parameters to determine the response condition.
Java calls the WebService interface provided by PeopleSoft