Refine search
delegate = (ServiceImpl)delegateField.get(service); } catch (Exception e2) { WebServiceException wse = new WebServiceException("Failed to access Field named " + DELEGATE_FIELD_NAME + " of Service instance " + service, e); LOG.log(Level.SEVERE, e.getMessage(), e); throw wse;
/** * Gets the corresponding {@link AddressingVersion} instance from the * EPR class. */ public static @NotNull AddressingVersion fromSpecClass(Class<? extends EndpointReference> eprClass) { if(eprClass==W3CEndpointReference.class) return W3C; if(eprClass==MemberSubmissionEndpointReference.class) return MEMBER; throw new WebServiceException("Unsupported EPR type: "+eprClass); }
SOAPMessage toReturnValue(Packet response) { try { //not sure if this is the correct way to deal with this. if ( response ==null || response.getMessage() == null ) throw new WebServiceException(DispatchMessages.INVALID_RESPONSE()); else return response.getMessage().readAsSOAPMessage(); } catch (SOAPException e) { throw new WebServiceException(e); } } }
protected List<Handler> buildHandlerChain(PortComponentHandlerType ht, ClassLoader classLoader) { List<Handler> handlerChain = new ArrayList<>(); try { final boolean fineLog = LOG.isLoggable(Level.FINE); if (fineLog) { LOG.log(Level.FINE, "loading handler", trimString(ht.getHandlerName().getValue())); } Class<? extends Handler> handlerClass = Class.forName( trimString(ht.getHandlerClass() .getValue()), true, classLoader) .asSubclass(Handler.class); Handler<?> handler = handlerClass.newInstance(); if (fineLog) { LOG.fine("adding handler to chain: " + handler); } configureHandler(handler, ht); handlerChain.add(handler); } catch (Exception e) { throw new WebServiceException(BUNDLE.getString("HANDLER_INSTANTIATION_EXC"), e); } return handlerChain; }
/** * Gets the corresponding {@link AddressingVersion} instance from the * EPR class. */ public static @NotNull AddressingVersion fromSpecClass(Class<? extends EndpointReference> eprClass) { if(eprClass==W3CEndpointReference.class) return W3C; if(eprClass==MemberSubmissionEndpointReference.class) return MEMBER; throw new WebServiceException("Unsupported EPR type: "+eprClass); }
public SOAPMessage getMessage() { if(soapMsg == null) { try { Message m = packet.getMessage(); soapMsg = m != null ? m.readAsSOAPMessage() : null; } catch (SOAPException e) { throw new WebServiceException(e); } } return soapMsg; }
url = uri.toURL(); } catch (MalformedURLException e) { LOG.log(Level.FINE, "resolve qname failed", serviceName); throw new WebServiceException(e); initializePorts(); } catch (ServiceConstructionException e) { throw new WebServiceException(e);
/** * Gets the corresponding {@link AddressingVersion} instance from the * EPR class. */ public static @NotNull AddressingVersion fromSpecClass(Class<? extends EndpointReference> eprClass) { if(eprClass==W3CEndpointReference.class) return W3C; if(eprClass==MemberSubmissionEndpointReference.class) return MEMBER; throw new WebServiceException("Unsupported EPR type: "+eprClass); }
/*protected*/ public SOAPMessage getParameter(Packet packet) { try { return packet.getMessage().readAsSOAPMessage(packet, true); } catch (SOAPException se) { throw new WebServiceException(se); } }
LOG.log(Level.WARNING, "WEBSERVICE_ANNOTATIONS_IS_LOADED_BY_OTHER_CLASSLOADER", WebService.class.getName()); seiClass = ClassLoaderUtils.loadClass(sei, implementorClass); } catch (ClassNotFoundException ex) { throw new WebServiceException(BUNDLE.getString("SEI_LOAD_FAILURE_MSG"), ex); throw new WebServiceException(BUNDLE.getString("SEI_WITHOUT_WEBSERVICE_ANNOTATION_EXC")); || !StringUtils.isEmpty(seiAnnotation.endpointInterface()))) { String expString = BUNDLE.getString("ILLEGAL_ATTRIBUTE_IN_SEI_ANNOTATION_EXC"); throw new WebServiceException(expString);
public @NotNull String getContextPath() { // Cannot compute this since we don't know about hostname and port etc throw new WebServiceException("Container "+ServletContainer.class.getName()+" doesn't support getContextPath()"); } };
/*protected*/ public SOAPMessage getParameter(Packet packet) { try { return packet.getMessage().readAsSOAPMessage(packet, true); } catch (SOAPException se) { throw new WebServiceException(se); } }
javax.wsdl.Service serv = def.getService(serviceName); if (serv == null) { throw new WebServiceException("Could not find service named " + serviceName + " in wsdl " + wsdlURL); } catch (Throwable e) { if (e instanceof UncheckedException && LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, e.getLocalizedMessage(), e);
public @NotNull String getContextPath() { // Cannot compute this since we don't know about hostname and port etc throw new WebServiceException("Container " + ServletContainer.class.getName() + " doesn't support getContextPath()"); } };
SOAPMessage toReturnValue(Packet response) { try { //not sure if this is the correct way to deal with this. if ( response ==null || response.getMessage() == null ) throw new WebServiceException(DispatchMessages.INVALID_RESPONSE()); else return response.getMessage().readAsSOAPMessage(); } catch (SOAPException e) { throw new WebServiceException(e); } } }
protected static void fail(String key, XMLStreamReader reader) { String msg = key + reader.getLocation().getLineNumber(); logger.log(Level.SEVERE, msg); throw new WebServiceException(msg); }
@Override @NotNull public URI getAddress(String baseAddress) { String adrs = baseAddress+getValidPath(); try { return new URI(adrs); } catch (URISyntaxException e) { // this is really a bug in the container implementation throw new WebServiceException("Unable to compute address for "+endpoint,e); } }
public SOAPMessage getMessage() { if(soapMsg == null) { try { Message m = packet.getMessage(); soapMsg = m != null ? m.readAsSOAPMessage() : null; } catch (SOAPException e) { throw new WebServiceException(e); } } return soapMsg; }
protected Class loadClass(String name) { try { return Class.forName(name, true, classLoader); } catch (ClassNotFoundException e) { logger.log(Level.SEVERE, e.getMessage(), e); throw new WebServiceException(e); } }
@Override public @NotNull URI getAddress(String baseAddress) { String adrs = baseAddress+getValidPath(); try { return new URI(adrs); } catch (URISyntaxException e) { // this is really a bug in the container implementation throw new WebServiceException("Unable to compute address for "+endpoint,e); } }