Groups | Blog | Home
all groups > dotnet remoting > july 2007 >

dotnet remoting : Urgent: Getting plain XML SOAP while channel is configured to use baniry


<Ged>
7/18/2007 12:04:43 PM
Sohail Iqbal

You've closed off the <channel> elements, before you've include the
<serverProviders> and <clientProviders>.
These need to be children of the <channel> elements.
It should look like :

<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" type="Server.CustomerManager, Server"
objectUri="CustomerManager.rem" />
</service>
<channels>
<channel ref="http"> -- MODIFIED
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel> -- ADDED

</channels>

</application>
</system.runtime.remoting>
</configuration>


<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="true"> -- MODIFIED
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
</channel> -- ADDED
</channels>

<client>
<wellknown type="Server.CustomerManager, Client"
url="http://vmstage/remoteServer/CustomerManager.rem" />
</client>

</application>
</system.runtime.remoting>
</configuration>

HTH

Ged


[quoted text, click to view]
Sohail Iqbal
7/18/2007 3:49:52 PM
Hi,

i'm having a confusion about binary formatter, here is the scenario:

I have a server component that i'm hosting in IBIS, the web.config goes like
this:

<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" type="Server.CustomerManager, Server"
objectUri="CustomerManager.rem" />
</service>
<channels>
<channel ref="http"/>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channels>

</application>
</system.runtime.remoting>
</configuration>

and the client is a windows app which consumers the remote object. The
remoting configs for client goes like this:

<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="true"/>
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
</channels>

<client>
<wellknown type="Server.CustomerManager, Client"
url="http://vmstage/remoteServer/CustomerManager.rem" />
</client>

</application>
</system.runtime.remoting>
</configuration>

it all works fine, but when I analyze the traffic through packet analyzer, I
always get plain XML SOAP communication, while I have set the binary
formatter, shouldn't i get binary serialized transport data, just like the
formatter serilizes the data for saving to HD?

The data i captured:

HTTP Request:
- HTTP: HTTP Payload
- HTTPPayload: <SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr=
- payload:
- HttpPayLoad:
Data: <SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http:/
Data: <SOAP-ENV:Body>
Data: <i2:getCustomer id="ref-1"
xmlns:i2="http://schemas.microsoft.com/clr/nsassem/Server.CustomerManager/Client">
Data: <id>4711</id>
Data: </i2:getCustomer>
Data: </SOAP-ENV:Body>
Data: </SOAP-ENV:Envelope>

HTTP Response:
- HTTPPayload: <SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr=
- payload:
- XmlPayload:
- <SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:clr="http://schem
- <SOAP-ENV:Header>
<h4:__CallContext href="#ref-3"
xmlns:h4="http://schemas.microsoft.com/clr/soap/messageProperties"
SOAP-ENC:root="1"/>
- <a1:LogicalCallContext id="ref-3"
xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Runtime.Remoting.Messaging">
</a1:LogicalCallContext>
</SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <i5:getCustomerResponse id="ref-1"
xmlns:i5="http://schemas.microsoft.com/clr/nsassem/Server.CustomerManager/Server">
<return href="#ref-7"/>
</i5:getCustomerResponse>
- <a2:Customer id="ref-7"
xmlns:a2="http://schemas.microsoft.com/clr/nsassem/General/General%2C%20Version%3D1.0.822.41010%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
- <FirstName id="ref-8">
John
</FirstName>
- <LastName id="ref-9">
Doe
</LastName>
- <DateOfBirth>
1970-07-04T00:00:00.0000000+05:00
</DateOfBirth>
</a2:Customer>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I want to have this tranmission in binary, which is fast and less in size.
am i missing something? any help?

TIA

Sohail Iqbal

Sohail Iqbal
7/18/2007 4:28:29 PM
It worked! Thanks a lot Ged :)

Sohail Iqbal


[quoted text, click to view]

AddThis Social Bookmark Button