gpt4 book ai didi

spring - CUCM AXL API 错误 SoapAction

转载 作者:行者123 更新时间:2023-12-04 15:42:23 25 4
gpt4 key购买 nike

我想对 CUCM DB 进行 SQL 查询。我使用 Maven jaxb2 插件从 WSDL 生成 Java 类,但 Cisco AXL 文档建议使用 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: The endpoint reference (EPR) for the Operation not found is https://IP:8443/axl/services/AXLAPIService and the WSA Action = CUCM:DB ver=10.5 executeSQLQueryReq
所以,正如我所见,问题是 CUCM AXL 服务有 执行 SQL 查询 方法,但 不执行SQLQueryReq .
如何让 Spring 在 SoapAction 中放置正确的方法?或者我只需要使用 wsdl2java?

更新

当我生成 java 类时,目录中还有 .xsd 模式。 jaxb2 配置指向 WSDL 文件,但是,我收到错误 URI [src/main/resources/AXLAPI.wsdl] does not provide the scheme part. , 并且它看起来像是来自 xsd 模式的插件构建类,而不是 wsdl。但是这个 wsdl 是从 CUCM 下载的原始文件。有什么问题?

最佳答案

找到 this developer.cisco.com 上的链接。此操作指南建议使用 AXLPort,一种用于向 CUCM 发出 SOAP 请求的包装器。
在我看来,CUCM AXL SOAP 接口(interface)不是开始使用 Spring WS 的最佳选择

关于spring - CUCM AXL API 错误 SoapAction,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33515143/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com