function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TzafrirbenTzafrirben 

Call a .NET Web Service with byte[]

I've a .NET web service with a method that recieve byte[]:

 

[WebMethod] public void DoSomething(byte[] array) { ... }

 I'm imported the web service into apex using the wsdl import mechanism. 

 

The problem is that the byte[] object is represented as String array.

 

How can I call a web method which needs to recieve a byte[]?

 

AlwaysConfusedAlwaysConfused

 

Yet another example of APEX being not that smart :)

 

Having said that there is an object called "ByteArray" in java which in theory would map directly to the .Net Byte[] type.

Might be worth testing with some samples and see what .Net recieves by calling a test Method that accepts an object and see what it believes the type of that object is at the other end.