2016-06-20 2 views
0

nusoapphp으로 SOAP 웹 서비스를 개발했습니다. 이 웹 서비스에서 나는 울부 짖는 소리와 같은 사용자 정의 유형 이름을 충전 정의 :nusoap에서 다른 사용자 정의 유형의 데이터 유형으로 사용자 정의 유형을 사용하는 방법

$server->wsdl->addComplexType('charge', 
     'complexType', 
     'struct', 
     'all', 
     '', 
     array(
       'code' => array('name' => 'code', 'type' => 'xsd:string'), 
       'value' => array('name' => 'value', 'type' => 'xsd:string') 
     ) 
    ); 

을 그리고 다음과 같은 사용자 정의 유형이 데이터 유형으로 사용되는 충전하는 다른 사용자 정의 유형 정의하려면 :

$server->wsdl->addComplexType('send', 
     'complexType', 
     'struct', 
     'all', 
     '', 
     array(
       'send' => array('name' => 'send', 'type' => 'xsd:charge') 
     ) 
    ); 

Could not find type '[email protected]://www.w3.org/2001/XMLSchema' 

nusoap 다른 사용자 정의 유형의 데이터 유형으로 정의 유형을 사용하는 올바른 방법은 무엇입니까 :

은 그 때 나는이 오류가?

답변

0

send 개체는 다음과 같이 변경해야합니다. xsd : charge는 tns : charge로 변경해야합니다.

$server->wsdl->addComplexType('send', 
     'complexType', 
     'struct', 
     'all', 
     '', 
     array(
       'send' => array('name' => 'send', 'type' => 'tns:charge') 
     ) 
    ); 
관련 문제