JAVA is called with Axis1. NET's Web Service

Source: Internet
Author: User

1. Go to the official website to download the jar package for axis, I am under the 1.4 version of

Http://axis.apache.org/axis/java/releases.html

2.JAVA Code:

public void MyWebService () throws Exception {
Service service = new service ();
Call call = NULL;
try {
Call = (call) Service.createcall ();
Http://10.107.56.11/test/wsValidateAccount.asmx is the URL address of the Web service call.settargetendpointaddress (the new URL ("H Ttp://10.107.56.11/test/wsvalidateaccount.asmx "));
http://tempuri.org/is the namespace of the Web service, validate is the function name, and the following is the Call.setoperationname (new QName ("Http://tempuri.or g/"," validate "));
To add a parameter, the account is the function's parameter name Call.addparameter (new QName ("http://tempuri.org/", "Account"), org.apache.axis.encoding.x Mltype.xsd_string, Javax.xml.rpc.ParameterMode.IN);
To add a parameter, PWD is the function's parameter name Call.addparameter (new QName ("http://tempuri.org/", "pwd"), org.apache.axis.encoding.xmltype.x Sd_string, Javax.xml.rpc.ParameterMode.IN);

Set function return type
Call.setreturntype (Org.apache.axis.encoding.XMLType.XSD_BOOLEAN);
Call.setusesoapaction (TRUE);
        

To webservice the function of a parameter








}

JAVA is called with Axis1. NET's Web Service

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.