Thursday, 19 February 2015

Matlab compatability with wsdl web services



I trying to make a web service accessible to Matlab, but Matlab doesn't seem to be able to parse the definition.


when i run:



createClassFromWsdl('http://ift.tt/1Le4l7s')


i get the following error message in MATLAB (2013b)



Retrieving document at 'http://ift.tt/1Le4l7s'
Attempt to reference field of non-structure array.

Error in createClassFromWsdl>parseWsdl (line 158)
bindingOperation = binding.getBindingOperation( ...

Error in createClassFromWsdl (line 32)
[R, schema] = parseWsdl(wsdlUrl);


I've tried various other web services from online sources, and they've worked perfectly. When i access the URL from above i get the following xml file:



<?xml version="1.0" encoding="UTF-8"?>

-<wsdl:definitions xmlns:wsx="http://ift.tt/1kc6kjA" xmlns:wsa10="http://ift.tt/HKXHai" xmlns:soap12="http://ift.tt/1fBjFB5" xmlns:wsaw="http://ift.tt/1kc6irT" xmlns:msc="http://ift.tt/1kc6ibB" xmlns:xsd="http://ift.tt/tphNwY" xmlns:wsap="http://ift.tt/1e3bV3c" xmlns:wsp="http://ift.tt/Hm2joK" xmlns:wsa="http://ift.tt/1cvL3rU" xmlns:tns="http://ift.tt/1w0h8sL" xmlns:wsam="http://ift.tt/18dhVIG" xmlns:soapenc="http://ift.tt/wEYywg" xmlns:wsu="http://ift.tt/Hm2joJ" xmlns:soap="http://ift.tt/KIQHA2" xmlns:wsdl="http://ift.tt/LcBaVt" targetNamespace="http://ift.tt/1w0h8sL" name="DanfossLinkService">


-<wsdl:types>


-<xsd:schema targetNamespace="http://ift.tt/1w0h8sL" elementFormDefault="qualified">


-<xsd:complexType name="ArrayOfCentralController">


-<xsd:sequence>

<xsd:element name="CentralController" type="tns:CentralController" nillable="true" maxOccurs="unbounded" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>


-<xsd:complexType name="CentralController">


-<xsd:sequence>

<xsd:element name="ID" type="xsd:string" maxOccurs="1" minOccurs="0"/>

<xsd:element name="SerialNumber" type="xsd:unsignedInt" maxOccurs="1" minOccurs="1"/>

<xsd:element name="Name" type="xsd:string" maxOccurs="1" minOccurs="0"/>

<xsd:element name="State" type="tns:CentralControllerState" maxOccurs="1" minOccurs="1"/>

<xsd:element name="Version" type="xsd:string" maxOccurs="1" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>


-<xsd:simpleType name="CentralControllerState">


-<xsd:restriction base="xsd:string">

<xsd:enumeration value="NotConnected"/>

<xsd:enumeration value="NoRadioContact"/>

<xsd:enumeration value="Connected"/>

<xsd:enumeration value="Obsolete"/>

</xsd:restriction>

</xsd:simpleType>


-<xsd:complexType name="ArrayOfRoom">


-<xsd:sequence>

<xsd:element name="Room" type="tns:Room" nillable="true" maxOccurs="unbounded" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>


-<xsd:complexType name="Room">


-<xsd:sequence>

<xsd:element name="ID" type="xsd:string" maxOccurs="1" minOccurs="0"/>

<xsd:element name="Name" type="xsd:string" maxOccurs="1" minOccurs="0"/>

<xsd:element name="CanChangeSetpoint" type="xsd:boolean" maxOccurs="1" minOccurs="1"/>

<xsd:element name="Setpoint" type="xsd:double" maxOccurs="1" minOccurs="1"/>

<xsd:element name="SetpointMinimum" type="xsd:double" maxOccurs="1" minOccurs="1"/>

<xsd:element name="SetpointMaximum" type="xsd:double" maxOccurs="1" minOccurs="1"/>

<xsd:element name="Temperature" type="xsd:double" maxOccurs="1" minOccurs="1"/>

</xsd:sequence>

</xsd:complexType>


-<xsd:complexType name="ArrayOfOnOffDevice">


-<xsd:sequence>

<xsd:element name="OnOffDevice" type="tns:OnOffDevice" nillable="true" maxOccurs="unbounded" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>


-<xsd:complexType name="OnOffDevice">


-<xsd:sequence>

<xsd:element name="ID" type="xsd:string" maxOccurs="1" minOccurs="0"/>

<xsd:element name="Name" type="xsd:string" maxOccurs="1" minOccurs="0"/>

<xsd:element name="State" type="tns:OutputState" maxOccurs="1" minOccurs="1"/>

</xsd:sequence>

</xsd:complexType>


-<xsd:simpleType name="OutputState">


-<xsd:restriction base="xsd:string">

<xsd:enumeration value="Off"/>

<xsd:enumeration value="On"/>

<xsd:enumeration value="Unknown"/>

</xsd:restriction>

</xsd:simpleType>

</xsd:schema>

</wsdl:types>

<wsdl:message name="DanfossLinkService_GetCentralControllers_InputMessage"/>


-<wsdl:message name="DanfossLinkService_GetCentralControllers_OutputMessage">

<wsdl:part name="GetCentralControllersResult" type="tns:ArrayOfCentralController"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_SetCentralControllerName_InputMessage">

<wsdl:part name="id" type="xsd:string"/>

<wsdl:part name="newName" type="xsd:string"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_GetRooms_InputMessage">

<wsdl:part name="id" type="xsd:string"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_GetRooms_OutputMessage">

<wsdl:part name="GetRoomsResult" type="tns:ArrayOfRoom"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_SetRoomSetpoint_InputMessage">

<wsdl:part name="id" type="xsd:string"/>

<wsdl:part name="newSetpoint" type="xsd:double"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_SetRoomSetpoint_OutputMessage">

<wsdl:part name="SetRoomSetpointResult" type="xsd:double"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_GetOnOffDevices_InputMessage">

<wsdl:part name="id" type="xsd:string"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_GetOnOffDevices_OutputMessage">

<wsdl:part name="GetOnOffDevicesResult" type="tns:ArrayOfOnOffDevice"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_SetOnOffDeviceOutputState_InputMessage">

<wsdl:part name="id" type="xsd:string"/>

<wsdl:part name="switchOn" type="xsd:boolean"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_SetOnOffDeviceOutputState_OutputMessage">

<wsdl:part name="SetOnOffDeviceOutputStateResult" type="tns:OutputState"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_Echo_InputMessage">

<wsdl:part name="text" type="xsd:string"/>

</wsdl:message>


-<wsdl:message name="DanfossLinkService_Echo_OutputMessage">

<wsdl:part name="EchoResult" type="xsd:string"/>

</wsdl:message>


-<wsdl:portType name="DanfossLinkService">


-<wsdl:operation name="GetCentralControllers">

<wsdl:input message="tns:DanfossLinkService_GetCentralControllers_InputMessage" wsaw:Action="http://ift.tt/1Le4mZ4"/>

<wsdl:output message="tns:DanfossLinkService_GetCentralControllers_OutputMessage" wsaw:Action="http://ift.tt/1w0h8sP"/>

</wsdl:operation>


-<wsdl:operation name="SetCentralControllerName" parameterOrder="id newName">

<wsdl:input message="tns:DanfossLinkService_SetCentralControllerName_InputMessage" wsaw:Action="http://ift.tt/1Le4mZ6"/>

</wsdl:operation>


-<wsdl:operation name="GetRooms" parameterOrder="id">

<wsdl:input message="tns:DanfossLinkService_GetRooms_InputMessage" wsaw:Action="http://ift.tt/1w0h8sT"/>

<wsdl:output message="tns:DanfossLinkService_GetRooms_OutputMessage" wsaw:Action="http://ift.tt/1Le4mZ8"/>

</wsdl:operation>


-<wsdl:operation name="SetRoomSetpoint" parameterOrder="id newSetpoint">

<wsdl:input message="tns:DanfossLinkService_SetRoomSetpoint_InputMessage" wsaw:Action="http://ift.tt/1w0h8sX"/>

<wsdl:output message="tns:DanfossLinkService_SetRoomSetpoint_OutputMessage" wsaw:Action="http://ift.tt/1Le4l7A"/>

</wsdl:operation>


-<wsdl:operation name="GetOnOffDevices" parameterOrder="id">

<wsdl:input message="tns:DanfossLinkService_GetOnOffDevices_InputMessage" wsaw:Action="http://ift.tt/1w0h8t1"/>

<wsdl:output message="tns:DanfossLinkService_GetOnOffDevices_OutputMessage" wsaw:Action="http://ift.tt/1Le4mZc"/>

</wsdl:operation>


-<wsdl:operation name="SetOnOffDeviceOutputState" parameterOrder="id switchOn">

<wsdl:input message="tns:DanfossLinkService_SetOnOffDeviceOutputState_InputMessage" wsaw:Action="http://ift.tt/1w0h8Jf"/>

<wsdl:output message="tns:DanfossLinkService_SetOnOffDeviceOutputState_OutputMessage" wsaw:Action="http://ift.tt/1Le4l7D"/>

</wsdl:operation>


-<wsdl:operation name="Echo" parameterOrder="text">

<wsdl:input message="tns:DanfossLinkService_Echo_InputMessage" wsaw:Action="http://ift.tt/1w0h8Jj"/>

<wsdl:output message="tns:DanfossLinkService_Echo_OutputMessage" wsaw:Action="http://ift.tt/1Le4mZg"/>

</wsdl:operation>

</wsdl:portType>


-<wsdl:binding name="BasicHttpBinding_DanfossLinkService" type="tns:DanfossLinkService">

<soap:binding style="rpc" transport="http://ift.tt/LcBaVu"/>


-<wsdl:operation name="GetCentralControllers">

<soap:operation style="rpc" soapAction="http://ift.tt/1Le4mZ4"/>


-<wsdl:input>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:input>


-<wsdl:output>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:output>

</wsdl:operation>


-<wsdl:operation name="SetCentralControllerName">

<soap:operation style="rpc" soapAction="http://ift.tt/1Le4mZ6"/>


-<wsdl:input>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:input>

</wsdl:operation>


-<wsdl:operation name="GetRooms">

<soap:operation style="rpc" soapAction="http://ift.tt/1w0h8sT"/>


-<wsdl:input>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:input>


-<wsdl:output>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:output>

</wsdl:operation>


-<wsdl:operation name="SetRoomSetpoint">

<soap:operation style="rpc" soapAction="http://ift.tt/1w0h8sX"/>


-<wsdl:input>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:input>


-<wsdl:output>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:output>

</wsdl:operation>


-<wsdl:operation name="GetOnOffDevices">

<soap:operation style="rpc" soapAction="http://ift.tt/1w0h8t1"/>


-<wsdl:input>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:input>


-<wsdl:output>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:output>

</wsdl:operation>


-<wsdl:operation name="SetOnOffDeviceOutputState">

<soap:operation style="rpc" soapAction="http://ift.tt/1w0h8Jf"/>


-<wsdl:input>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:input>


-<wsdl:output>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:output>

</wsdl:operation>


-<wsdl:operation name="Echo">

<soap:operation style="rpc" soapAction="http://ift.tt/1w0h8Jj"/>


-<wsdl:input>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:input>


-<wsdl:output>

<soap:body namespace="http://ift.tt/1w0h8sL" use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>


-<wsdl:service name="DanfossLinkService">


-<wsdl:port name="BasicHttpBinding_DanfossLinkService" binding="tns:BasicHttpBinding_DanfossLinkService">

<soap:address location="http://danfosslink/sdk/DanfossLinkService"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>


I realise that the file is big, and im not by any means asking anyone to read through it, but my thought was that maybe something was wrong with the beginning or end of the file or something of that sort.


I've tried to read up on the capabilities of matlab in terms of wsdl file versions and such, but with no luck.


Any advice/help is much appreciated!


No comments:

Post a Comment