- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 SoapException
来处理无效输入和我的网络服务中的所有其他类型的异常处理。它工作正常,我能够格式化并将正确的信息返回给客户。我正在遵循一种类似于此处解释的方法 http://www.codinghorror.com/blog/2004/08/throwing-better-soap-exceptions.html
现在我想更改它在 SoapException
发生时返回的响应代码(ResponseCode:500 内部服务器错误)。
以下是当 SoapException
发生时,除了我自己的自定义 XML
数据之外,我得到的默认响应代码。我想将 ResponseCode
更改为 200..这可能吗?如何实现?
ResponseCode: 500 (Internal Server Error)
Connection:Close
Content-Length:494
Cache-Control:private
Content-Type:text/xml; charset=utf-8
Date:Tue, 25 Jan 2011 06:59:30 GMT
Server:ASP.NET Development Server/8.0.0.0
X-AspNet-Version:2.0.50727
最佳答案
根据 WS-I Basic 配置文件,支持 John Sauders 上面的警告:
“如果响应消息是 SOAP 故障,R1126 实例必须使用“500 内部服务器错误”HTTP 状态代码。”
http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16488480
关于c# - 如何更改 SOAPException ResponseCode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4790857/
我正在使用 SoapException 来处理无效输入和我的网络服务中的所有其他类型的异常处理。它工作正常,我能够格式化并将正确的信息返回给客户。我正在遵循一种类似于此处解释的方法 http://ww
您好,我正在使用以下代码建立 URL 连接。但我随机得到 responseCode -1(这是 responseCode 的默认值): try { URL url = new UR
我使用的是 Indy 10.5.7 最近向我展示了如何使用 Indy 使用有效凭据登录网站。现在我可以执行搜索并返回我需要的结果。 但是,我仍然有一个问题。我必须理所当然地认为我已根据页面重定向成功登
我正在编写一个测试,其中不同的用户具有向团队添加和删除其他用户的不同权限。该测试检查用户是否可以向团队添加新用户或从团队中删除现有用户。 但是,无法添加新用户的用户不会返回新添加用户的 id,因此他们
我的 GoogleSignin 代码无法正常工作,但没有发生以下错误: 代码正在编译中。 此外,当我点击登录时,我会收到一个弹出窗口,询问我要使用哪个 Google 帐户登录。 onActivityR
我想覆盖 j-meter 中的状态为 200-OK,耗时为 0ms。 实际上,我已经将java与jmeter一起使用,并放置了SampleResult.sampleStart()和sampleEnd(
使用下面给出的代码,我必须点击多个 URL 才能获取一些数据。此代码适用于除一个以外的所有 URL。我为这个特定 URL 获得的 ResponseCode 是 301,如下面的 Logcat 部分所述
我正在使用谷歌应用内结算库 1.0 在我的应用程序中为无广告版本编写应用内结算功能。我经历了所有阶段 here codelab到目前为止。然而,我总是遇到这个错误,返回的 responseCode 是
我正在尝试让 Facebook 用户参加一个 Activity , Request.executePostRequestAsync(...) 但是服务器总是返回以下内容: {Response: re
我现在正在使用新的 Play 结算库 基本上,我是按照文档查询可购买的元素 SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder
我实现了 spark 应用程序。我创建了 spark 上下文: private JavaSparkContext createJavaSparkContext() {
我正在构建 Cordova 应用程序并使用 Crittercism 插件进行错误记录。当我从 Xcode 运行它时,我不断收到错误流: [Crittercism] 警告:responseCode ==
我是一名优秀的程序员,十分优秀!