SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class);
MIMEMultipartRelated mmr = bmsg.getExtensor(MIMEMultipartRelated.class); if (mmr != null) { parts = mmr.getMIMEParts();
public Policy getEffectivePolicy(BindingMessageInfo bmi, Message m) { return bmi.getExtensor(Policy.class); }
MIMEMultipartRelated mmr = bmsg.getExtensor(MIMEMultipartRelated.class); if (mmr != null) { parts = mmr.getMIMEParts();
public Policy getEffectivePolicy(BindingMessageInfo bmi, Message m) { return bmi.getExtensor(Policy.class); }
public void handleMessage(SoapMessage message) throws Fault { Exchange ex = message.getExchange(); BindingOperationInfo bop = ex.getBindingOperationInfo(); if (bop == null) { return; } if (bop.isUnwrapped()) { bop = bop.getWrappedOperation(); } boolean client = isRequestor(message); BindingMessageInfo bmi = client ? bop.getInput() : bop.getOutput(); if (bmi == null) { return; } SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class); if (sbi == null || sbi.getAttachments() == null || sbi.getAttachments().isEmpty()) { Service s = ex.getService(); DataBinding db = s.getDataBinding(); if (db instanceof JAXBDataBinding && hasSwaRef((JAXBDataBinding) db)) { setupAttachmentOutput(message); } return; } processAttachments(message, sbi); } protected void processAttachments(SoapMessage message, SoapBodyInfo sbi) {
private boolean hasRootNode(BindingMessageInfo bmi, QName elName) { XMLBindingMessageFormat xmf = bmi.getExtensor(XMLBindingMessageFormat.class); return bmi.getMessageParts().size() != 1 && xmf != null && xmf.getRootNode().equals(elName); } }
private boolean hasRootNode(BindingMessageInfo bmi, QName elName) { XMLBindingMessageFormat xmf = bmi.getExtensor(XMLBindingMessageFormat.class); return bmi.getMessageParts().size() != 1 && xmf != null && xmf.getRootNode().equals(elName); } }
protected String addOperationNode(NSStack nsStack, Message message, XMLStreamWriter xmlWriter, boolean output, BindingOperationInfo boi) throws XMLStreamException { String ns = boi.getName().getNamespaceURI(); SoapBody body = null; if (output) { body = boi.getOutput().getExtensor(SoapBody.class); } else { body = boi.getInput().getExtensor(SoapBody.class); } if (body != null) { final String nsUri = body.getNamespaceURI(); //do it once, as it might internally use reflection... if (!StringUtils.isEmpty(nsUri)) { ns = nsUri; } } nsStack.add(ns); String prefix = nsStack.getPrefix(ns); String name = output ? boi.getName().getLocalPart() + "Response" : boi.getName().getLocalPart(); StaxUtils.writeStartElement(xmlWriter, prefix, name, ns); return ns; }
private BindingOperationInfo getOperation(Message message, QName opName) { BindingOperationInfo bop = ServiceModelUtil.getOperation(message.getExchange(), opName); if (bop == null) { Endpoint ep = message.getExchange().getEndpoint(); if (ep == null) { return null; } BindingInfo service = ep.getEndpointInfo().getBinding(); boolean output = !isRequestor(message); for (BindingOperationInfo info : service.getOperations()) { if (info.getName().getLocalPart().equals(opName.getLocalPart())) { SoapBody body = null; if (output) { body = info.getOutput().getExtensor(SoapBody.class); } else { body = info.getInput().getExtensor(SoapBody.class); } if (body != null && opName.getNamespaceURI().equals(body.getNamespaceURI())) { return info; } } } } return bop; } public void handleMessage(Message message) {
private BindingOperationInfo getOperation(Message message, QName opName) { BindingOperationInfo bop = ServiceModelUtil.getOperation(message.getExchange(), opName); if (bop == null) { Endpoint ep = message.getExchange().getEndpoint(); if (ep == null) { return null; } BindingInfo service = ep.getEndpointInfo().getBinding(); boolean output = !isRequestor(message); for (BindingOperationInfo info : service.getOperations()) { if (info.getName().getLocalPart().equals(opName.getLocalPart())) { SoapBody body = null; if (output) { body = info.getOutput().getExtensor(SoapBody.class); } else { body = info.getInput().getExtensor(SoapBody.class); } if (body != null && opName.getNamespaceURI().equals(body.getNamespaceURI())) { return info; } } } } return bop; } public void handleMessage(Message message) {
protected String addOperationNode(NSStack nsStack, Message message, XMLStreamWriter xmlWriter, boolean output, BindingOperationInfo boi) throws XMLStreamException { String ns = boi.getName().getNamespaceURI(); SoapBody body = null; if (output) { body = boi.getOutput().getExtensor(SoapBody.class); } else { body = boi.getInput().getExtensor(SoapBody.class); } if (body != null) { final String nsUri = body.getNamespaceURI(); //do it once, as it might internally use reflection... if (!StringUtils.isEmpty(nsUri)) { ns = nsUri; } } nsStack.add(ns); String prefix = nsStack.getPrefix(ns); String name = output ? boi.getName().getLocalPart() + "Response" : boi.getName().getLocalPart(); StaxUtils.writeStartElement(xmlWriter, prefix, name, ns); return ns; }
if (output) body = info.getOutput().getExtensor(SoapBody.class); } else body = info.getInput().getExtensor(SoapBody.class);
if (msg.getExtensor(SoapBodyInfo.class) .getParts().get(0).getElementQName().equals(opeName)) { boi = op;
SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class);
BindingMessageInfo msg = !isRequestor(message) ? op.getInput() : op.getOutput(); if (msg.getExtensor(SoapBodyInfo.class) .getParts().get(0).getElementQName().equals(opQName)) { operation = op;
public void handleMessage(SoapMessage message) throws Fault { Exchange ex = message.getExchange(); BindingOperationInfo bop = ex.getBindingOperationInfo(); if (bop == null) { return; } if (bop.isUnwrapped()) { bop = bop.getWrappedOperation(); } boolean client = isRequestor(message); BindingMessageInfo bmi = client ? bop.getInput() : bop.getOutput(); if (bmi == null) { return; } SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class); if (sbi == null || sbi.getAttachments() == null || sbi.getAttachments().isEmpty()) { Service s = ex.getService(); DataBinding db = s.getDataBinding(); if (db instanceof JAXBDataBinding && hasSwaRef((JAXBDataBinding) db)) { setupAttachmentOutput(message); } return; } processAttachments(message, sbi); } protected void processAttachments(SoapMessage message, SoapBodyInfo sbi) {
bmi = boi.getOutput(); XMLBindingMessageFormat xmf = bmi.getExtensor(XMLBindingMessageFormat.class); QName rootInModel = null; if (xmf != null) {
bmi = boi.getOutput(); XMLBindingMessageFormat xmf = bmi.getExtensor(XMLBindingMessageFormat.class); QName rootInModel = null; if (xmf != null) {