以下の wadl ファイルを使用して認証手順をテストする必要があります。
<application xmlns="http://research.sun.com/wadl/2006/10"
xmlns:sis="http://sis.thecompany.com/" >
<grammars>
<include href="http://localhost/wadl/sis.xsd"/>
</grammars>
<resources base="http://192.168.10.139">
<resource path="/user/sign_in">
<method name="POST" id="Authentication">
<request>
<param name="user" type="sis:user" required="true"/>
<representation mediaType="application/xml" element="sis:user"/>
</request>
<response status="201">
<representation mediaType="application/xml"/>
<fault status="401" />
</response>
</method>
</resource>
</resources>
このファイルをsoapUI Proにインポートした後、クリックしてリクエストしても何のアクションもありませんでした。その理由は、soapUI Pro が xsd に存在する要素「sis:user」を認識せず、未定義の型を持つ単一の要素であると考えたためです。wadl ファイルの問題点を教えてください。
以下は、使用される sis.xsd スキーマです。
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="SIS" targetNamespace="http://sis.thecompany.com/" elementFormDefault="qualified" xmlns="http://sis.thecompany.com/" xmlns:mstns="http://sis.thecompany.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xs:element name="application">
<xs:complexType>
<xs:all>
<xs:element name="user" minOccurs="0">
<xs:xs:complexType>
<xs:all minOccurs="1">
<xs:element name="login" type="xs:string" />
<xs:element name="password" type="xs:string" />
</xs:all>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
そして次の質問です。soapUI Pro が xsd からの complexType 要素のユーザーの解析を修正する場合、soapUI Pro からの POST データは次のようになります。
<sis:user><sis:login>admin</sis:login><sis:password>admin!</sis:password></sis:user>
ただし、追加のプレフィックス「sis:」により、これはサーバーによって拒否されます。サーバーは次の形式のみをサポートします
<user><login>admin</login><password>admin!</password></user>
ご意見をお聞かせください。