soap错误码和获取处理错误码的详细信息

2 篇文章 0 订阅

gsoap页面:https://www.genivia.com/doc/guide/html/index.html

soap客户端用户登录返回值错误代码表(ERROR CODE)

SOAP_EOF-1Unexpected end of file, no input, or timeout while receiving data
SOAP_ERR-1 
SOAP_OK0No error
SOAP_CLI_FAULT1The service returned a client fault (SOAP 1.2 Sender fault)
SOAP_SVR_FAULT2The service returned a server fault (SOAP 1.2 Receiver fault)
SOAP_TAG_MISMATCH3An XML element didn't correspond to anything expected
SOAP_TYPE4An XML Schema type mismatch
SOAP_SYNTAX_ERROR5An XML syntax error occurred on the input
SOAP_NO_TAG6Begin of an element expected, but not found
SOAP_IOB7Array index out of bounds
SOAP_MUSTUNDERSTAND8An element needs to be ignored that need to be understood
SOAP_NAMESPACE9Namespace name mismatch (validation error)
SOAP_USER_ERROR10 
SOAP_FATAL_ERROR11Internal error
SOAP_FAULT12An exception raised by the service
SOAP_NO_METHOD13The dispatcher did not find a matching operation for the request
SOAP_GET_METHOD14HTTP GET operation not handled
SOAP_EOM15Out of memory
SOAP_NULL16An element was null, while it is not supposed to be null
SOAP_DUPLICATE_ID17Multiple occurrences of the same element ID on the input
SOAP_MISSING_ID18Element ID missing for an HREF on the input
SOAP_HREF19Reference to object is incompatible with the object refered to
SOAP_UDP_ERROR20Message too large to store in UDP packet
SOAP_TCP_ERROR21A connection error occured
SOAP_HTTP_ERROR22An HTTP error occured
SOAP_SSL_ERROR23An SSL error occured
SOAP_ZLIB_ERROR24A Zlib error occured
SOAP_DIME_ERROR25DIME parsing error
SOAP_DIME_HREF26DIME attachment has no href from SOAP body
SOAP_DIME_MISMATCH27DIME version/transmission error
SOAP_DIME_END28End of DIME error
SOAP_MIME_ERROR29MIME parsing error
SOAP_MIME_HREF30 
SOAP_MIME_END31 
SOAP_VERSIONMISMATCH32SOAP version mismatch or no SOAP message
SOAP_PLUGIN_ERROR33Failed to register plugin
SOAP_DATAENCODINGUNKNOWN34SOAP 1.2 DataEncodingUnknown fault
SOAP_REQUIRED35Attributed required validation error
SOAP_PROHIBITED36Attributed prohibited validation error
SOAP_OCCURS37Element minOccurs/maxOccurs validation error
SOAP_LENGTH38Element length validation error
SOAP_FD_EXCEEDED39 

处理gsoap的错误信息

struct soap soap;
if(soap.error != SOAP_OK)
{
    // 输出错误码
    cout<<"errorcode="<<status<<endl;

    // c++错误码详细信息
    ostringstream stream;
    soap_stream_fault(&soap, stream);
    cout<<stream.str()<<endl;

    // C++ 直接输出错误信息到控制台
    soap_stream_fault(&soap, cerr);

    // C语言处理错误码
    char msg[1024];
    soap_sprint_fault(&soap, msg, 1024);
    cout<<msg<<endl;
}

 

 

 

 

 

 

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值