Fedora 18,来自官方报告的gsoap-2.8.7,在试图初始化soap class(C ++)时发生了段错误:
Valgrind日志:
== 15224 ==写入大小为8无效 == 15224 ==在0x98C59A8:soap_init0(stdsoap2_cpp.cpp:8851)
class SoapAccessor
{
public:
SoapAccessor():m_pService(new ObjectOperationsPortPortBindingProxy(SOAP_C_UTFSTRING, SOAP_C_UTFSTRING)) {};
private:
boost::scoped_ptr<ObjectOperationsPortPortBindingProxy> m_pService; //Pointer to gsoap generated class
};
使用:
Singleton<SoapAccessor>::getInstance()
此类是共享库的一部分。
ObjectOperationsPortPortBindingProxy.cpp:
#include "soapobjectOperationsPortPortBindingProxy.h"
objectOperationsPortPortBindingProxy::objectOperationsPortPortBindingProxy()
{ objectOperationsPortPortBindingProxy_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
}
objectOperationsPortPortBindingProxy::objectOperationsPortPortBindingProxy(const struct soap &_soap) : soap(_soap)
{ }
objectOperationsPortPortBindingProxy::objectOperationsPortPortBindingProxy(const char *url)
{ objectOperationsPortPortBindingProxy_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
soap_endpoint = url;
}
objectOperationsPortPortBindingProxy::objectOperationsPortPortBindingProxy(soap_mode iomode)
{ objectOperationsPortPortBindingProxy_init(iomode, iomode);
}
objectOperationsPortPortBindingProxy::objectOperationsPortPortBindingProxy(const char *url, soap_mode iomode)
{ objectOperationsPortPortBindingProxy_init(iomode, iomode);
soap_endpoint = url;
}
objectOperationsPortPortBindingProxy::objectOperationsPortPortBindingProxy(soap_mode imode, soap_mode omode)
{ objectOperationsPortPortBindingProxy_init(imode, omode);
}
objectOperationsPortPortBindingProxy::~objectOperationsPortPortBindingProxy()
{ }
void objectOperationsPortPortBindingProxy::objectOperationsPortPortBindingProxy_init(soap_mode imode, soap_mode omode)
{ soap_imode(this, imode);
soap_omode(this, omode);
soap_endpoint = NULL;
static const struct Namespace namespaces[] =
{
{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL},
{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL},
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
{"ns1", "http://siteaddress/space/types/1.0", NULL, NULL},
{"ns2", "http://siteaddress/common/types/1.0", NULL, NULL},
{"ns3", "http://siteaddress/common/query/1.0", NULL, NULL},
{"ns4", "http://siteaddress/common/interaction/1.0", NULL, NULL},
{NULL, NULL, NULL, NULL}
};
soap_set_namespaces(this, namespaces);
}
void objectOperationsPortPortBindingProxy::destroy()
{ soap_destroy(this);
soap_end(this);
}
void objectOperationsPortPortBindingProxy::soap_noheader()
{ this->header = NULL;
}
const SOAP_ENV__Header *objectOperationsPortPortBindingProxy::soap_header()
{ return this->header;
}
const SOAP_ENV__Fault *objectOperationsPortPortBindingProxy::soap_fault()
{ return this->fault;
}
const char *objectOperationsPortPortBindingProxy::soap_fault_string()
{ return *soap_faultstring(this);
}
const char *objectOperationsPortPortBindingProxy::soap_fault_detail()
{ return *soap_faultdetail(this);
}
int objectOperationsPortPortBindingProxy::soap_close_socket()
{ return soap_closesock(this);
}
int objectOperationsPortPortBindingProxy::soap_force_close_socket()
{ return soap_force_closesock(this);
}
void objectOperationsPortPortBindingProxy::soap_print_fault(FILE *fd)
{ ::soap_print_fault(this, fd);
}
#ifndef WITH_LEAN
#ifndef WITH_COMPAT
void objectOperationsPortPortBindingProxy::soap_stream_fault(std::ostream& os)
{ ::soap_stream_fault(this, os);
}
#endif
char *objectOperationsPortPortBindingProxy::soap_sprint_fault(char *buf, size_t len)
{ return ::soap_sprint_fault(this, buf, len);
}
#endif
int objectOperationsPortPortBindingProxy::getProperties(const char *endpoint, const char *soap_action, ns3__propertiesQueryType *ns3__getPropertiesQuery, ns2__propertiesType *ns2__properties)
{ struct soap *soap = this;
struct __ns4__getProperties soap_tmp___ns4__getProperties;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/getProperties";
soap->encodingStyle = NULL;
soap_tmp___ns4__getProperties.ns3__getPropertiesQuery = ns3__getPropertiesQuery;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__getProperties(soap, &soap_tmp___ns4__getProperties);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__getProperties(soap, &soap_tmp___ns4__getProperties, "-ns4:getProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__getProperties(soap, &soap_tmp___ns4__getProperties, "-ns4:getProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!ns2__properties)
return soap_closesock(soap);
ns2__properties->soap_default(soap);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
ns2__properties->soap_get(soap, "ns2:properties", "ns2:propertiesType");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}
int objectOperationsPortPortBindingProxy::setProperties(const char *endpoint, const char *soap_action, ns3__setQueryType *ns3__setQuery, bool &ns3__nothing)
{ struct soap *soap = this;
struct __ns4__setProperties soap_tmp___ns4__setProperties;
struct __ns4__setPropertiesResponse *soap_tmp___ns4__setPropertiesResponse;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/setProperties";
soap->encodingStyle = NULL;
soap_tmp___ns4__setProperties.ns3__setQuery = ns3__setQuery;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__setProperties(soap, &soap_tmp___ns4__setProperties);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__setProperties(soap, &soap_tmp___ns4__setProperties, "-ns4:setProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__setProperties(soap, &soap_tmp___ns4__setProperties, "-ns4:setProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!&ns3__nothing)
return soap_closesock(soap);
soap_default_bool(soap, &ns3__nothing);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
soap_tmp___ns4__setPropertiesResponse = soap_get___ns4__setPropertiesResponse(soap, NULL, "-ns4:setPropertiesResponse", "xsd:boolean");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
ns3__nothing = soap_tmp___ns4__setPropertiesResponse->ns3__nothing;
return soap_closesock(soap);
}
int objectOperationsPortPortBindingProxy::saveObject(const char *endpoint, const char *soap_action, ns3__saveObjectQueryType *ns3__saveObjectQuery, LONG64 &ns2__objectId)
{ struct soap *soap = this;
struct __ns4__saveObject soap_tmp___ns4__saveObject;
struct __ns4__saveObjectResponse *soap_tmp___ns4__saveObjectResponse;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/saveObject";
soap->encodingStyle = NULL;
soap_tmp___ns4__saveObject.ns3__saveObjectQuery = ns3__saveObjectQuery;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__saveObject(soap, &soap_tmp___ns4__saveObject);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__saveObject(soap, &soap_tmp___ns4__saveObject, "-ns4:saveObject", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__saveObject(soap, &soap_tmp___ns4__saveObject, "-ns4:saveObject", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!&ns2__objectId)
return soap_closesock(soap);
soap_default_LONG64(soap, &ns2__objectId);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
soap_tmp___ns4__saveObjectResponse = soap_get___ns4__saveObjectResponse(soap, NULL, "-ns4:saveObjectResponse", "xsd:long");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
ns2__objectId = soap_tmp___ns4__saveObjectResponse->ns2__objectId;
return soap_closesock(soap);
}
int objectOperationsPortPortBindingProxy::getReservedObjects(const char *endpoint, const char *soap_action, std::string ns3__reservedClassName, ns2__objectsType *ns2__objects)
{ struct soap *soap = this;
struct __ns4__getReservedObjects soap_tmp___ns4__getReservedObjects;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/getReservedObjects";
soap->encodingStyle = NULL;
soap_tmp___ns4__getReservedObjects.ns3__reservedClassName = ns3__reservedClassName;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__getReservedObjects(soap, &soap_tmp___ns4__getReservedObjects);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__getReservedObjects(soap, &soap_tmp___ns4__getReservedObjects, "-ns4:getReservedObjects", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__getReservedObjects(soap, &soap_tmp___ns4__getReservedObjects, "-ns4:getReservedObjects", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!ns2__objects)
return soap_closesock(soap);
ns2__objects->soap_default(soap);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
ns2__objects->soap_get(soap, "ns2:objects", "ns2:objectsType");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}
int objectOperationsPortPortBindingProxy::getObjects(const char *endpoint, const char *soap_action, ns3__propertyQueryType *ns3__getObjectsQuery, ns2__objectsType *ns2__objects)
{ struct soap *soap = this;
struct __ns4__getObjects soap_tmp___ns4__getObjects;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/space-server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/getObjects";
soap->encodingStyle = NULL;
soap_tmp___ns4__getObjects.ns3__getObjectsQuery = ns3__getObjectsQuery;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__getObjects(soap, &soap_tmp___ns4__getObjects);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__getObjects(soap, &soap_tmp___ns4__getObjects, "-ns4:getObjects", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__getObjects(soap, &soap_tmp___ns4__getObjects, "-ns4:getObjects", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!ns2__objects)
return soap_closesock(soap);
ns2__objects->soap_default(soap);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
ns2__objects->soap_get(soap, "ns2:objects", "ns2:objectsType");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}
int objectOperationsPortPortBindingProxy::deleteObject(const char *endpoint, const char *soap_action, ns3__deleteObjectQueryType *ns3__deleteObjectQuery, bool &ns3__nothing)
{ struct soap *soap = this;
struct __ns4__deleteObject soap_tmp___ns4__deleteObject;
struct __ns4__deleteObjectResponse *soap_tmp___ns4__deleteObjectResponse;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/space-server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/deleteObject";
soap->encodingStyle = NULL;
soap_tmp___ns4__deleteObject.ns3__deleteObjectQuery = ns3__deleteObjectQuery;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__deleteObject(soap, &soap_tmp___ns4__deleteObject);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__deleteObject(soap, &soap_tmp___ns4__deleteObject, "-ns4:deleteObject", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__deleteObject(soap, &soap_tmp___ns4__deleteObject, "-ns4:deleteObject", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!&ns3__nothing)
return soap_closesock(soap);
soap_default_bool(soap, &ns3__nothing);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
soap_tmp___ns4__deleteObjectResponse = soap_get___ns4__deleteObjectResponse(soap, NULL, "-ns4:deleteObjectResponse", "xsd:boolean");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
ns3__nothing = soap_tmp___ns4__deleteObjectResponse->ns3__nothing;
return soap_closesock(soap);
}
int objectOperationsPortPortBindingProxy::deleteProperties(const char *endpoint, const char *soap_action, ns3__deleteQueryType *ns3__deleteQuery, bool &ns3__nothing)
{ struct soap *soap = this;
struct __ns4__deleteProperties soap_tmp___ns4__deleteProperties;
struct __ns4__deletePropertiesResponse *soap_tmp___ns4__deletePropertiesResponse;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/deleteProperties";
soap->encodingStyle = NULL;
soap_tmp___ns4__deleteProperties.ns3__deleteQuery = ns3__deleteQuery;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__deleteProperties(soap, &soap_tmp___ns4__deleteProperties);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__deleteProperties(soap, &soap_tmp___ns4__deleteProperties, "-ns4:deleteProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__deleteProperties(soap, &soap_tmp___ns4__deleteProperties, "-ns4:deleteProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!&ns3__nothing)
return soap_closesock(soap);
soap_default_bool(soap, &ns3__nothing);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
soap_tmp___ns4__deletePropertiesResponse = soap_get___ns4__deletePropertiesResponse(soap, NULL, "-ns4:deletePropertiesResponse", "xsd:boolean");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
ns3__nothing = soap_tmp___ns4__deletePropertiesResponse->ns3__nothing;
return soap_closesock(soap);
}
int objectOperationsPortPortBindingProxy::appendProperties(const char *endpoint, const char *soap_action, ns3__appendQueryType *ns3__appendQuery, bool &ns3__nothing)
{ struct soap *soap = this;
struct __ns4__appendProperties soap_tmp___ns4__appendProperties;
struct __ns4__appendPropertiesResponse *soap_tmp___ns4__appendPropertiesResponse;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/appendProperties";
soap->encodingStyle = NULL;
soap_tmp___ns4__appendProperties.ns3__appendQuery = ns3__appendQuery;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__appendProperties(soap, &soap_tmp___ns4__appendProperties);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__appendProperties(soap, &soap_tmp___ns4__appendProperties, "-ns4:appendProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__appendProperties(soap, &soap_tmp___ns4__appendProperties, "-ns4:appendProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!&ns3__nothing)
return soap_closesock(soap);
soap_default_bool(soap, &ns3__nothing);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
soap_tmp___ns4__appendPropertiesResponse = soap_get___ns4__appendPropertiesResponse(soap, NULL, "-ns4:appendPropertiesResponse", "xsd:boolean");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
ns3__nothing = soap_tmp___ns4__appendPropertiesResponse->ns3__nothing;
return soap_closesock(soap);
}
int objectOperationsPortPortBindingProxy::copyProperties(const char *endpoint, const char *soap_action, ns3__copyQueryType *ns3__copyQuery, LONG64 &ns2__objectId)
{ struct soap *soap = this;
struct __ns4__copyProperties soap_tmp___ns4__copyProperties;
struct __ns4__copyPropertiesResponse *soap_tmp___ns4__copyPropertiesResponse;
if (endpoint)
soap_endpoint = endpoint;
if (!soap_endpoint)
soap_endpoint = "http://serveraddress:port/server/objects";
if (!soap_action)
soap_action = "http://siteaddress/common/interaction/1.0/copyProperties";
soap->encodingStyle = NULL;
soap_tmp___ns4__copyProperties.ns3__copyQuery = ns3__copyQuery;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns4__copyProperties(soap, &soap_tmp___ns4__copyProperties);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__copyProperties(soap, &soap_tmp___ns4__copyProperties, "-ns4:copyProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns4__copyProperties(soap, &soap_tmp___ns4__copyProperties, "-ns4:copyProperties", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!&ns2__objectId)
return soap_closesock(soap);
soap_default_LONG64(soap, &ns2__objectId);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
soap_tmp___ns4__copyPropertiesResponse = soap_get___ns4__copyPropertiesResponse(soap, NULL, "-ns4:copyPropertiesResponse", "xsd:long");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
ns2__objectId = soap_tmp___ns4__copyPropertiesResponse->ns2__objectId;
return soap_closesock(soap);
}
/* End of client proxy code */
有什么建议吗?