SOAPUI中Remedy Web服务的强制转换错误

时间:2017-06-14 14:05:04

标签: xml soapui remedy

我在SOAP UI中调用Remedy Web Service“HPD_IncidentInterface_Create_WS”时遇到错误。 SOAP版本是5.3.0。我提供了所有必填字段。

错误:

<?php

namespace app\models\search;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\models\post;

/**
 * PostSearch represents the model behind the search form about `app\models\post`.
 */
class PostSearch extends post
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'user_id','category_id', 'count_view'], 'integer'],
            [['title', 'description', 'content', 'status', 'created_at'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = post::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'category_id' => $this->category_id,
            'user_id' => $this->user_id,
            'count_view' => $this->count_view,
            'created_at' => $this->created_at,
        ]);

        $query->andFilterWhere(['like', 'title', $this->title])
            ->andFilterWhere(['like', 'description', $this->description])
            ->andFilterWhere(['like', 'content', $this->content])
            ->andFilterWhere(['like', 'status', $this->status]);

        return $dataProvider;
    }
}

XML代码:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>javax.xml.soap.SOAPException: java.lang.ClassCastException: org.apache.axis.message.Text cannot be cast to org.w3c.dom.Element</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">cesremwebcrt03</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

请帮忙!

0 个答案:

没有答案