Re: [SOAP] Sort of soap+msbin1 (.NET Binary XML) implementation?

[email protected] (EleGoS) Sun, 25 Apr 2010 13:18:36 +0200
Newsgroups php.soap
Message-ID <[email protected]>
David Zülke ha scritto:
> On 21.04.2010, at 10:47, EleGoS wrote:
>
>> Hello!
>> I have to manage a SOAP client/server data flux, acting as a proxy, 
>> using the content-type soap+msbin1. I have to send via curl the SOAP 
>> data, and then to receive the output and turn it back in print (still 
>> as binary data). I've tried with sever allways to hanlde this binary 
>> XML stream, with no success (the data itself breaks and the server 
>> doesn't receive the correct stream). I also need to decrypt the data 
>> which comes from the curl exec, but I have no idea on how to do that.
>>
>> I know there is no current implementation of this proprietary binary, 
>> but I found the specifications on the MSDN website. Still have no 
>> clue on how to implement a .net binary xml read/write class.
>>
>> Here is the MSDN documentation on it:
>> -> http://msdn.microsoft.com/en-us/library/cc219175(PROT.10).aspx
>> I have really no clue on where to start =\
>>
>> May you please help me starting implementing such class? Just the 
>> input, "the boring work" must be made by myself I know :)
>
> If you want to implement a client that uses the binary protocol, you 
> just need to override SoapClient::__doRequest() where you can convert 
> between binary and "normal" XML: 
> http://php.net/manual/en/soapclient.dorequest.php
>
> If you want to implement a server that handles the binary protocol, 
> it's probably easiest to convert the binary data to XML and pass it to 
> SoapServer::handle().
>
> - David
>
>
Thank you for your reply!
In these days I've tried "mapping" the messages with bin2hex and 
substituting the known hex values to logs, I found that most of the hex 
codes are not only "elements" hex codes, they are characters too. So I 
come in trouble to decide what's a msbin1 token and what's not. How can 
I handle this? Any ideas?