Package org.objectweb.hello_world_soap_http

Examples of org.objectweb.hello_world_soap_http.NoSuchCodeLitFault


            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here


            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

        ErrorCode ec = new ErrorCode();
        ec.setMajor((short)1);
        ec.setMinor((short)1);
        NoSuchCodeLit nscl = new NoSuchCodeLit();
        nscl.setCode(ec);
        NoSuchCodeLitFault ex = new NoSuchCodeLitFault(exMessage, nscl);
        objContext.setException(ex);

        binding.marshalFault(objContext,
                             soapContext,
                             new JAXBDataBindingCallback(objContext.getMethod(),
                                                         DataBindingCallback.Mode.PARTS,
                                                         null));
        SOAPMessage msg = soapContext.getMessage();

        assertNotNull(msg);
        Node xmlNode = msg.getSOAPBody();
        assertNotNull(xmlNode);
        assertEquals(1, xmlNode.getChildNodes().getLength());
        assertTrue(msg.getSOAPBody().hasFault());
        SOAPFault fault = msg.getSOAPBody().getFault();
        assertNotNull(fault);
        assertEquals(
                     getExceptionString(ex, exMessage),
                     fault.getFaultString());
        assertTrue(fault.hasChildNodes());
        Detail detail = fault.getDetail();
        assertNotNull(detail);
       
        NodeList list = detail.getChildNodes();
        assertEquals(1, list.getLength());
       
        WebFault wfAnnotation = ex.getClass().getAnnotation(WebFault.class);
        assertEquals(wfAnnotation.targetNamespace(), list.item(0).getNamespaceURI());
        assertEquals(wfAnnotation.name(), list.item(0).getLocalName());
    }   
View Full Code Here

                                                           DataBindingCallback.Mode.PARTS,
                                                           null));
        assertNotNull(objContext.getException());
        Object faultEx = objContext.getException();
        assertTrue(NoSuchCodeLitFault.class.isAssignableFrom(faultEx.getClass()));
        NoSuchCodeLitFault nscf = (NoSuchCodeLitFault)faultEx;
        assertNotNull(nscf.getFaultInfo());
        NoSuchCodeLit faultInfo = nscf.getFaultInfo();

        assertNotNull(faultInfo.getCode());
        ErrorCode ec = faultInfo.getCode();
        assertEquals(ec.getMajor(), (short)666);
        assertEquals(ec.getMinor(), (short)999);
       
        assertEquals(nscf.getMessage(), "Test Exception");
       
        is =  getClass().getResourceAsStream("resources/BadRecordDocLiteral.xml");
        faultMsg = binding.getMessageFactory().createMessage(null,  is);
        soapContext.setMessage(faultMsg);
        binding.unmarshalFault(soapContext, objContext,
View Full Code Here

            ErrorCode ec = new ErrorCode();
            ec.setMajor((short)1);
            ec.setMinor((short)1);
            NoSuchCodeLit nscl = new NoSuchCodeLit();
            nscl.setCode(ec);
            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
        }
    }
View Full Code Here

TOP

Related Classes of org.objectweb.hello_world_soap_http.NoSuchCodeLitFault

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.