我有 Spring WS,我正在向其发送 ObjectRequest.java
类的请求,如果我在 jaxb 类中硬编码值就可以了(但这不是它..)我在 SoapUI 中测试的我的肥皂请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cas="http://jakisadres.com/caservice">
<soapenv:Header/>
<soapenv:Body>
<cas:Request>
<cas:atr1>some value</cas:machineName>
</cas:Request>
</soapenv:Body>
</soapenv:Envelope>
我得到的是:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns3:Response xmlns:ns3="http://jakisadres.com/caservice">
<responseValue>response: null</responseValue>
</ns3:CARevokeCertResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我的端点:
@PayloadRoot(localPart = "Request", namespace = "http://jakisadres.com/caservice")
@ResponsePayload
public Response revokeCert(@RequestPayload Request param) {
String request= param.getAtr1();
Resoponse response_ = new Response();
response.setResponseValue("response: "+request);
return response;
}
和我的 jaxb marshaller 类:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"atr1"
})
@XmlRootElement(name = "Request")
public class Request{
protected String atr1;
public String getAtr1() {
return atr1;
}
public void setAtr1(String value) {
this.atr1 = value;
}
}
任何线索我错过了什么?