📄 ws-example.c
字号:
/*example.c--------------------------------------------------------------------------------gSOAP XML Web services toolsCopyright (C) 2004-2005, Robert van Engelen, Genivia Inc. All Rights Reserved.This software is released under one of the following two licenses:GPL or Genivia's license for commercial use.--------------------------------------------------------------------------------GPL license.This program is free software; you can redistribute it and/or modify it underthe terms of the GNU General Public License as published by the Free SoftwareFoundation; either version 2 of the License, or (at your option) any laterversion.This program is distributed in the hope that it will be useful, but WITHOUT ANYWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR APARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along withthis program; if not, write to the Free Software Foundation, Inc., 59 TemplePlace, Suite 330, Boston, MA 02111-1307 USAAuthor contact information:engelen@genivia.com / engelen@acm.org--------------------------------------------------------------------------------A commercial use license is available from Genivia, Inc., contact@genivia.com--------------------------------------------------------------------------------*/#include "soapH.h"#include "calc.nsmap"int main(){ struct soap soap; struct SOAP_ENV__Header header; struct wsa__EndpointReferenceType replyTo; double n; soap_init(&soap); soap_default_SOAP_ENV__Header(&soap, &header); soap_default_wsa__EndpointReferenceType(&soap, &replyTo); replyTo.Address = "http://websrv.cs.fsu.edu/~engelen/calcclient.cgi"; header.wsa__MessageID = "uuid:aaaabbbb-cccc-dddd-eeee-ffffffffffff"; header.wsa__ReplyTo = &replyTo; header.wsa__To = "http://websrv.cs.fsu.edu/~engelen/calcserver.cgi"; header.wsa__Action = "http://websrv.cs.fsu.edu/~engelen/result"; soap.header = &header; printf("Testing: the WS-Addressing request send to the calc server is not understood:\n"); if (soap_call_ns__add(&soap, NULL, NULL, 1, 2, &n)) soap_print_fault(&soap, stderr); else printf("1 + 2 = %g\n", n); soap_end(&soap); soap_done(&soap); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -