Nusoap返回空白<return xmlns =“”>标记

时间:2015-07-29 07:51:25

标签: yii nusoap

我在YII中使用Nusoap库来获取WSDL,但我得到了空白的响应。

我的代码:

public function actionNuSoap() {
    $namespace = "u`enter code here`rn:bureauRequest";
    $HTTP_RAW_POST_DATA = file_get_contents('php://input');
    Yii::import('application.extensions.nusoap.lib.*');
       require_once('nusoap.php');

    function bureauRequest($AXIS_APP, $PURPOSE, $SUBPURPOSE, $VERSION, $SRNO, $APPLICATION, $SUBMISSION_DATE, $SUBMISSION_TIME, $WRITE_FLAG, $DEDUPE_FLAG, $LOAN_ID, $PRODUCT_CODE
    , $LOAN_AMOUNT, $FNAME, $MNAME, $LNAME, $DOB, $SEX, $ADDRESS1, $ADDRESS2, $ADDRESS3, $ADDRESS4, $ADDRESS5, $STATE, $ZIPCODE, $PHONE
    , $OFFADDRESS1, $OFFADDRESS2, $OFFADDRESS3, $OFFADDRESS4, $OFFADDRESS5, $OFFSTATE, $OFFZIPCODE, $OFFPHONE, $PAN_NO, $PASSPORT_NO
    , $VOTER_ID, $DRIVER_LICENSCE, $RATION_CARD, $CREDIT_CARD, $MOBILE_NO, $ACCOUNT_NO, $INTERNAL_SYSTEM_FIELDS, $CUST_ID_N, $CITY, $FREE_TEXT1, $FREE_TEXT2, $FREE_TEXT3, $FREE_TEXT4, $FREE_TEXT5) {
        return array('item'=>'i amin');
      }
    $server = new soap_server;
    $server->configureWSDL('bureauRequest', $namespace);
    $server->wsdl->schemaTargetNamespace = $namespace;

    $server->register('bureauRequest', 
            array(
                'AXIS_APP' => 'xsd:string', 
                'PURPOSE' => 'xsd:string',
                'SUBPURPOSE' => 'xsd:string',
                'VERSION' => 'xsd:string',
                'SRNO' => 'xsd:string',
                'APPLICATION' => 'xsd:string',
                'SUBMISSION_DATE' => 'xsd:string',
                'SUBMISSION_TIME' => 'xsd:string',
                'WRITE_FLAG' => 'xsd:string',
                'DEDUPE_FLAG' => 'xsd:string',
                'LOAN_ID' => 'xsd:string',  
                'PRODUCT_CODE' => 'xsd:string',
                'LOAN_AMOUNT' => 'xsd:string',
                'FNAME' => 'xsd:string',
                'MNAME' => 'xsd:string',
                'LNAME' => 'xsd:string',
                'DOB' => 'xsd:string',
                'SEX' => 'xsd:string',
                'ADDRESS1' => 'xsd:string',
                'ADDRESS2' => 'xsd:string',
                'ADDRESS3' => 'xsd:string',
                'ADDRESS4' => 'xsd:string',
                'ADDRESS5' => 'xsd:string',
                'STATE' => 'xsd:string',
                'ZIPCODE' => 'xsd:string',
                'PHONE' => 'xsd:string',
                'OFFADDRESS1' => 'xsd:string',
                'OFFADDRESS2' => 'xsd:string',
                'OFFADDRESS3' => 'xsd:string',
                'OFFADDRESS4' => 'xsd:string',
                'OFFADDRESS5' => 'xsd:string',
                'OFFSTATE' => 'xsd:string',
                'OFFZIPCODE' => 'xsd:string',
                'OFFPHONE' => 'xsd:string',
                'PAN_NO' => 'xsd:string',
                'PASSPORT_NO' => 'xsd:string',
                'VOTER_ID' => 'xsd:string',
                'DRIVER_LICENSCE' => 'xsd:string',
                'RATION_CARD' => 'xsd:string',
                'CREDIT_CARD' => 'xsd:string',
                'MOBILE_NO' => 'xsd:string',
                'ACCOUNT_NO' => 'xsd:string',
                'INTERNAL_SYSTEM_FIELDS' => 'xsd:string',
                'CUST_ID_N' => 'xsd:string',
                'CITY' => 'xsd:string',
                'FREE_TEXT1' => 'xsd:string',
                'FREE_TEXT2' => 'xsd:string',
                'FREE_TEXT3' => 'xsd:string',
                'FREE_TEXT4' => 'xsd:string',
                'FREE_TEXT5' => 'xsd:string'
            ), 
            array(
                'return'=>'xsd:Array'

            ),
            $namespace, 
            $namespace . '#bureauRequest',
            'document', 'literal', 
            'Get a listing of products by categor'
            );

            $POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';

            // pass our posted data (or nothing) to the soap service
            $server->service($POST_DATA);
 }

我正在用肥皂ui回复

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <bureauRequestResponse xmlns="urn:bureauRequest">
         <return xmlns=""/>
      </bureauRequestResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

0 个答案:

没有答案