private static List<Part> getFaultParts(final Operation operation, final String faultName) { final Fault output = operation.getFault(faultName); if (output != null) { return AxisWSImpl.getMessageParts(output.getMessage()); } return new ArrayList<Part>(); }
return operation.getFault(fault).getMessage();
javax.wsdl.Fault fault=operation.getFault(faultName);
/** * Get the fault action value for a given operation. * * @param port The WSDL service port. * @param operationName The SOAP Operation element QName. * @param faultName The fault name. * @param documentStyle true if it is 'document', false if 'rpc'. * @return the fault action value. */ public static String getFaultAction(final Port port, final QName operationName, String faultName, Boolean documentStyle) { // Overloaded methods not supported Operation operation = getOperationByElement(port, operationName, documentStyle); if (operation.getFault(faultName) == null) { throw SOAPMessages.MESSAGES.faultNameNotFoundOnOperation(faultName, operationName.getLocalPart()); } return getFaultAction(operation.getFault(faultName), port, operationName); }
/** * Get the fault action value for a given operation. * * @param port The WSDL service port. * @param operationName The SOAP Operation element QName. * @param faultName The fault name. * @param documentStyle true if it is 'document', false if 'rpc'. * @return the fault action value. */ public static String getFaultAction(final Port port, final QName operationName, String faultName, Boolean documentStyle) { // Overloaded methods not supported Operation operation = getOperationByElement(port, operationName, documentStyle); if (operation.getFault(faultName) == null) { throw SOAPMessages.MESSAGES.faultNameNotFoundOnOperation(faultName, operationName.getLocalPart()); } return getFaultAction(operation.getFault(faultName), port, operationName); }
/** * Get the fault QName. * * @param operation The WSDL operation. * @param faultName the name of the Fault * @return the fault QName or null. */ public static QName getFaultQName(final Operation operation, final String faultName) { Fault fault = operation.getFault(faultName); QName qName = null; if (fault != null) { qName = fault.getMessage().getQName(); } return qName; }
/** * Get the fault QName. * * @param operation The WSDL operation. * @param faultName the name of the Fault * @return the fault QName or null. */ public static QName getFaultQName(final Operation operation, final String faultName) { Fault fault = operation.getFault(faultName); QName qName = null; if (fault != null) { qName = fault.getMessage().getQName(); } return qName; }
Fault f = op.getFault(faultName); if (f == null) return;
Fault f = op.getFault(faultName); if (f == null) return;
Fault opFault = operation.getFault(bFault.getName());
Fault opFault = operation.getFault(bFault.getName());
private static OMElement buildSoapDetail( final BPELMessageContext bpelMessageContext, final MessageExchange odeMessageContext) throws AxisFault { Element message = odeMessageContext.getResponse().getMessage(); QName faultName = odeMessageContext.getFault(); Operation operation = odeMessageContext.getOperation(); SOAPFactory soapFactory = bpelMessageContext.getSoapFactoryForCurrentMessageFlow(); if (faultName.getNamespaceURI() == null) { return toFaultDetail(message, soapFactory); } Fault f = operation.getFault(faultName.getLocalPart()); if (f == null) { return toFaultDetail(message, soapFactory); } // For faults, there will be exactly one part. Part p = (Part) f.getMessage().getParts().values().iterator().next(); if (p == null) { return toFaultDetail(message, soapFactory); } Element partEl = DOMUtils.findChildByName(message, new QName(null, p.getName())); if (partEl == null) { return toFaultDetail(message, soapFactory); } Element detail = DOMUtils.findChildByName(partEl, p.getElementName()); if (detail == null) { return toFaultDetail(message, soapFactory); } return OMUtils.toOM(detail, soapFactory); }
public void reconcileReferences(boolean deep) { if (element != null) { BindingOperation bindingOperation = (BindingOperation)getContainer(); Operation operation = bindingOperation.getEOperation(); String faultName = getName(); if (operation != null && faultName != null) { javax.wsdl.Fault fault = operation.getFault(faultName); if (fault != getFault()) { setFault(fault); } } } super.reconcileReferences(deep); } } //BindingFaultImpl
public void visit(SOAPFault fault, Object parent, WSDLTraversalContext ctx) { String faultName = fault.getName(); if (faultName == null) faultName = ctx.getBindingFault().getName(); Operation op = ctx.getBindingOperation().getOperation(); if (op == null /* || faultName == null*/ ) // may be it's possible to have legal fault with null name return; // we suppose that SOAPFault.getName() corresponds to the abstract operation's fault name Fault f = op.getFault(faultName); if (f == null) return; Message m = f.getMessage(); // message should have only one part if (m == null || m.getParts() == null || m.getParts().size() != 1) return; checkPart((Part) m.getOrderedParts(null).get(0), ctx.getBinding()); }
public void visit(SOAPFault fault, Object parent, WSDLTraversalContext ctx) { String faultName = fault.getName(); if (faultName == null) faultName = ctx.getBindingFault().getName(); Operation op = ctx.getBindingOperation().getOperation(); if (op == null /* || faultName == null*/ ) // may be it's possible to have legal fault with null name return; // we suppose that SOAPFault.getName() corresponds to the abstract operation's fault name Fault f = op.getFault(faultName); if (f == null) return; Message m = f.getMessage(); // message should have only one part if (m == null || m.getParts() == null || m.getParts().size() != 1) return; checkPart((Part) m.getOrderedParts(null).get(0), ctx.getBinding()); }
private void outResponseFault(MyRoleMessageExchange mex, javax.jbi.messaging.MessageExchange jbiMex) throws MessagingException { InOut inout = (InOut) jbiMex; try { Fault flt = inout.createFault(); String mapperName = mex.getProperty(Mapper.class.getName()); Mapper mapper = _ode.getMapper(mapperName); if (mapper == null) { String errmsg = "Message-mapper " + mapperName + " used in ODE MEX " + mex.getMessageExchangeId() + " is no longer available."; __log.error(errmsg); throw new MessageTranslationException(errmsg); } QName fault = mex.getFault(); javax.wsdl.Fault wsdlFault = mex.getOperation().getFault(fault.getLocalPart()); if (wsdlFault == null) { setError(jbiMex, new MessageTranslationException("Unmapped Fault : " + fault + ": " + mex.getFaultExplanation())); } else { mapper.toNMS(flt, mex.getFaultResponse(), wsdlFault.getMessage(), fault); inout.setFault(flt); } } catch (MessageTranslationException mte) { __log.error("Error translating ODE fault message " + mex.getFaultResponse() + " to NMS format!", mte); setError(jbiMex, mte); } }
public void visit(SOAPFault fault, Object parent, WSDLTraversalContext ctx) { String faultName = fault.getName(); if (faultName == null) faultName = ctx.getBindingFault().getName(); Operation op = ctx.getBindingOperation().getOperation(); if (op == null) return; // we suppose that SOAPFault.getName() corresponds to the abstract operation's fault name Fault f = op.getFault(faultName); // fault message should have 1 part if (f == null || f.getMessage() == null || f.getMessage().getParts().size() != 1) return; Part p = (Part) f.getMessage().getOrderedParts(null).get(0); removePart(f.getMessage().getQName(), p.getName()); }
public void visit(SOAPFault fault, Object parent, WSDLTraversalContext ctx) { String faultName = fault.getName(); if (faultName == null) faultName = ctx.getBindingFault().getName(); Operation op = ctx.getBindingOperation().getOperation(); if (op == null) return; // we suppose that SOAPFault.getName() corresponds to the abstract operation's fault name Fault f = op.getFault(faultName); // fault message should have 1 part if (f == null || f.getMessage() == null || f.getMessage().getParts().size() != 1) return; Part p = (Part) f.getMessage().getOrderedParts(null).get(0); removePart(f.getMessage().getQName(), p.getName()); }
Fault fault = bindingOperation.getOperation().getFault(bindingFault.getName()); FaultInfo faultInfo = opInfo.getFault(fault.getName());
break; case FAULT: Fault fault = pmex.getOperation().getFault(m.getFault().getLocalPart()); if (fault == null) { __log.error("process " + _bpelProcess + " instance " + _iid + " thrown unmapped fault in p2p communication " + m.getFault() + " " + m.getFaultExplanation() + " - converted to failure"); pmex.replyWithFailure(MessageExchange.FailureType.OTHER, "process thrown unmapped fault in p2p communication " + m.getFault() + " " + m.getFaultExplanation() + " - converted to failure", m.getFaultResponse().getMessage()); } else { Message faultRes = pmex.createMessage(pmex.getOperation().getFault(m.getFault().getLocalPart()) .getMessage().getQName()); faultRes.setMessage(m.getResponse().getMessage());