『壹』 如何通过.h头文件生成wsdl文件
我用C++语言写了一个WebService,但现在缺一个wsdl文件。请问如何通过.h头文件生成wsdl文件?使用gSOAP工具可以吗
------解决方案--------------------
The gSOAP stub and skeleton compiler soapcpp2 generates WSDL (Web Service Description Language) service descriptions and XML Schema files when processing a header file.
『贰』 java webservice怎么生成wsdl文件
在大多数情况下我们都需要为我们的服务提供一个WSDL文件,而 Axis2's Java2WSDL 是专门用来生成WSDL文件的D专用工具,如果你要在命令行模式下进行生成WSDL文件,首先需要保证你的环境变量AXIS2_HOME是否已经配置OK,同时还要保证把%AXIS2_HOME%\bin加入到你的path环境中,要生成 WSDL文件,首先要保证你的class能够编译成功,而且已经编译成功,然后进入class文件编译后的根目录(在JBuilder中是classes,在Eclipse中是bin目录)这时,生成WSDL文件的准备工作已经OK。
下面是生成WSDL文件时的可选参数和参数说明:
---------------------------------------------------------------------------------
Usage java2wsdl -cn <fully qualified class name> : class file name
-o <output Location> : output file location
-cp <class path uri> : list of classpath entries - (urls)
-tn <target namespace> : target namespace
-tp <target namespace prefix> : target namespace prefix
-stn <schema target namespace> : target namespace for schema
-stp <schema target namespace prefix> : target namespace prefix for schema
-sn <service name> : service name
-of <output file name> : output file name for the WSDL
-st <binding style> : style for the WSDL
-u <binding use> : use for the WSDL
-l <soap address> : address of the port for the WSDL
-nsg <generator class name> : fully qualified name of the class that implements NamespaceGenerator
-p2n [<java package>,<namespace] [<java package>,<namespace]... : java package to namespace mapping for argument and return types...to assign all types to a single namespace : -p2n [all , <namespace>] ...
-efd <qualified/unqualified> : Setting for elementFormDefault (defaults to qualified)
-afd <qualified/unqualified> : Setting for attributeFormDefault (defaults to qualified)
-xc <extra class> : Extra class for which schematype must be generated.
Use as : -xc class1 -xc class2 ...
典型地,进入你的工程的二进制编译根目录,执行命令模板如下:
java2wsdl -cp . -cn [PACKAGENAME].[CLASSNAME]-of [FILENAME].wsdl
现在我们假设在samples.helloworld.service.axiom;包下面有个HelloWorldService类,工程的类文件编译后存放在build\classes目录下,那么,首先进入该目录中,然后执行以下命令:
java2wsdl -cp . -cn samples.helloworld.service.axiom.HelloWorldService -of HelloWorldService.wsdl
执行后的CMD提示如下说明已经成功执行了:
Using AXIS2_HOME: D:\axis2-1.1.1
Using JAVA_HOME: C:\Program Files\Java\jdk1.5.0_06
『叁』 跪求大神指导:linux下使用gsoap生成C++代码访问WebService编译出错
我不知道为什么学生认为你好运。
请stdsoap2.cpp和stdsoap2.h添加到您的项目中去......
『肆』 gsoap webservice 怎么发布
下载开源的gSOAP,并解压到本地的D:\webservice文件夹下。
以获取天气为例,下载天气预报的wsdl文件,保存文专件Weather.wsdl到D:\webservice文件夹下。
基于Weather.wsdl创建头文件Weather.h。
基于头文件Weather.h创建soap接口源文件。
开启Visual Studio 2008,新建一个项目。项目的保存目录是D:\webservice\Weather
将第3、4步骤生成的文属件拷贝到项目的保存目录D:\webservice\Weather下,并从gsoap目录下拷贝两个文件stdsoap2.h,stdsoap2.cpp。将源文件加入到项目中。
新建一个main.cpp文件,并输入代码。
编译程序,运行,查看结果。
『伍』 c++通过gsoap调用webservice接口时 gsoap生成的soapxxxproxy.cpp/h文件有什么用 里面那些类与方法怎么用
码所代表的意义不同,因此应弄清您所检测的
『陆』 webservice里面怎样生成wsdl-CSDN论坛
利用zend创建(生成)WSDL文件(PHP SOAP)
听说Zend XmlRpc的WSDL的编写非常容易,有空试试得,下面介绍一下soap的WSDL的编写!
玩SOAP,最麻烦的莫过于WSDL的编写,我一直认为那玩意儿不是人写的,今天我才发现,的确那玩意儿是不需要人写的
我们先定义一个类(文件 sum.php):
class Sum
{
/**
* 求和
*
* @param float $x
* @param float $y
* @return float
『柒』 如何用gsoap生成不同的soapC.cpp等文件
1、下载来soap2、解压到自c:\gsoap-2.73、将c:\gsoap-2.7下的soapcpp2.exe,wsdl2h.exe,stdsoap2.h,stdsoap2.cpp拷贝到C:\wstest\client\gsoap2.7目录下4、在C:\wstest\client\gsoap2.7目录下执行soapcpp2-C-xtest.h-I"C:/gsoap-2.7/gsoap/i
『捌』 如何查看 gsoap 发布的wsdl
可以的来 你可以搜索一下自: 通过双向证书认证使用 gSOAP 访问 web services 这个文档,内容太多,就不为你转载了 节选:本文通过一系列的实验步骤描述,向您展示如何使用 gSOAP 编写的客户端,通过双向证书认证,访问由 tomcat7 和 Axis2 搭建的 w
『玖』 gsoap 生成客户端C程序怎么使用CDATA区段
c++gsoap调用webservice的方法步骤:生成存客户端存根程序和框架wsdl2h-oxxx.hxxx.wsdl(-tD:/gsoap-2.7/gsoap/typemap.dat)soapcpp2-L-x-ixxx.h(-ID:/gsoap-2.7/gsoap/import)或直接自己编写xxx.h,并生成xxx.wsdl//gsoapnsservicename:xxx//gsoapnsservicestyle:rpc//gsoapnsserviceencoding:literal//gsoapnsservicelocation:ht//localhost:8080//gsoapnsschemanamespace:ht/localhost:8080/xxx.wsdlintns__add(inta,intb,int*result);客户端1)把如下生成的文件添加到项目:stdsoap2.h,stdsoap2.cpp,soapH.h,soapC.cpp,soapStub.h,soapxxxProxy.h,soapxxxProxy.cpp,xxxSoap.nsmapwsock32.lib2)代理方式调用#include"soapTestWebServiceProxy.h"#include"TestWebService.nsmap"intmain(intargc,char*argv[]){intresult=0;TestWebServiceProxyproxy;proxy.add(12,23,&result);}//w服务端1)把如下生成的文件添加到项目:stdsoap2.h,stdsoap2.cpp,soapH.h,soapC.cpp,soapStub.h,soapxxxService.h,soapxxxService.cpp,xxxSoap.nsmapwsock32.lib2)实现接口函数intTestWebServiceService::add(inta,intb,int*result){*result=a+b;returnSOAP_OK;}/3)开启服务#include"soapTestWebServiceService.h"#include"TestWebService.nsmap"intmain(intargc,char*argv[]){TestWebServiceServiceservice;service.run(8080);