0
私はこの方法があります:私のエンティティがSOAP WSDLサービスによって認識されないのはなぜですか?
@WebResult(name = "accountList")
public List<Account> getAllAccountWithScoreBiggerThan(@WebParam(name = "scoreValue") int scoreValue) {
System.out.println("bigger than " + scoreValue);
List<Account> list = dao.findAccountsWithScoreBiggerThan(scoreValue);
return list;
}
をしかし、私はテストそれのためSOAPUIを使用するとき、私はこのXMLを取得する:私は私のWSDLを見てみると
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getAllAccountWithScoreBiggerThanResponse xmlns:ns2="http://service/">
<accountList/>
<accountList/>
<accountList/>
</ns2:getAllAccountWithScoreBiggerThanResponse>
</soap:Body>
</soap:Envelope>
は、私がこの作品を得た:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://service/" elementFormDefault="unqualified" targetNamespace="http://service/" version="1.0">
<xs:element name="getAllAccountWithScoreBiggerThan" type="tns:getAllAccountWithScoreBiggerThan"/>
<xs:element name="getAllAccountWithScoreBiggerThanResponse" type="tns:getAllAccountWithScoreBiggerThanResponse"/>
<xs:complexType name="getAllAccountWithScoreBiggerThan">
<xs:sequence>
<xs:element name="scoreValue" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getAllAccountWithScoreBiggerThanResponse">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="accountList" type="tns:account"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="account">
<xs:sequence/>
</xs:complexType>
私のアカウントのすべての属性をリストする予定ではありませんでしたか? ?エンティティの属性を一覧表示するために出力を変更するにはどうすればよいですか?デバッグするとき、私は通常私のすべての属性を見ることができます。
この行でコードにブレークポイントを設定 'List list = dao.findAccountsWithScoreBiggerThan(scoreValue);'データベース結果からSOAPへのマッピングに何か問題が起こっています。 –
Namphibian
私はすでにしました。すべてのエンティティの属性はアクセス不可能でした。デバッグレベルで問題が見つかりませんでした – GabrielRado