public SoapBinding(BindingInfo info) { this(info, Soap11.getInstance()); }
public void setRoles(Set<String> set) { if (set != null && (set.contains(Soap11.getInstance().getNoneRole()) || set.contains(Soap12.getInstance().getNoneRole()))) { throw new WebServiceException(BUNDLE.getString("NONE_ROLE_ERR")); } this.roles = set; addRequiredRoles(); }
public static SoapVersion readVersion(XMLStreamReader xmlReader, SoapMessage message) { String ns = xmlReader.getNamespaceURI(); String lcname = xmlReader.getLocalName(); if (ns == null || "".equals(ns)) { throw new SoapFault(new Message("NO_NAMESPACE", LOG, lcname), Soap11.getInstance().getVersionMismatch()); } SoapVersion soapVersion = SoapVersionFactory.getInstance().getSoapVersion(ns); if (soapVersion == null) { throw new SoapFault(new Message("INVALID_VERSION", LOG, ns, lcname), Soap11.getInstance().getVersionMismatch()); } if (!"Envelope".equals(lcname)) { throw new SoapFault(new Message("INVALID_ENVELOPE", LOG, lcname), soapVersion.getSender()); } message.setVersion(soapVersion); return soapVersion; }
faultCode = Soap11.getInstance().getReceiver(); exMessage = new Message("INVALID_FAULT", LOG).toString();
public static SoapVersion readVersion(XMLStreamReader xmlReader, SoapMessage message) { String ns = xmlReader.getNamespaceURI(); String lcname = xmlReader.getLocalName(); if (ns == null || "".equals(ns)) { throw new SoapFault(new Message("NO_NAMESPACE", LOG, lcname), Soap11.getInstance().getVersionMismatch()); } SoapVersion soapVersion = SoapVersionFactory.getInstance().getSoapVersion(ns); if (soapVersion == null) { throw new SoapFault(new Message("INVALID_VERSION", LOG, ns, lcname), Soap11.getInstance().getVersionMismatch()); } if (!"Envelope".equals(lcname)) { throw new SoapFault(new Message("INVALID_ENVELOPE", LOG, lcname), soapVersion.getSender()); } message.setVersion(soapVersion); return soapVersion; }
faultCode = Soap11.getInstance().getReceiver(); exMessage = new Message("INVALID_FAULT", LOG).toString();
public SoapBinding(BindingInfo info) { this(info, Soap11.getInstance()); }
public void setRoles(Set<String> set) { if (set != null && (set.contains(Soap11.getInstance().getNoneRole()) || set.contains(Soap12.getInstance().getNoneRole()))) { throw new WebServiceException(BUNDLE.getString("NONE_ROLE_ERR")); } this.roles = set; addRequiredRoles(); }
public SoapMessage(Message message) { super(message); setVersion(Soap11.getInstance()); } public SoapMessage(SoapVersion ver) {
/** * {@inheritDoc} */ public Object convert(Object sourceObject, ReifiedType targetType) throws Exception { if ("1.2".equals(sourceObject)) { return Soap12.getInstance(); } else if ("1.1".equals(sourceObject)) { return Soap11.getInstance(); } throw new IllegalArgumentException("Unimplemented SOAP version requested."); } }
private void resolveSoapVersion(String n) { if (WSDLConstants.NS_SOAP11.equalsIgnoreCase(n)) { this.soapVersion = Soap11.getInstance(); } else if (WSDLConstants.NS_SOAP12.equalsIgnoreCase(n)) { this.soapVersion = Soap12.getInstance(); } else { throw new RuntimeException("Unknow bindingId: " + n + ". Can not resolve the SOAP version"); } }
/** * {@inheritDoc} */ public Object convert(Object sourceObject, ReifiedType targetType) throws Exception { if ("1.2".equals(sourceObject)) { return Soap12.getInstance(); } else if ("1.1".equals(sourceObject)) { return Soap11.getInstance(); } throw new IllegalArgumentException("Unimplemented SOAP version requested."); } }
private void resolveSoapVersion(String n) { if (WSDLConstants.NS_SOAP11.equalsIgnoreCase(n)) { this.soapVersion = Soap11.getInstance(); } else if (WSDLConstants.NS_SOAP12.equalsIgnoreCase(n)) { this.soapVersion = Soap12.getInstance(); } else { throw new RuntimeException("Unknow bindingId: " + n + ". Can not resolve the SOAP version"); } }
public SoapMessage(Message message) { super(message); setVersion(Soap11.getInstance()); } public SoapMessage(SoapVersion ver) {
@Override public void setAsText(String text) throws IllegalArgumentException { if ("1.2".equals(text)) { this.version = Soap12.getInstance(); } else if ("1.1".equals(text)) { this.version = Soap11.getInstance(); } else { super.setAsText(text); } }
@Override public void setAsText(String text) throws IllegalArgumentException { if ("1.2".equals(text)) { this.version = Soap12.getInstance(); } else if ("1.1".equals(text)) { this.version = Soap11.getInstance(); } else { super.setAsText(text); } }
public Fault createFault(JMSFault jmsFault) { Fault f = null; if (version == Soap11.getInstance()) { f = createSoap11Fault(jmsFault); // so we can encode the SequenceFault as header f.initCause(jmsFault); } else { f = createSoap12Fault(jmsFault); } return f; }
public Fault createFault(SequenceFault sf, Message msg) { Fault f = null; if (version == Soap11.getInstance()) { f = createSoap11Fault(sf); // so we can encode the SequenceFault as header f.initCause(sf); } else { f = createSoap12Fault(sf, msg); } return f; }
public Fault createFault(JMSFault jmsFault) { Fault f = null; if (version == Soap11.getInstance()) { f = createSoap11Fault(jmsFault); // so we can encode the SequenceFault as header f.initCause(jmsFault); } else { f = createSoap12Fault(jmsFault); } return f; }
public static SOAPPart parseSoapMessage(String samlRequest) throws XMLStreamException { XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(new StringReader(samlRequest)); SoapMessage soapMessage = new SoapMessage(Soap11.getInstance()); SAAJInInterceptor.SAAJPreInInterceptor preInInterceptor = new SAAJInInterceptor.SAAJPreInInterceptor(); soapMessage.setContent(XMLStreamReader.class, xmlStreamReader); preInInterceptor.handleMessage(soapMessage); SAAJInInterceptor inInterceptor = new SAAJInInterceptor(); inInterceptor.handleMessage(soapMessage); return ((SOAPPart) soapMessage.getContent(Node.class)); }