我想对cucm DB进行SQL查询.我使用Maven jaxb2插件从WSDL生成Java类,但Cisco AXL docs建议使用wsdl2java.我有很多带有Req / Res结尾的java类(据我所知,请求和响应).这是我的代码:
public class cucmDatabaseConnector extends WebServiceGatewaySupport{
private String SOAP_ACTION = "cucm:DB ver=10.5";
public void updateData(){
String END_USERS_REQUEST = REQUEST,AXLurl = "https://" + properties.getCurrentcucm_IP() + ":8443/axl/";
ExecutesqlQueryReq sqlRequest = new ExecutesqlQueryReq();
sqlRequest.setsql(END_USERS_REQUEST);
webservicetemplate template = getwebservicetemplate();
template.setMessageSender(NullHostnameVerifier.getMessageSender());
ExecutesqlQueryRes sqlResponse = (ExecutesqlQueryRes) template
.marshalSendAndReceive(
AXLurl,sqlRequest,new WebServiceMessageCallback() {
@Override
public void doWithMessage(WebServiceMessage message) throws IOException,TransformerException {
TransportContext context = TransportContextHolder.getTransportContext();
HttpUrlConnection connection = (HttpUrlConnection) context.getConnection();
//adding required headers
connection.addRequestHeader( "SOAPAction",SOAP_ACTION);
connection.addRequestHeader("Authorization",autenString);
}
}
});
}
}
}
但是当我运行它时,我得到错误:
org.springframework.ws.soap.client.soapFaultClientException:未找到Operation的端点引用(EPR)是https:// IP:8443 / axl / services / AXLAPIService,WSA Action = cucm:DB ver = 10.5 executesqlQueryReq
所以,正如我所看到的,问题是cucm AXL服务有executesqlQuery方法,但不是executesqlQueryReq.
如何让Spring在SoapAction中使用正确的方法?或者我只需要使用wsdl2java?
UPDATE
当我生成java类时,目录中也有.xsd模式. jaxb2 config指向WSDL文件,但是,我有错误URI [src / main / resources / AXLAPI.wsdl]没有提供方案部分.它看起来像xsd架构的插件构建类,而不是wsdl.但是这个wsdl是从cucm下载的原始文件.可能有什么不对?
最佳答案
在developers.cisco.com上找到this链接.这个使用AXLPort的方法建议,AXLPort是一种向cucm发出SOAP请求的包装器.
在我看来,cucm AXL SOAP接口不是开始使用Spring WS的最佳选择
在我看来,cucm AXL SOAP接口不是开始使用Spring WS的最佳选择
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。