Examples of DetailEntry


Examples of javax.xml.soap.DetailEntry

        SOAPFault fault = body.getFault();
        fault.addDetail();
        javax.xml.soap.Detail d = fault.getDetail();
        Iterator i = d.getDetailEntries();
        while (i.hasNext()) {
            DetailEntry entry = (DetailEntry)i.next();
            String name = entry.getElementName().getLocalName();
            if ("tickerSymbol".equals(name)) {
                assertEquals("the value of the tickerSymbol element didn't match",
                             "MACR", entry.getValue());
            } else if ("exceptionName".equals(name)) {
                assertEquals("the value of the exceptionName element didn't match",
                             "test.wsdl.faults.InvalidTickerFaultMessage", entry.getValue());
            } else {
                assertTrue("Expecting details element name of 'tickerSymbol' or " +
                        "'expceptionName' - I found :" + name, false);
            }
        }
View Full Code Here

Examples of javax.xml.soap.DetailEntry

        //Add a Detail object to the SOAPFault object
        Detail d = sf.addDetail();
        QName name = new QName("http://www.wombat.org/trader",
                               "GetLastTradePrice", "WOMBAT");
        //Add a DetailEntry object to the Detail object
        DetailEntry de = d.addDetailEntry(name);
        assertNotNull(de);
        assertTrue(de instanceof DetailEntry);
    }
View Full Code Here

Examples of javax.xml.soap.DetailEntry

        //Add a Detail object to the SOAPFault object
        Detail d = sf.addDetail();
        QName name = new QName("http://www.wombat.org/trader",
                               "GetLastTradePrice", "WOMBAT");
        //Add a DetailEntry object to the Detail object
        DetailEntry de = d.addDetailEntry(name);
        //Successfully created DetailEntry object
        assertNotNull(de);
        assertTrue(de instanceof DetailEntry);
    }
View Full Code Here

Examples of javax.xml.soap.DetailEntry

        assertTrue(d2 != null);
        Iterator i = d2.getDetailEntries();
        assertTrue(getIteratorCount(i) == 1);
        i = d2.getDetailEntries();
        while (i.hasNext()) {
            DetailEntry de = (DetailEntry)i.next();
            assertEquals(de.getElementName(), name);
        }
    }
View Full Code Here

Examples of javax.xml.soap.DetailEntry

                OMBlockFactory bf =
                        (OMBlockFactory)FactoryRegistry.getFactory(OMBlockFactory.class);
                ArrayList<Block> list = new ArrayList<Block>();
                Iterator it = detail.getChildElements();
                while (it.hasNext()) {
                    DetailEntry de = (DetailEntry)it.next();
                    OMElement om = converter.toOM(de);
                    Block b = bf.createFrom(om, null, om.getQName());
                    list.add(b);
                }
                blocks = new Block[list.size()];
View Full Code Here

Examples of javax.xml.soap.DetailEntry

        Detail detail = fault.addDetail();

        QName entryName = new QName("http://gizmos.com/orders/",
                        "order", "PO");
        DetailEntry entry = detail.addDetailEntry(entryName);
        entry.addTextNode("Quantity element does not have a value");

        QName entryName2 = new QName("http://gizmos.com/orders/",
                        "order", "PO");
        DetailEntry entry2 = detail.addDetailEntry(entryName2);
        entry2.addTextNode("Incomplete address: no zip code");

        return new SOAPFaultException(fault);
    }
View Full Code Here

Examples of javax.xml.soap.DetailEntry

        Detail detail = new Detail(fault);
        Element[] darray = fault.getFaultDetails();
        for (int i = 0; i < darray.length; i++)
        {
            Element detailtEntryElem = darray[i];
            DetailEntry detailEntry = detail.addDetailEntry(
                    new PrefixedQName(detailtEntryElem.getNamespaceURI(),
                            detailtEntryElem.getLocalName(), detailtEntryElem.getPrefix()));
            copyChildren(detailEntry, detailtEntryElem);
        }
        return detail;
View Full Code Here

Examples of javax.xml.soap.DetailEntry

      
                    Detail detail = soapFault.addDetail();
                    detail = soapFault.getDetail();
      
                    QName qName = new QName("http://www.Hello.org/greeter", "TestFault", "ns");
                    DetailEntry de = detail.addDetailEntry(qName);
      
                    qName = new QName("http://www.Hello.org/greeter", "ErrorCode", "ns");
                    SOAPElement errorElement = de.addChildElement(qName);
                    errorElement.setTextContent("errorcode");
                    throw new SOAPFaultException(soapFault);
                } catch (SOAPException ex) {
                    //ignore
                }
View Full Code Here

Examples of javax.xml.soap.DetailEntry

    private void setFault(Message msg, SOAPFaultException e) {
        SOAPFault fault = e.getFault();
        Detail detail = fault.getDetail();
        if (detail != null) {
            for (Iterator i = detail.getDetailEntries(); i.hasNext();) {
                DetailEntry entry = (DetailEntry)i.next();
                FaultException fe = new FaultException(e.getMessage(), entry.getFirstChild(), e);
                fe.setFaultName(entry.getElementQName());
                msg.setFaultBody(fe);
            }
        }
    }
View Full Code Here

Examples of javax.xml.soap.DetailEntry

        SOAPFault fault = body.getFault();
        fault.addDetail();
        javax.xml.soap.Detail d = fault.getDetail();
        Iterator i = d.getDetailEntries();
        while (i.hasNext()) {
            DetailEntry entry = (DetailEntry)i.next();
            String name = entry.getElementName().getLocalName();
            if ("tickerSymbol".equals(name)) {
                assertEquals("the value of the tickerSymbol element didn't match",
                             "MACR", entry.getValue());
            } else if ("exceptionName".equals(name)) {
                assertEquals("the value of the exceptionName element didn't match",
                             "test.wsdl.faults.InvalidTickerFaultMessage", entry.getValue());
            } else {
                assertTrue("Expecting details element name of 'tickerSymbol' or " +
                        "'expceptionName' - I found :" + name, false);
            }
        }
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.