2016-09-23 9 views
0

Я использую wsimport для создания классов веб-сервисов из файла wsdl с помощью команды ant build and writing Handler для создания вложения PDF , Сейчас я включаю пример ниже. Есть ли способ определить конфигурацию handles.xml файла из стороны генерироваться заглушки implementaion файлаКак я должен определить объявление @HandlerChain (file = "handlers.xml") из порожденной реализации stub class

@WebServiceClient (имя = "XXX_OutService", TargetNamespace = "ххххх", wsdlLocation = "xxxx.wsdl") @HandlerChain (файл = «handlers.xml») общественного класса TestOutService расширяет службы {}

ответ

0

Вот решение, которое я нашел его на интерактивной документации.

BillService webService = new BillService(); // Service Implementation class 
    Bill serviceInterface = webService.getHTTPSPort(); // Bill Interface 
    BindingProvider provider = (BindingProvider) serviceInterface; 
    Binding binding = provider.getBinding(); 
// override the service level chain 
    List<Handler> handlerChain = new ArrayList<Handler>(); 
    // OR append a handler to the service level chain 
    // List<Handler> handlerChain = binding.getHandlerChain(); 

    handlerChain.add(new BillPdfHandler()); 
    binding.setHandlerChain(handlerChain); 
    // Endpoint url and Add HTTP Basic Authentification credentials to this request goes here. 

Я документирование полных примеров опубликует в ближайшее время .....

 Смежные вопросы

  • Нет связанных вопросов^_^