在linux系统上,我想使用与SOAP服务交互的gSOAP-2.8.8创建一个客户端应用程序。暴露WSDL文件后,我无法编译wsseapi.c
。
我正在使用此命令:
g++ -c wsseapi.c -DWITH_OPENSSL -DWITH_DOM
它显示以下错误:
wsseapi.c: In function âint soap_wsse_add_SecurityContextToken(soap*, const char*, const char*)â:
wsseapi.c:2238: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c:2239: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c:2242: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c:2247: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c:2248: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c: In function âconst char* soap_wsse_get_SecurityContextToken(soap*)â:
wsseapi.c:2263: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c:2263: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c:2265: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c:2266: error: âstruct _wsse__Securityâ has no member named âwsc__SecurityContextTokenâ
wsseapi.c: In function âint soap_wsse_add_SignedInfo_Reference(soap*, const char*, const char*, const char*, int, const char*)â:
wsseapi.c:2312: error: declaration of C function âint soap_wsse_add_SignedInfo_Reference(soap*, const char*, const char*, const char*, int, const char*)â conflicts with
wsseapi.h:161: error: previous declaration âint soap_wsse_add_SignedInfo_Reference(soap*, const char*, const char*, const char*, const char*)â here
wsseapi.c: In function âint soap_wsse_add_SignedInfo_Reference(soap*, const char*, const char*, const char*, int, const char*)â:
wsseapi.c:2318: error: cannot convert âds__ReferenceType**â to âds__ReferenceType*â in assignment
wsseapi.c:2373: error: no match for âoperator=â in â*(signedInfo->ds__SignedInfoType::Reference + ((ds__ReferenceType*)(((long unsigned int)signedInfo->ds__SignedInfoType::__sizeReference) * 48ul))) = referenceâ
soapStub.h:296: note: candidates are: ds__ReferenceType& ds__ReferenceType::operator=(const ds__ReferenceType&)
wsseapi.c: In function âint soap_wsse_verify_SignedInfo(soap*)â:
wsseapi.c:2723: error: cannot convert âds__ReferenceTypeâ to âds__ReferenceType*â in initialization
wsseapi.c: In function âint soap_wsse_verify_digest(soap*, int, int, const char*, unsigned char*)â:
wsseapi.c:2863: error: âSOAP_WSSE_IGNORE_EXTRA_REFSâ was not declared in this scope
wsseapi.c: In function âint soap_wsse_add_SignedInfo_Reference(soap*, const char*, const char*, const char*, int, const char*)â:
wsseapi.c:3056: error: âstruct ds__X509DataTypeâ has no member named âX509IssuerSerialâ
wsseapi.c:3057: error: âstruct ds__X509DataTypeâ has no member named âX509IssuerSerialâ
wsseapi.c:3058: error: âstruct ds__X509DataTypeâ has no member named âX509IssuerSerialâ
wsseapi.c:3059: error: âstruct ds__X509DataTypeâ has no member named âX509IssuerSerialâ
wsseapi.c: In function âint soap_wsse_add_EncryptedKey(soap*, int, const char*, X509*, const char*, const char*, const char*)â:
wsseapi.c:3206: error: declaration of C function âint soap_wsse_add_EncryptedKey(soap*, int, const char*, X509*, const char*, const char*, const char*)â conflicts with
wsseapi.h:207: error: previous declaration âint soap_wsse_add_EncryptedKey(soap*, const char*, X509*, const char*)â here
wsseapi.c: In function âint soap_wsse_add_EncryptedKey(soap*, int, const char*, X509*, const char*, const char*, const char*)â:
wsseapi.c:3207: error: invalid conversion from âintâ to âconst char*â
wsseapi.c:3207: error: cannot convert âconst char*â to âX509*â for argument â3â to âint soap_wsse_add_EncryptedKey_encrypt_only(soap*, const char*, X509*, const char*, const char*)â
wsseapi.c: In function âint soap_wsse_add_EncryptedKey(soap*, int, const char*, X509*, const char*, const char*, const char*)â:
wsseapi.c:3250: error: declaration of C function âint soap_wsse_add_EncryptedKey_encrypt_only(soap*, int, const char*, X509*, const char*, const char*, const char*, const char*)â conflicts with
wsseapi.h:208: error: previous declaration âint soap_wsse_add_EncryptedKey_encrypt_only(soap*, const char*, X509*, const char*, const char*)â here
wsseapi.c: In function âint soap_wsse_add_EncryptedKey_encrypt_only(soap*, int, const char*, X509*, const char*, const char*, const char*, const char*)â:
wsseapi.c:3294: error: âstruct ds__X509DataTypeâ has no member named âX509IssuerSerialâ
wsseapi.c:3296: error: âstruct ds__X509DataTypeâ has no member named âX509IssuerSerialâ
wsseapi.c:3297: error: âstruct ds__X509DataTypeâ has no member named âX509IssuerSerialâ
wsseapi.c:3298: error: âstruct ds__X509DataTypeâ has no member named âX509IssuerSerialâ
wsseapi.c:3348: error: âstruct soap_wsse_dataâ has no member named âenco_keynameâ
wsseapi.c: In function âint soap_wsse_verify_EncryptedKey(soap*)â:
wsseapi.c:3434: error: invalid conversion from âint*â to âintâ
wsseapi.c:3445: error: invalid conversion from âint*â to âintâ
wsseapi.c:3454: error: âstruct ds__X509DataTypeâ has no member named âX509SubjectNameâ
wsseapi.c:3455: error: âstruct ds__X509DataTypeâ has no member named âX509SubjectNameâ
wsseapi.c:3458: error: invalid conversion from âint*â to âintâ
wsseapi.c: In function âint soap_wsse_add_EncryptedData_KeyInfo_KeyName(soap*, const char*)â:
wsseapi.c:3640: error: âstruct soap_wsse_dataâ has no member named âenco_keynameâ
wsseapi.c: In function âint soap_wsse_init(soap*, soap_wsse_data*, const void* (*)(soap*, int*, const char*, int*))â:
wsseapi.c:3965: error: âstruct soap_wsse_dataâ has no member named âenco_keynameâ
wsseapi.c:3979: error: invalid conversion from âconst void* (*)(soap*, int*, const char*, int*)â to âconst void* (*)(soap*, int, const char*, int*)â
wsseapi.c: In function âint soap_wsse_copy(soap*, soap_plugin*, soap_plugin*)â:
wsseapi.c:3998: error: invalid conversion from âconst void* (*)(soap*, int, const char*, int*)â to âconst void* (*)(soap*, int*, const char*, int*)â
wsseapi.c:3998: error: initializing argument 3 of âint soap_wsse_init(soap*, soap_wsse_data*, const void* (*)(soap*, int*, const char*, int*))â
wsseapi.c: In function âsize_t soap_wsse_verify_element(soap*, const char*, const char*)â:
wsseapi.c:4267: error: cannot convert âds__ReferenceTypeâ to âds__ReferenceType*â in initialization
wsseapi.c: In function âint soap_wsse_encrypt_begin(soap*, const char*, int, const char*, const char*, const unsigned char*)â:
wsseapi.c:4542: error: declaration of C function âint soap_wsse_encrypt_begin(soap*, const char*, int, const char*, const char*, const unsigned char*)â conflicts with
wsseapi.h:221: error: previous declaration âint soap_wsse_encrypt_begin(soap*, const char*, const char*, const char*, const unsigned char*)â here
wsseapi.c: In function âint soap_wsse_decrypt_begin(soap*, const unsigned char*)â:
wsseapi.c:4688: error: invalid conversion from âint*â to âintâ
wsseapi.c:4700: error: invalid conversion from âint*â to âintâ
wsseapi.c: In function âint soap_wsse_element_begin_out(soap*, const char*)â:
wsseapi.c:4852: error: âstruct soap_wsse_dataâ has no member named âenco_keynameâ
wsseapi.c:4864: error: âstruct soap_wsse_dataâ has no member named âenco_keynameâ
wsseapi.c: In function âint soap_wsse_preparefinalrecv(soap*)â:
wsseapi.c:5100: error: invalid conversion from âint*â to âintâ
wsseapi.c:5120: error: invalid conversion from âint*â to âintâ
如果有人可以帮助我使用C ++与我的Web服务进行通信,那将会很棒。我可以添加WSDL的链接。