public ExtensibilityElement createExtension(final boolean isSOAP12, final String address) throws WSDLException { SoapAddress soapAddress = null; soapAddress = SOAPBindingUtil.createSoapAddress(registry, isSOAP12); soapAddress.setLocationURI(address); return soapAddress; } }
private boolean isOutOfBandHeader(BindingMessageInfo bmi, ExtensibilityElement ext) { SoapHeader soapHeader = SOAPBindingUtil.getSoapHeader(ext); return soapHeader.getMessage() != null && !bmi.getMessageInfo().getName().equals(soapHeader.getMessage()); }
private boolean isHeaderPart(final BindingOperation bop, final Part part) { QName elementName = part.getElementName(); if (elementName != null) { String partName = elementName.getLocalPart(); SoapHeader inSoapHeader = SOAPBindingUtil.getBindingInputSOAPHeader(bop); if (inSoapHeader != null) { return partName.equals(inSoapHeader.getPart()); } SoapHeader outSoapHeader = SOAPBindingUtil.getBindingOutputSOAPHeader(bop); if (outSoapHeader != null) { return partName.equals(outSoapHeader.getPart()); } } return false; }
private boolean checkR2716(final BindingOperation bop) { SoapBody inSoapBody = SOAPBindingUtil.getBindingInputSOAPBody(bop); SoapBody outSoapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop); if (inSoapBody != null && !StringUtils.isEmpty(inSoapBody.getNamespaceURI()) || outSoapBody != null && !StringUtils.isEmpty(outSoapBody.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2716") + "Operation '" + bop.getName() + "' soapBody MUST NOT have namespace attribute"); return false; } SoapHeader inSoapHeader = SOAPBindingUtil.getBindingInputSOAPHeader(bop); SoapHeader outSoapHeader = SOAPBindingUtil.getBindingOutputSOAPHeader(bop); if (inSoapHeader != null && !StringUtils.isEmpty(inSoapHeader.getNamespaceURI()) || outSoapHeader != null && !StringUtils.isEmpty(outSoapHeader.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2716") + "Operation '" + bop.getName() + "' soapHeader MUST NOT have namespace attribute"); return false; } List<SoapFault> soapFaults = SOAPBindingUtil.getBindingOperationSoapFaults(bop); for (SoapFault fault : soapFaults) { if (!StringUtils.isEmpty(fault.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2716") + "Operation '" + bop.getName() + "' soapFault MUST NOT have namespace attribute"); return false; } } return true; }
public BindingInfo createBindingInfo(ServiceInfo service, javax.wsdl.Binding binding, String ns) { SoapBindingInfo bi = new SoapBindingInfo(service, ns); // Copy all the extensors initializeBindingInfo(service, binding, bi); SoapBinding wSoapBinding = SOAPBindingUtil.getSoapBinding(bi.getExtensors(ExtensibilityElement.class)); bi.setTransportURI(wSoapBinding.getTransportURI()); bi.setStyle(wSoapBinding.getStyle()); for (BindingOperationInfo boi : bi.getOperations()) { initializeBindingOperation(bi, boi); } return bi; }
if (isSOAPBinding(obj)) { SoapBinding soapBinding = getSoapBinding(obj); bindingStyle = soapBinding.getStyle(); if (bindingStyle == null) { bindingStyle = ""; if (isSOAPOperation(obj)) { SoapOperation soapOperation = getSoapOperation(obj); style = soapOperation.getStyle(); if (style == null) { style = "";
public static String getBindingStyle(Binding binding) { for (Object obj : binding.getExtensibilityElements()) { if (isSOAPBinding(obj)) { return getSoapBinding(obj).getStyle(); } } return ""; }
public static String getSOAPOperationStyle(BindingOperation bop) { String style = ""; if (bop != null) { for (Object obj : bop.getExtensibilityElements()) { if (isSOAPOperation(obj)) { style = getSoapOperation(obj).getStyle(); break; } } } return style; }
ExtensibilityElement e = extensions.get(0); if (e instanceof SoapAddress) { address = ((SoapAddress)e).getLocationURI(); } else if (e instanceof AddressType) { address = ((AddressType)e).getLocation();
private boolean checkR2716(final BindingOperation bop) { SoapBody inSoapBody = SOAPBindingUtil.getBindingInputSOAPBody(bop); SoapBody outSoapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop); if (inSoapBody != null && !StringUtils.isEmpty(inSoapBody.getNamespaceURI()) || outSoapBody != null && !StringUtils.isEmpty(outSoapBody.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2716") + "Operation '" + bop.getName() + "' soapBody MUST NOT have namespace attribute"); return false; } SoapHeader inSoapHeader = SOAPBindingUtil.getBindingInputSOAPHeader(bop); SoapHeader outSoapHeader = SOAPBindingUtil.getBindingOutputSOAPHeader(bop); if (inSoapHeader != null && !StringUtils.isEmpty(inSoapHeader.getNamespaceURI()) || outSoapHeader != null && !StringUtils.isEmpty(outSoapHeader.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2716") + "Operation '" + bop.getName() + "' soapHeader MUST NOT have namespace attribute"); return false; } List<SoapFault> soapFaults = SOAPBindingUtil.getBindingOperationSoapFaults(bop); for (SoapFault fault : soapFaults) { if (!StringUtils.isEmpty(fault.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2716") + "Operation '" + bop.getName() + "' soapFault MUST NOT have namespace attribute"); return false; } } return true; }
public BindingInfo createBindingInfo(ServiceInfo service, javax.wsdl.Binding binding, String ns) { SoapBindingInfo bi = new SoapBindingInfo(service, ns); // Copy all the extensors initializeBindingInfo(service, binding, bi); SoapBinding wSoapBinding = SOAPBindingUtil.getSoapBinding(bi.getExtensors(ExtensibilityElement.class)); bi.setTransportURI(wSoapBinding.getTransportURI()); bi.setStyle(wSoapBinding.getStyle()); for (BindingOperationInfo boi : bi.getOperations()) { initializeBindingOperation(bi, boi); } return bi; }
public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocationURI(s); } }
private boolean isHeaderPart(final BindingOperation bop, final Part part) { QName elementName = part.getElementName(); if (elementName != null) { String partName = elementName.getLocalPart(); SoapHeader inSoapHeader = SOAPBindingUtil.getBindingInputSOAPHeader(bop); if (inSoapHeader != null) { return partName.equals(inSoapHeader.getPart()); } SoapHeader outSoapHeader = SOAPBindingUtil.getBindingOutputSOAPHeader(bop); if (outSoapHeader != null) { return partName.equals(outSoapHeader.getPart()); } } return false; }
public static String getBindingStyle(Binding binding) { for (Object obj : binding.getExtensibilityElements()) { if (isSOAPBinding(obj)) { return getSoapBinding(obj).getStyle(); } } return ""; }
public static String getSOAPOperationStyle(BindingOperation bop) { String style = ""; if (bop != null) { for (Object obj : bop.getExtensibilityElements()) { if (isSOAPOperation(obj)) { style = getSoapOperation(obj).getStyle(); break; } } } return style; }
if (inSoapBody != null && StringUtils.isEmpty(inSoapBody.getNamespaceURI()) || outSoapBody != null && StringUtils.isEmpty(outSoapBody.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2717") + "soapBody in the input/output of the binding operation '" if (inSoapHeader != null && !StringUtils.isEmpty(inSoapHeader.getNamespaceURI()) || outSoapHeader != null && !StringUtils.isEmpty(outSoapHeader.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2726") + "Operation '" + bop.getName() + "' soapHeader MUST NOT have namespace attribute"); if (!StringUtils.isEmpty(fault.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2726") + "Operation '" + bop.getName() + "' soapFault MUST NOT have namespace attribute");
public void setAddress(String s) { super.setAddress(s); if (saddress != null) { saddress.setLocationURI(s); } }
if (inSoapBody != null && StringUtils.isEmpty(inSoapBody.getNamespaceURI()) || outSoapBody != null && StringUtils.isEmpty(outSoapBody.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2717") + "soapBody in the input/output of the binding operation '" if (inSoapHeader != null && !StringUtils.isEmpty(inSoapHeader.getNamespaceURI()) || outSoapHeader != null && !StringUtils.isEmpty(outSoapHeader.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2726") + "Operation '" + bop.getName() + "' soapHeader MUST NOT have namespace attribute"); if (!StringUtils.isEmpty(fault.getNamespaceURI())) { addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2726") + "Operation '" + bop.getName() + "' soapFault MUST NOT have namespace attribute");
public ExtensibilityElement createExtension(final boolean isSOAP12, final String address) throws WSDLException { SoapAddress soapAddress = null; soapAddress = SOAPBindingUtil.createSoapAddress(registry, isSOAP12); soapAddress.setLocationURI(address); return soapAddress; } }
@Override public void handle(HttpExchange exchange) throws IOException { try { //Update address in EndpointInfo; this can only happen here, //as the contextPath is provided in the HttpExchange only EndpointInfo ei = destination.getEndpointInfo(); if (ei != null) { String ad = ei.getAddress(); String path = exchange.getHttpContext().getPath(); if (ad != null && ad.equals(path)) { synchronized (ei) { String contextPath = exchange.getContextPath(); ei.setAddress(contextPath + path); if (ei.getExtensor(AddressType.class) != null) { ei.getExtensor(AddressType.class).setLocation(contextPath + path); } else if (ei.getExtensor(SoapAddress.class) != null) { ei.getExtensor(SoapAddress.class).setLocationURI(contextPath + path); } } } } //service request destination.doService(new HttpServletRequestAdapter(exchange), new HttpServletResponseAdapter(exchange)); } finally { exchange.close(); } }