Package javax.xml.soap

Examples of javax.xml.soap.SOAPFault.addDetail()


        SOAPFault soapFault = soapResBody.addFault();
        soapFault.setFaultCode(faultCode);
        soapFault.setFaultString(faultString);
        soapFault.setFaultActor(faultActor);
       
        Detail faultDetail = soapFault.addDetail();
       
        SOAPElement dispRpt = faultDetail.addChildElement("dispositionReport","",IRegistry.UDDI_V2_NAMESPACE);       
        dispRpt.setAttribute("generic",IRegistry.UDDI_V2_GENERIC);
        dispRpt.setAttribute("operator",Config.getOperator());
       
View Full Code Here


        soapFault.setFaultActor(faultActor);
       
        // We're always going to include a DispositionReport (for
        // the hell of it) so that's what we're doing here.
      
        Detail faultDetail = soapFault.addDetail();
       
        SOAPElement dispRpt = faultDetail.addChildElement("dispositionReport","",IRegistry.UDDI_V2_NAMESPACE);       
        dispRpt.setAttribute("generic",IRegistry.UDDI_V2_GENERIC);
        dispRpt.setAttribute("operator",Config.getOperator());
       
View Full Code Here

                    soapFault.setFaultActor(((SoapFault)ex).getRole());

                    Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getOrCreateDetail(),
                                                                      true);
                    nd = nd.getFirstChild();
                    soapFault.addDetail();
                    while (nd != null) {
                        Node next = nd.getNextSibling();
                        soapFault.getDetail().appendChild(nd);
                        nd = next;
                    }
View Full Code Here

            if (((SoapFault)ex).hasDetails()) {
                Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getDetail(),
                                                                  true);
                nd = nd.getFirstChild();
                soapFault.addDetail();
                while (nd != null) {
                    Node next = nd.getNextSibling();
                    soapFault.getDetail().appendChild(nd);
                    nd = next;
                }
View Full Code Here

        SOAPMessage smsg =
                mf.createMessage(new MimeHeaders(), new ByteArrayInputStream(xmlString.getBytes()));
        SOAPBody body = smsg.getSOAPBody();
        //smsg.writeTo(System.out);
        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();
View Full Code Here

    @Validated @Test
    public void testAddDetailEntry() throws Exception {
        //Add a SOAPFault object to the SOAPBody
        SOAPFault sf = body.addFault();
        //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);
View Full Code Here

        body = envelope.getBody();

        //Add a SOAPFault object to the SOAPBody
        SOAPFault sf = body.addFault();
        //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
View Full Code Here

        assertEquals("Client", fault.getFaultCode());
        assertEquals("CWMP fault", fault.getFaultString());
        assertEquals("http://gizmos.com/order", fault.getFaultActor());

        //Add Fault Detail information
        Detail faultDetail = fault.addDetail();
        Name cwmpFaultName = envelope.createName("Fault", "cwmp", "http://cwmp.com");
        DetailEntry faultDetailEntry = faultDetail.addDetailEntry(cwmpFaultName);
        SOAPElement e = faultDetailEntry.addChildElement("FaultCode");

        e.addTextNode("This is the fault code");
View Full Code Here

        String valueCode = "faultcode";
        String valueString = "faultString";
        SOAPFault fault = outputmsg.getSOAPPart().getEnvelope().getBody().addFault();
        fault.setFaultCode(valueCode);
        fault.setFaultString(valueString);
        Detail detail = fault.addDetail();
        detail.addDetailEntry(factory.createName("Hello"));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        if (outputmsg.saveRequired()) {
            outputmsg.saveChanges();
        }
View Full Code Here

        fault.setFaultCode(faultName);

        fault.setFaultString("Message does not have necessary info");
        fault.setFaultActor("http://gizmos.com/order");

        Detail detail = fault.addDetail();

        Name entryName =
                soapFactory.createName("order", "PO",
                                       "http://gizmos.com/orders/");
        DetailEntry entry = detail.addDetailEntry(entryName);
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.