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:

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/">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;java version=&quot;1.4.2_06&quot; class=&quot;java.beans.XMLDecoder&quot;&gt;
&lt;object class=&quot;org.marid.coreconcepts.MaridMessage&quot;&gt;
&lt;void property=&quot;header&quot;&gt;
&lt;void property=&quot;action&quot;&gt;
&lt;string&gt;action&lt;/string&gt;
&lt;/void&gt;
&lt;void property=&quot;messageID&quot;&gt;
&lt;string&gt;179b7b0:10023578129:-8000&lt;/string&gt;
&lt;/void&gt;
&lt;void property=&quot;sent&quot;&gt;
&lt;object class=&quot;java.util.Date&quot;&gt;
&lt;long&gt;1100104565000&lt;/long&gt;
&lt;/object&gt;
&lt;/void&gt;
&lt;/void&gt;
&lt;void property=&quot;packetArray&quot;&gt;
&lt;array class=&quot;java.lang.Object&quot; length=&quot;1&quot;&gt;
&lt;void index=&quot;0&quot;&gt;
&lt;object class=&quot;org.marid.services.WeatherStation.WeatherData&quot;&gt;
&lt;void property=&quot;windChill&quot;&gt;
&lt;float&gt;40.6&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;indoorHeatIndex&quot;&gt;
&lt;float&gt;68.0&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;indoorTemperatureRate&quot;&gt;
&lt;float&gt;0.2&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;barometer&quot;&gt;
&lt;float&gt;29.98&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;insideTemperature&quot;&gt;
&lt;float&gt;69.4&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;insideHumidity&quot;&gt;
&lt;float&gt;20.0&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;outdoorHeatIndex&quot;&gt;
&lt;float&gt;42.4&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;outdoorTemperatureRate&quot;&gt;
&lt;float&gt;-1.2&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;month&quot;&gt;
&lt;int&gt;11&lt;/int&gt;
&lt;/void&gt;
&lt;void property=&quot;totalRain&quot;&gt;
&lt;float&gt;0.5&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;outsideTemperature&quot;&gt;
&lt;float&gt;40.6&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;CSVFileVersion&quot;&gt;
&lt;float&gt;1.0&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;day&quot;&gt;
&lt;int&gt;10&lt;/int&gt;
&lt;/void&gt;
&lt;void property=&quot;windDirection&quot;&gt;
&lt;float&gt;202.0&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;second&quot;&gt;
&lt;int&gt;53&lt;/int&gt;
&lt;/void&gt;
&lt;void property=&quot;hour&quot;&gt;
&lt;int&gt;9&lt;/int&gt;
&lt;/void&gt;
&lt;void property=&quot;year&quot;&gt;
&lt;int&gt;2004&lt;/int&gt;
&lt;/void&gt;
&lt;void property=&quot;barometerRate&quot;&gt;
&lt;float&gt;0.03&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;dewPoint&quot;&gt;
&lt;float&gt;27.8&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;outsideHumidity&quot;&gt;
&lt;float&gt;60.0&lt;/float&gt;
&lt;/void&gt;
&lt;void property=&quot;minute&quot;&gt;
&lt;int&gt;36&lt;/int&gt;
&lt;/void&gt;
&lt;/object&gt;
&lt;/void&gt;
&lt;/array&gt;
&lt;/void&gt;
&lt;/object&gt;
&lt;/java&gt;
</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

Popular Posts