2016-06-20 9 views
0

nusoapphpのsoap Webサービスを開発しました。このWebサービスでは、私は怒鳴るなどの電荷という名前のカスタムタイプ定義されています:nusoapの別のカスタムタイプでカスタムタイプをデータ型として使用する方法

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

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

をそして私は、カスタムタイプを充電する別のカスタムタイプを定義したい、次のようなデータ型として使用されています

その後、私はこのエラーを取得する:

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') 
     ) 
    ); 
関連する問題