Linux gsoap access to Jira

Source: Internet
Author: User
Download gsoap-linux-2.7.tar.gz (http://gsoap2.sourceforge.net/) to/test/gsoap
Decompress gsoap-2.7.tar.gz
Run
./Configure -- prefix =/usr/local/gsoap
Make
Make install

Cd/
# Create a/jira folder
Mkdir/jira

Cd/jira

# Http: //.../jira/rpc/soap/jirasoapservice-v2? Wsdl: This is the jira wsdl file.

/Usr/local/gsoap/bin/wsdl2h-c-o jira. h http: //.../jira/rpc/soap/jirasoapservice-v2? Wsdl

/Usr/local/gsoap/bin/soapcpp2-c jira. h
/Usr/local/gsoap/bin/wsdl2h is the installation path of gsoap.
Gcc-I/test/gsoap/gsoap-2.7/gsoap-o jiraclient. c soapC. c soapClient. c/test/gsoap/gsoap-2.7/gsoap/stdsoap2.c
/Test/gsoap/gsoap-2.7/gsoap ==> download source file decompression path of gsoap
When an error occurs, delete the error function in the specified file until there is no error. Warning does not matter.

If the compilation is successful, the jiraclient executable file is generated in the/jira directory.

The executable file name generated by-o.

The following is the dependent file.

Run the command as follows.
Cd/jira
./Jiraclient jiraname jirapwd

For gcc-I/test/gsoap/gsoap-2.7/gsoap-o jiraclient. c soapC. c soapClient. c/test/gsoap/gsoap-2.7/gsoap/stdsoap2.c

This command, tested-I/test/gsoap/gsoap-2.7/gsoap can be omitted. Stdsoap2.c stdsoap2.h in/test/gsoap/gsoap-2.7/gsoap/stdsoap2.c

Copy to the/jira folder. In this way, the compilation command is programmed.

Gcc-o jiraclient. c soapC. c soapClient. c stdsoap2.c

 

The following is the source code of jiraclient. c.

--------------------
Jiraclient. c
--------------------
# Include "soapH. h"
# Include "jirasoapservice_v2SoapBinding.nsmap"
Int main (int argc, char ** argv)
{
Struct soap;
Soap_init (& soap );
Char * retValue;
// SoapStub. h contains the soap_call_ns4 _ login function. All WebService methods that can be called are in this folder.
If (soap_call_ns4 _ login (& soap, NULL, NULL, argv [1], argv [2], & retValue) = SOAP_ OK)
Printf ("% s", retValue );
Else
Soap_print_fault (& soap, stderr );
Soap_destroy (& soap );
Soap_end (& soap );
Soap_done (& soap );
RetValue = null;
Return 0;
}

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.