Клиентский Ping Веб-сервиса CXF имеет вызванную исключительную ситуацию, не Мог отправить сообщение. Недопустимый адрес. Адрес конечной точки не может быть пустым

Я получаю следующую ошибку [1] из следующего кода:

ClassLoader cl = Thread.currentThread().getContextClassLoader();
        URL WSDL_LOCATION=null;
        if ( null == cl ) cl = SQLService.class.getClassLoader();
         WSDL_LOCATION = cl.getResource( "SQLServiceSoap.wsdl" );

        QName SERVICE_NAME = new QName("http://localhost:8080/gateway/services/SQLServiceSoap?wsdl", "SQLService");
        Service service = Service.create(WSDL_LOCATION,SERVICE_NAME);
        SOAPport sqlService = service.getPort(SOAPport.class);
  Client client = org.apache.cxf.frontend.ClientProxy.getClient(sqlService);
  Endpoint cxfEndpoint = client.getEndpoint();
        Map outProps = new HashMap();
  outProps.put(WSHandlerConstants.ACTION,
    WSHandlerConstants.USERNAME_TOKEN);
  outProps.put(WSHandlerConstants.USER, soapUser);
  outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
  outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS,
    PasswordCallbackHandler.class.getName());
  outProps.put("password", soapPass);
  WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
  cxfEndpoint.getOutInterceptors().add(wssOut);

  String result = sqlService.ping("test");
  LOG.warn("PONG!: " + result);

Мое отсутствие близости с веб-сервисами продолжает вызывать меня горе.

[1] ПРЕДУПРЕЖДЕНИЕ: Перехватчик для {http://localhost:8080/gateway/services/SQLServiceSoap? wsdl} SQLService# {http://gateway.sf.net/sql} Ping имеет вызванную исключительную ситуацию, раскручиваясь теперь org.apache.cxf.interceptor. Отказ: не Мог отправить сообщение. в org.apache.cxf.interceptor. MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48) в org.apache.cxf.phase. PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243) в org.apache.cxf.endpoint. ClientImpl.invoke(ClientImpl.java:484) в org.apache.cxf.endpoint. ClientImpl.invoke(ClientImpl.java:310) в org.apache.cxf.endpoint. ClientImpl.invoke(ClientImpl.java:262) в org.apache.cxf.frontend. ClientProxy.invokeSync(ClientProxy.java:73) в org.apache.cxf.jaxws. JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) на уровне $Proxy37.ping (Неизвестный Источник) в net.sf.gateway.client.base.sql. SQLClientBase.setSecurityHeaderTokens (SQLClientBase.java:255) в net.sf.gateway.client.base.sql. SQLClientBase.get (SQLClientBase.java:289) в net.sf.gateway.client.module.sql. SQLModule.getBatch (SQLModule.java:149) в net.sf.gateway.client.module.sql. SQLModule.getAndProcessSQL (SQLModule.java:110) в net.sf.gateway.client.module.sql. SQLModule.run (SQLModule.java:280) в net.sf.gateway.client. GatewayClient.exec(GatewayClient.java:399) в net.sf.gateway.client. GatewayClient.run(GatewayClient.java:174) в net.sf.gateway.client. GatewayClient.main(GatewayClient.java:166), Вызванный: java.net. MalformedURLException: Недопустимый адрес. Адрес конечной точки не может быть пустым. в org.apache.cxf.transport.http. HTTPConduit.getURL (HTTPConduit.java:833) в org.apache.cxf.transport.http. HTTPConduit.getURL (HTTPConduit.java:815) в org.apache.cxf.transport.http. HTTPConduit.setupURL (HTTPConduit.java:741) в org.apache.cxf.transport.http. HTTPConduit.prepare (HTTPConduit.java:496) в org.apache.cxf.interceptor. MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)

1
задан JohnC 9 June 2010 в 16:27
поделиться

1 ответ

Конечная точка вообще не была настроена, и CXF не настраивает вашу конечную точку за вас, если она отличается от той, которая указана в вашем WSDL.

2
ответ дан 2 September 2019 в 23:54
поделиться
Другие вопросы по тегам:

Похожие вопросы: