Download the Axis. jar package online
Put it in the C: // lib directory, a total of 9.
Then, run the following command on the console:
C: \ lib
Java-classpath ".; commons-logging-1.0.4.jar; axis. jar; commons-discovery-0.2.jar; jaxrpc. jar; wsdl4j-1.5.1.jar;
Saaj. jar; activation. jar; mail. jar "org. apache. axis. wsdl. WSDL2Java-o" abcdefg"
Http: // 10.10.10.111/WebService/ManageUsersService. asmx? Wsdl
The corresponding java classes will be generated under the corresponding directory, and these classes will be copied to your project directory,
Add the nine packages of Axis to the project, and you can call WebService like a normal class.
Call method: MsgService MS = new MsgServiceLocator ();
MsgServiceSoap msgServer = ms. getMsgServiceSoap ();
String strSystemID = "ffffffffffffffffffffffffffff"; // UAP System ID, 32-bit.
String strAccessUserName = "aaa"; // you need to apply
String strAccessPassWord = "aaa"; // you need to apply
String strSMSurl = http: // */MsgService. asmx; // SMS webService address
SendMMSIn pIn = new SendMMSIn (); // Message Parameter class
PIn. setFromUserMobile (""); // the sender's mobile phone
PIn. setcancelist (new String [] {"13510985723"}); // receiving mobile phone list
SimpleDateFormat bartDateFormat = new SimpleDateFormat ("yyyy-MM-dd HH: mm: ss ");
PIn. setSendTime (bartDateFormat. format (new Date (System. currentTimeMillis (); // sending time
// Add MMS content-Text
MMcontent mm1 = new MMcontent ();
Mm1.setCharSet ("UTF-8 ");
String mm1Content = "use WS to send MMs! ";
Mm1.setContentBytes (mm1Content. getBytes ("UTF-8 "));
Mm1.setContentID ("text1.txt ");
Mm1.setContentType (MMcontentType. TEXT );
// Add MMS content-Image
MMcontent mm2 = new MMcontent ();
Mm2.setCharSet ("UTF-8 ");
Byte [] bytes = getByteFromFile ("F: \ mmsjp.jpg ");
Mm2.setContentBytes (bytes );
Mm2.setContentType (MMcontentType. JPEG );
Mm2.setContentID ("mmsjp.jpg ");
MMcontent [] mmcs = new MMcontent [] {mm1, mm2 };
PIn. setMmsContents (mmcs );
SendMMSOutHolder pOut = new SendMMSOutHolder ();
SXTCallResultHolder result = new SXTCallResultHolder ();
MsgServer. sendMMS (strSystemID, strAccessUserName, strAccessPassWord, pIn, result, pOut );