首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CUCM错误SoapAction

CUCM错误SoapAction
EN

Stack Overflow用户
提问于 2015-11-04 06:31:47
回答 1查看 1.4K关注 0票数 6

我想对CUCM进行SQL查询。我用Maven jaxb2插件从WSDL中生成了Java类,但是Cisco建议使用wsdl2java。我有很多带有Req/Res结尾的Java类(据我理解,请求和响应)。这是我的密码:

代码语言:javascript
复制
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服务有executeSQLQuery方法,但是没有executeSQLQueryReq。如何使Spring在SoapAction中使用正确的方法?还是我只需要使用wsdl2java?

更新

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-11-10 06:41:28

上找到developers.cisco.com链接。这是如何建议使用AXLPort,一种向CUCM发出SOAP请求的包装器.在我看来,CUCM接口不是开始使用Spring的最佳选择。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33515143

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档