views:

162

answers:

1

I've got a webservice written in c#, which accepts as a parameter an array of bytes (byte[]). I'm trying to consume the service using PHP, but am having problems getting the parameter to the correct type expected by the webservice.

Anyone know how this is accomplished?

+8  A: 

Send the data as base64 encoded data. This will get converted to a byte[] by C#.

You can use base64_encode to do this in PHP.

Jan Jongboom
Good call. Looking at the WSDL for a function with a return type of byte[], the response type is: type="s:base64Binary"
Jim H.
Very interesting
Aequitarum Custos