gSOAP problem, who know this error message?
-
SOAP 1.1 fault: SOAP-ENV:Client [no-subcode] "Multipart/Related type specified a root type other than the one that was found." Detail: [no-detail]:zzz::-O
-
SOAP 1.1 fault: SOAP-ENV:Client [no-subcode] "Multipart/Related type specified a root type other than the one that was found." Detail: [no-detail]:zzz::-O
could u be more specific? what code caused this issue? XMLHTTP? Cheers Milton KB
-
could u be more specific? what code caused this issue? XMLHTTP? Cheers Milton KB
I try to send a jpeg image to SOAP server using gSOAP from www.sourceforge.net, but it always reponses me the error message: SOAP 1.1 fault: SOAP-ENV:Client [no-subcode] "Multipart/Related type specified a root type other than the one that was found." Detail: [no-detail] How to solve this problem? the code is as following: std::string message = "image/jpeg"; xsd__hexBinary image; ns1__sendMimeImageJPEGResponse pr; FILE* file = ::fopen("d:\\t-shirt.jpg", "rb"); char buff[655350] = {0}; int nSize = 0; if (file != NULL) { char* pos = buff; int size = 0; while((size = ::fread(pos, sizeof(char), 25, file)) > 0) { pos += size; nSize += size; } } image.__ptr = NULL; image.__size = 0; soap->http_content = "text/xml;charset=utf-8"; soap_set_mime(soap, "MIME_boundary", ""); soap_set_mime_attachment(soap, buff, nSize, SOAP_MIME_BINARY, "image/jpeg", "", NULL, NULL); int nRet = soap_call_ns1__sendMimeImageJPEG(soap, url, NULL, message, image, pr); if (nRet == SOAP_OK) printf("\nCurrent returned value %s\n", pr.result.begin()); else:^) soap_print_fault(soap, stderr); -- modified at 22:03 Wednesday 16th August, 2006