CUCM AXL API错误的SoapAction

Ser*_*nko 6 spring soap wsdl2java maven cucm

我想对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);
                                }
                           }
                    });             
            }
    }
}
Run Code Online (Sandbox Code Playgroud)

但是当我运行它时,我得到错误:

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服务有executeSQLQuery方法,但不是executeSQLQueryReq.如何让Spring在SoapAction中使用正确的方法?或者我只需要使用wsdl2java?


UPDATE

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

Ser*_*nko 2

在developers.cisco.com 上找到了链接。本指南建议使用 AXLPort,它是一种向 CUCM 发出 SOAP 请求的包装器。在我看来,CUCM AXL SOAP 接口并不是开始使用 Spring WS 的最佳选择