Joke Collection Website - Blessing messages - How does java program call webservice interface to realize the function of sending short messages?

How does java program call webservice interface to realize the function of sending short messages?

Give you the simplest way:

1. according to http:/134.224.102.6: 80/company send sminf/services/SMS INF? WSDL gets the wsdl file.

Secondly, according to the jar package of Axis, the WSDL file is generated as customer service java code. (For ease of management, you can type java files into jar files. How to generate java code is explained in Baidu, so I won't write it. )

Third, in your project, use the function attribute of AXIS to call the external interface; Give you a format template:

MobileCodeWSLocator l = new MobileCodeWSLocator(); ///mobilecodewlocator is a client java class generated by WSDL file;

MobileCodeWSSoap s = l . getmobilecodewssoap(); (); ///mobilecodewsoap is a client java class generated by WSDL file.

string m = s . getmobilecodeinfo(" 138 1 1534742 "," ");

If you use the java class generated by Axis, the format is the same as above; Just refer to it yourself.

The connection above you is obviously abnormal, and the third-party service is obviously not opened. WEBSERVICE can set user name and password like all web services, so consider security.