Package javax.xml.ws

Examples of javax.xml.ws.WebServiceException


            String bindingId = c.getString("bindingId");
            BindingFactory factory = bus.getBindingManager().getBindingFactory(bindingId);
            assert factory != null : "unable to find binding factory for " + bindingId;
            binding = factory.createClientBinding(ref);
        } catch (Exception ex) {
            throw new WebServiceException(ex);
        }
       
        binding.configureSystemHandlers(c);
        return binding;
    }
View Full Code Here


            Method faultInfoMethod = fault.getClass().getMethod("getFaultInfo");
            if (faultInfoMethod != null) {
                return faultInfoMethod.invoke(fault);
            }
        } catch (Exception ex) {
            throw new WebServiceException("Could not get faultInfo out of Exception", ex);
        }

        return null;
    }
View Full Code Here

           
            HandlerChainDocument doc = getHandlerChainDocument(hcAnn);
            HandlerChainType hc = doc.getChain(hcAnn.getChainName());
           
            if (null == hc) {
                throw new WebServiceException(new Message("CHAIN_NOT_SPECIFIED_EXC", LOG).toString());
            }

            chain =  buildHandlerChain(hc);
        }
        assert chain != null;
View Full Code Here

    
    private HandlerChainDocument getHandlerChainDocument(HandlerChainAnnotation hcAnn) {
        InputStream in = hcAnn.getDeclaringClass().getResourceAsStream(hcAnn.getFileName());

        if (null == in) {
            throw new WebServiceException(new Message("HANDLER_CFG_FILE_NOT_FOUND_EXC", LOG,
                                                      hcAnn.getFileName()).toString());
        }

        LOG.log(Level.INFO, "reading handler chain configuration from " + hcAnn.getFileName());
        return new HandlerChainDocument(in, true);
View Full Code Here

            return ann.name();
        }
       
        public void validate() {
            if (null == ann.file() || "".equals(ann.file())) {
                throw new WebServiceException(new Message("ANNOTATION_WITHOUT_URL_EXC", LOG).toString());  
            }
            if (null == ann.name() || "".equals(ann.name())) {
                LOG.fine("no handler name specified, defaulting to first declared");
            }
        }
View Full Code Here

            }
        } catch (Exception ex) {
            if (ex instanceof WebServiceException) {
                throw (WebServiceException)ex;
            }
            throw new WebServiceException(ex);
        }
    }
View Full Code Here

        try {
            assert wrapperType != null;           
            obj = WrapperHelper.getWrappedPart(name, wrapperType, part);
            assert obj != null;
        } catch (Exception ex) {
            throw new WebServiceException("Could not get part out of wrapper element", ex);
        }
        return obj;
    }
View Full Code Here

                    idx++;
                }
                octx.setMessageObjects(methodArgs);
            } catch (Exception ex) {
                LOG.log(Level.SEVERE, "INIT_OBJ_CONTEXT_FAILED");
                throw new WebServiceException(ex);
            }
        }
    }
View Full Code Here

        Endpoint ep = null;
        if (EndpointUtils.isValidImplementor(implementor)) {
            ep = new EndpointImpl(Bus.getCurrent(), implementor, bindingId);
            return ep;
        } else {
            throw new WebServiceException(new Message("INVALID_IMPLEMENTOR_EXC", LOG).toString());
        }
    }
View Full Code Here

        throw new UnsupportedOperationException("addPort not yet supported");
    }

    public <T> T getPort(QName portName, Class<T> serviceEndpointInterface) {
        if (portName == null) {
            throw new WebServiceException("No endpoint specified.");
        }

        return createPort(portName, serviceEndpointInterface);
    }
View Full Code Here

TOP

Related Classes of javax.xml.ws.WebServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.