Axis .net Interop Part 2
After getting the initial .net service running and talking to a Marid service, new issues have arrived. On the Axis side, I am generating a soap Post that looks like this:
which yields the following result
So, in Marid, we are rolling the MaridMessage into an string which represents the XML and sending it as the body of the message.
What the .net services is expecting is:
Now besides the big differences, there is a subtle differences that I haven't figured out yet.
Axis encodes the information in
POST /MaridWeather/MaridWeather.asmx HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: www.qagwaai.com
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://maridspace.org/maridweather/WeatherInfo"
Content-Length: 5009
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:sendMessage soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="MaridService">
<MaridIdentity href="#id0"/>
<MaridMessage xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><?xml version="1.0" encoding="UTF-8"?>
<java version="1.4.2_06" class="java.beans.XMLDecoder">
<object class="org.marid.coreconcepts.MaridMessage">
<void property="header">
<void property="action">
<string>action</string>
</void>
<void property="messageID">
<string>179b7b0:10023578129:-8000</string>
</void>
<void property="sent">
<object class="java.util.Date">
<long>1100104565000</long>
</object>
</void>
</void>
<void property="packetArray">
<array class="java.lang.Object" length="1">
<void index="0">
<object class="org.marid.services.WeatherStation.WeatherData">
<void property="windChill">
<float>40.6</float>
</void>
<void property="indoorHeatIndex">
<float>68.0</float>
</void>
<void property="indoorTemperatureRate">
<float>0.2</float>
</void>
<void property="barometer">
<float>29.98</float>
</void>
<void property="insideTemperature">
<float>69.4</float>
</void>
<void property="insideHumidity">
<float>20.0</float>
</void>
<void property="outdoorHeatIndex">
<float>42.4</float>
</void>
<void property="outdoorTemperatureRate">
<float>-1.2</float>
</void>
<void property="month">
<int>11</int>
</void>
<void property="totalRain">
<float>0.5</float>
</void>
<void property="outsideTemperature">
<float>40.6</float>
</void>
<void property="CSVFileVersion">
<float>1.0</float>
</void>
<void property="day">
<int>10</int>
</void>
<void property="windDirection">
<float>202.0</float>
</void>
<void property="second">
<int>53</int>
</void>
<void property="hour">
<int>9</int>
</void>
<void property="year">
<int>2004</int>
</void>
<void property="barometerRate">
<float>0.03</float>
</void>
<void property="dewPoint">
<float>27.8</float>
</void>
<void property="outsideHumidity">
<float>60.0</float>
</void>
<void property="minute">
<int>36</int>
</void>
</object>
</void>
</array>
</void>
</object>
</java>
</MaridMessage>
</ns1:sendMessage>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:MaridIdentity" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:BeanService">
<maridKey href="#id1"/>
<issuerAddress href="#id2"/>
<name xsi:type="xsd:string">Me</name>
<issuer href="#id2"/>
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:MaridKey" xmlns:ns3="urn:BeanService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<key xsi:type="xsd:string">Me</key>
<isHostUnique xsi:type="xsd:boolean">false</isHostUnique>
<isMaridSpaceUnique xsi:type="xsd:boolean">false</isMaridSpaceUnique>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:MaridAddress" xmlns:ns4="urn:BeanService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<url xsi:type="xsd:string">http:\localhost</url>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
which yields the following result
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Wed, 10 Nov 2004 16:30:40 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 382
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<WeatherInfoResponse xmlns="http://maridspace.org/maridweather/">
<WeatherInfoResult>successful
</WeatherInfoResult>
</WeatherInfoResponse>
</soap:Body>
</soap:Envelope>
So, in Marid, we are rolling the MaridMessage into an string which represents the XML and sending it as the body of the message.
What the .net services is expecting is:
POST /mw/MaridWeather.asmx HTTP/1.1
Host: 192.168.0.14
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://maridspace.org/maridweather/WeatherInfo"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<WeatherInfo xmlns="http://maridspace.org/maridweather/">
<data>string</data>
</WeatherInfo>
</soap:Body>
</soap:Envelope>
Now besides the big differences, there is a subtle differences that I haven't figured out yet.
Axis encodes the information in
<soapenv:Body>
, while .net encodes the information in <soap:Body>
. There is something simple somewhere (I hope) which will allow a bridge.
Comments