为什么我在SOAPUI响应中得到nullpointer异常?

时间:2014-12-04 11:27:03

标签: nullpointerexception soapui

我是SOAPUI的新手。 我昨天安装了开源版本并创建了一个简单的项目并添加了一个WSDL。 现在,当我在SOAP测试用例中提供itemXML和itemResponse参数时,我得到了共振中的Java.lang.nullpointer异常。

我的请求xml如下所示:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:res="http://pearson.com/ai/responseanalytics">
   <soapenv:Header/>
   <soapenv:Body>
      <res:innovativeItemScoreRequest>
         <!--You may enter the following 2 items in any order-->
         <res:itemXml><?xml version="1.0" encoding="utf-8"?><assessmentItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" keyType="FractionAllowCommaCorrectPlace" schema="Pearson TN XML" schemaVersion="1.0" guid="0123456789abcdef0123456789abcdef" uin="fillFAC"><itemBody><stemArea id="stem1"><text id="text1">keyType="FractionAllowCommaCorrectPlace" Jodie pays for ice cream with a <say replacement="five-dollar">$5</say> bill.</text><text id="text2">As change, she receives 7 coins.</text><text id="text3"><tab/>•<tab/>1 quarter<br/><br/><tab/>•<tab/>1 dime<br/><br/><tab/>•<tab/>1 nickel<br/><br/><tab/>•<tab/>4 pennies</text><text id="text4">How much does the ice cream cost?</text><text id="text5">Enter your answer in the box.</text></stemArea><responseArea id="response1"><fillInResponse id="fillIn1" characterMax="20" preGridText="$" allowedCharacters="1234567890./,"><correct>0.5</correct></fillInResponse></responseArea></itemBody></assessmentItem></res:itemXml>
         <res:itemResponse><RESP><RV><VALUE><![CDATA[1,000/2,000]]></VALUE></RV><TIME>10</TIME><META /></RESP></res:itemResponse>
      </res:innovativeItemScoreRequest>
   </soapenv:Body>
</soapenv:Envelope>

这就是我的回应:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <env:Fault xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
         <faultcode>ns0:Server</faultcode>
         <faultstring xml:lang="en">java.lang.NullPointerException</faultstring>
      </env:Fault>
   </env:Body>
</env:Envelope>

0 个答案:

没有答案