EaBIM一直以来积极响应国家“十二五”推进建筑业信息化的号召,对建筑领域的信息技术开展深入技术交流和探讨!致力于打造“BIM-建筑师-生态技术”三位一体综合资源交流共享平台,希望为BIM与可持续设计理念及技术的普及做出微小的贡献!!!

EaBIM

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 11642|回复: 265
打印 上一主题 下一主题

免费的工具-Fiddler(查探Vault API的调用流程)

[复制链接]

1514

主题

7465

帖子

1万

积分

admin

Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10Rank: 10

积分
12406

社区QQ达人

跳转到指定楼层
F
发表于 2014-1-14 10:30:52 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

转载自:It's all just ones and zeros -> Fiddling with the Vault API

For a while, I’ve been looking for a good way to detect if binary transfer is set up properly for a Vault app.  I’ve finally found that way, and its name is Fiddler


                               
登录/注册后可看大图

If you don’t know what Fiddler is, it’s a tool that lets you monitor HTTP traffic on your computer.  It’s the type of utility that has millions of uses, but I’ll be focusing only on using it to help with Vault programming.  Since Vault uses web services for server communication, you can use Fiddler to verify that your files are transferring properly.

One of the aspects of the Vault API is that you need to configure things very specifically in order to get files to transfer in a binary mode.  If you get a step wrong, then files get transferred as text.   But your app still works, so it’s a tricky problem to locate.  I’ll show you how to use Fiddler to verify the binary transfer.


Steps:

  • Install Fiddler.
  • Open Fiddler.
  • Run your app.  Make sure to have a real computer name as the Vault server; do not use “localhost” or “127.0.0.1”.
  • Upload or download a file.  The size of the file does not matter, but I suggest a binary file, such as an image.
  • In Fiddler, locate the entry that corresponds to the API call that performed the file transfer.
    • The left pane, shows all the HTTP requests.  Vault API calls will show the URL of the web service.
    • The right top pane shows the outgoing request.  For Vault API calls, this has the raw SOAP data, including the function name and parameter set.
    • The bottom right pane shows the incoming response.  For Vault API calls, this has the raw SOAP data, this has the function name and return values.
    • You can use either pane on the right to find the function name.  It’s best to use the Text View and scroll to the bottom of the pane.  The element directly inside <soap:Body> is the function name.
  • If you are doing an upload, you want to check the outgoing pane at the right-top.  If you are doing a download, you want to check the incoming pane at the right-bottom.
  • If you configured things correctly, there should be a section at the bottom indicating a MIME attachment.  There may also be a gibberish representation of the binary data.
    If you configured things incorrectly, there will be no MIME attachment.  The file data will show as a large text string in a function parameter or return value.

If things are good, Fiddler should show something like this:


(click image for larger view)


If things are bad, Fiddler will show something like this:


(click image for larger view)


NOTE:  When things are configured incorrectly, with MTOM not enabled, you can use the XML View in Fiddler.  When MTOM is correctly turned on, then the XML View is blank.


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 转播转播 分享分享 分享淘帖 支持支持 反对反对
工作时间:工作日的9:00-12:00/13:30-18:00,节假日不在线,请勿留言

14

主题

2892

帖子

2085

积分

BIM经理

Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

积分
2085
推荐
发表于 2016-3-23 10:36:02 | 只看该作者
<( ̄ˇ ̄)/  路过
264F
发表于 2017-7-25 11:12:46 | 只看该作者
学习才能进步
262F
发表于 2017-7-18 11:09:30 | 只看该作者
很好呢, 点赞
260F
发表于 2017-6-13 10:00:48 | 只看该作者
来与时俱进了,
258F
发表于 2017-5-17 10:42:53 | 只看该作者
很好的文章, 受益匪浅
256F
发表于 2017-4-28 09:36:32 | 只看该作者
来学习学习
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|EaBIM网 ( 苏ICP备2020058923号-1  苏公网安备32011502011255号

GMT+8, 2024-11-27 08:31

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表