2012-01-17 3 views
1

Matlab에서 웹 서비스에 액세스 할 수 있도록 노력하고 있습니다. PHP에서 호출 할 수 있지만 Matlab은 정의를 구문 분석 할 수없는 것 같습니다.Matlab 호환 .wsdl 파일

??? Attempt to reference field of non-structure array. 

Error in ==> createClassFromWsdl>parseWsdl at 72 
se = defTypes.getExtensibilityElements().get(0); 

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

WSDL 파일 : matlab에 문서를 읽기

<?xml version ='1.0' encoding ='UTF-8' ?> 
<definitions name='server3' 
    targetNamespace='http://server.edu/php/soap_test/server3.wsdl' 
    xmlns:tns='http://server.edu/php/soap_test/server3.wsdl' 
    xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
    xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
    xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' 
    xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' 
    xmlns='http://schemas.xmlsoap.org/wsdl/'> 



<xsd:complexType name="ActivityData"> 
    <xsd:sequence> 
    <xsd:element minOccurs="1" maxOccurs="1" name="HomeId" type="string"/> 
    <xsd:element minOccurs="1" maxOccurs="1" name="TStamp" type="string"/> 
    <xsd:element minOccurs="1" maxOccurs="1" name="Description" type="string"/> 
    </xsd:sequence> 
</xsd:complexType> 

<xsd:complexType name="ArrayOfActivityData"> 
    <xsd:sequence> 
    <xsd:element minOccurs="0" maxOccurs="unbounded" name="keyval" type="tns:ActivityData"/> 
    </xsd:sequence> 
</xsd:complexType> 


<message name='getRangeRequest'> 
    <part name='inHomeId' type='xsd:int'/> 
    <part name='inStartDate' type='xsd:string'/> 
    <part name='inEndDate' type='xsd:string'/> 
</message> 

<message name='getRangeResponse'> 
    <part name='out1' type='ArrayOfActivityData'/> 
</message> 


<portType name='getRangePortType'> 
    <operation name='getRange'> 
    <input message='tns:getRangeRequest'/> 
    <output message='tns:getRangeResponse'/> 
    </operation> 
</portType> 

<binding name='getRangeBinding' type='tns:getRangePortType'> 
    <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/> 
    <operation name='getRange'> 
    <soap:operation soapAction='urn:xmethods-get-range#getRange'/> 
    <input> 
     <soap:body use='encoded' namespace='urn:xmethods-get-range' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
    </input> 
    <output> 
     <soap:body use='encoded' namespace='urn:xmethods-get-range' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
    </output> 
    </operation> 
</binding> 

<service name='getRangeService'> 
    <port name='getRangePort' binding='getRangeBinding'> 
    <soap:address location='http://server.edu/php/soap_test/soap_server3.php'/> 
    </port> 
</service> 

</definitions> 

상태 : 내 매트랩 일부 샘플 WSDL 파일과 작품을 설치

The createClassFromWsdl function works with WSDL documents that comply with the WS-I 1.0 standard and use one of these forms: RPC-encoded, RPC-literal, Document-literal, or Document-literal-wrapped. 

. 그래서 지금 내 잘못이 무엇인지 알아 내려고 노력 중입니다. 제안?

답변

0

FWIW는 네 가지 문제가 있습니다

1) '의 xsd : complexType에'항목은 '유형'섹션에 있어야합니다.

2) 'service/port # binding'속성은 'tns : getRangeBinding'이어야합니다.

3) '결합/작업/SOAP : 동작 # 1의 soapAction는'이어야 "URN : xmethods는-얻을 범위 : getRange '

4)'결합/조작/입력/SOAP : 바디 # 네임 '해야을 3 번 일치.