Examples of FaultInfo


Examples of org.apache.cxf.service.model.FaultInfo

    public Policy getEffectivePolicy(BindingFaultInfo bfi) {
        ServiceInfo si = bfi.getBindingOperation().getBinding().getService();
        DescriptionInfo di = si.getDescription();

        Policy p = getElementPolicy(bfi, false, di);
        FaultInfo fi = bfi.getFaultInfo();
        p = mergePolicies(p, getElementPolicy(fi, true, di));
        Extensible ex = getMessageTypeInfo(fi.getName(), di);
        p = mergePolicies(p, getElementPolicy(ex, false, di));

        return p;
    }
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

        EasyMock.expect(boi.getFaults()).andReturn(bfis);
        BindingOperationInfo wrappedBoi = control.createMock(BindingOperationInfo.class);
        EasyMock.expect(boi.getWrappedOperation()).andReturn(wrappedBoi).times(2);
        Collection<BindingFaultInfo> wrappedBfis = CastUtils.cast(Collections.singletonList(bfi));
        EasyMock.expect(wrappedBoi.getFaults()).andReturn(wrappedBfis);
        FaultInfo fi = control.createMock(FaultInfo.class);
        EasyMock.expect(bfi.getFaultInfo()).andReturn(fi);
        EasyMock.expect(fi.getProperty(Class.class.getName(), Class.class))
            .andReturn(RuntimeException.class);
        message.put(BindingFaultInfo.class, bfi);
        EasyMock.expectLastCall();
       
        control.replay();
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

            copyExtensionAttributes(minfo, output);
        }
        Map<?, ?> m = op.getFaults();
        for (Map.Entry<?, ?> rawentry : m.entrySet()) {
            Map.Entry<String, Fault> entry = cast(rawentry, String.class, Fault.class);
            FaultInfo finfo = opInfo.addFault(new QName(inf.getName().getNamespaceURI(), entry.getKey()),
                                              entry.getValue().getMessage().getQName());
            buildMessage(finfo, entry.getValue().getMessage());
            copyExtensors(finfo, entry.getValue().getExtensibilityElements());
            copyExtensionAttributes(finfo, entry.getValue());
        }
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

        opInfo.setProperty(Method.class.getName(), method);
        opInfo.setInput("opRequest",
                        opInfo.createMessage(new QName("http://foo/bar", "opRequest"), Type.INPUT));
        opInfo.setOutput("opResponse",
                         opInfo.createMessage(new QName("http://foo/bar", "opResponse"), Type.INPUT));
        FaultInfo finfo = opInfo.addFault(new QName("http://foo/bar", "opFault"),
                new QName("http://foo/bar", "opFault"));
        finfo.addMessagePart("fault");
       
        BindingOperationInfo bindingOpInfo = new TestBindingOperationInfo(opInfo);
        setUpExchangeGet(exchange, BindingOperationInfo.class, bindingOpInfo);
        // Usual fun with EasyMock not always working as expected
        //BindingOperationInfo bindingOpInfo =
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

        if (faultMsgName == null) {
            faultMsgName = exClass.getSimpleName();
        }

        QName faultName = getFaultName(service, op, exClass, beanClass);
        FaultInfo fi = op.addFault(new QName(op.getName().getNamespaceURI(), faultMsgName),
                                   new QName(op.getName().getNamespaceURI(), faultMsgName));
        fi.setProperty(Class.class.getName(), exClass);
        fi.setProperty("elementName", faultName);
        MessagePartInfo mpi = fi.addMessagePart(new QName(faultName.getNamespaceURI(),
                                                          exClass.getSimpleName()));
        mpi.setElementQName(faultName);
        mpi.setTypeClass(beanClass);
        return fi;
    }
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

                Throwable t = fault.getCause();
               
                // FaultAction attribute is not defined in
                // http://www.w3.org/2005/02/addressing/wsdl schema
                for (BindingFaultInfo bfi : bindingOpInfo.getFaults()) {
                    FaultInfo fi = bfi.getFaultInfo();
                    Class<?> fiTypeClass = fi.getMessagePart(0).getTypeClass();
                    if (t != null
                            && fiTypeClass != null
                            && t.getClass().isAssignableFrom(fiTypeClass)) {
                        if (fi.getExtensionAttributes() == null) {
                            continue;
                        }
                        String attr = (String)
                            fi.getExtensionAttributes().get(Names.WSAW_ACTION_QNAME);
                        if (attr == null) {
                            attr = (String)       
                                fi.getExtensionAttributes()
                                    .get(new QName(Names.WSA_NAMESPACE_WSDL_NAME_OLD,
                                                    Names.WSAW_ACTION_NAME));                           
                        }
                        if (attr != null) {
                            action = attr;
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

            copyExtensionAttributes(minfo, output);
        }
        Map<?, ?> m = op.getFaults();
        for (Map.Entry<?, ?> rawentry : m.entrySet()) {
            Map.Entry<String, Fault> entry = cast(rawentry, String.class, Fault.class);
            FaultInfo finfo = opInfo.addFault(new QName(inf.getName().getNamespaceURI(), entry.getKey()),
                                              entry.getValue().getMessage().getQName());
            copyDocumentation(finfo, entry.getValue());
            buildMessage(finfo, entry.getValue().getMessage());
            copyExtensors(finfo, entry.getValue().getExtensibilityElements());
            copyExtensionAttributes(finfo, entry.getValue());
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

            }

            QName name = getFaultName(o.getInterface(), o, exClass, beanClass);

            for (Entry<FaultInfo, List<MessagePartInfo>> entry : mpiMap.entrySet()) {
                FaultInfo fi = entry.getKey();
                List<MessagePartInfo> mpis = entry.getValue();
                if (mpis.size() != 1) {
                    Message message = new Message("NO_FAULT_PART", LOG, fi.getFaultName());
                    LOG.log(Level.WARNING, message.toString());
                }
                for (MessagePartInfo mpi : mpis) {
                    String ns = null;
                    if (mpi.isElement()) {
                        ns = mpi.getElementQName().getNamespaceURI();
                    } else {
                        ns = mpi.getTypeQName().getNamespaceURI();
                    }
                    if (mpi.getConcreteName().getLocalPart().equals(name.getLocalPart())
                        && name.getNamespaceURI().equals(ns)) {
                        fi.setProperty(Class.class.getName(), exClass);
                        mpi.setTypeClass(beanClass);
                        sendEvent(Event.OPERATIONINFO_FAULT, o, exClass, fi);
                    }
                }
            }
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

        if (faultMsgName == null) {
            faultMsgName = exClass.getSimpleName();
        }

        QName faultName = getFaultName(service, op, exClass, beanClass);
        FaultInfo fi = op.addFault(new QName(op.getName().getNamespaceURI(), faultMsgName),
                                   new QName(op.getName().getNamespaceURI(), faultMsgName));
        fi.setProperty(Class.class.getName(), exClass);
        fi.setProperty("elementName", faultName);
        MessagePartInfo mpi = fi.addMessagePart(new QName(faultName.getNamespaceURI(),
                                                          exClass.getSimpleName()));
        mpi.setElementQName(faultName);
        mpi.setTypeClass(beanClass);
        sendEvent(Event.OPERATIONINFO_FAULT, op, exClass, fi);
        return fi;
View Full Code Here

Examples of org.apache.cxf.service.model.FaultInfo

                Throwable t = fault.getCause();
               
                // FaultAction attribute is not defined in
                // http://www.w3.org/2005/02/addressing/wsdl schema
                for (BindingFaultInfo bfi : bindingOpInfo.getFaults()) {
                    FaultInfo fi = bfi.getFaultInfo();
                    if (fi.size() == 0) {
                        continue;
                    }
                    Class<?> fiTypeClass = fi.getMessagePart(0).getTypeClass();
                    if (t != null
                            && fiTypeClass != null
                            && t.getClass().isAssignableFrom(fiTypeClass)) {
                        if (fi.getExtensionAttributes() == null) {
                            continue;
                        }
                        String attr = (String)
                            fi.getExtensionAttributes().get(Names.WSAW_ACTION_QNAME);
                        if (attr == null) {
                            attr = (String)       
                                fi.getExtensionAttributes()
                                    .get(new QName(Names.WSA_NAMESPACE_WSDL_NAME_OLD,
                                                    Names.WSAW_ACTION_NAME));                           
                        }
                        if (attr != null) {
                            action = attr;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.