Working with Files and the Byte[] type

Suppose you have a WCF or Web service that has a method that takes a byte[] parameter. Such method is used for transferring small files across the network. 

public TransferSmallFile(byte[] bytes)

Testing this method is difficult but with WCFStorm it becomes easy because it lets you directly load files into the byte[] parameter using the UI.

Let's see how we can do that
  1. First we need to add a service
  2. Select the method having the byte array parameter type.
  3. In the request pane, Select the byte[] parameter.  This will cause the Object editor to display the "Click to load file" link.  This link will prompt you to select a file in the file system 

  4. Click on "Click to load file" link and select a file.
  5. The file will then be loaded into the byte[] type automatically


Site Map | Printable View | © 2008 - 2024 WCFStorm Solutions

Powered by mojoPortal | XHTML 1.0 | CSS | Design by styleshout