private boolean isRPCEncoded(Definition def) { Iterator<?> ite1 = def.getBindings().values().iterator(); while (ite1.hasNext()) { Binding binding = (Binding)ite1.next(); String bindingStyle = SOAPBindingUtil.getBindingStyle(binding); Iterator<?> ite2 = binding.getBindingOperations().iterator(); while (ite2.hasNext()) { BindingOperation bop = (BindingOperation)ite2.next(); String bopStyle = SOAPBindingUtil.getSOAPOperationStyle(bop); String outputUse = ""; if (SOAPBindingUtil.getBindingOutputSOAPBody(bop) != null) { outputUse = SOAPBindingUtil.getBindingOutputSOAPBody(bop).getUse(); } String inputUse = ""; if (SOAPBindingUtil.getBindingInputSOAPBody(bop) != null) { inputUse = SOAPBindingUtil.getBindingInputSOAPBody(bop).getUse(); } if ((SOAPBinding.Style.RPC.name().equalsIgnoreCase(bindingStyle) || SOAPBinding.Style.RPC .name().equalsIgnoreCase(bopStyle)) && (SOAPBinding.Use.ENCODED.name().equalsIgnoreCase(inputUse) || SOAPBinding.Use.ENCODED .name().equalsIgnoreCase(outputUse))) { return true; } } } return false; }
private boolean checkR2201Output(final Operation operation, final BindingOperation bop) { int outmessagePartsCount = wsdlHelper.getOutMessageParts(operation).size(); SoapBody soapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop); if (soapBody != null) { List<?> parts = soapBody.getParts();
private boolean checkR2201Output(final Operation operation, final BindingOperation bop) { int outmessagePartsCount = wsdlHelper.getOutMessageParts(operation).size(); SoapBody soapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop); if (soapBody != null) { List<?> parts = soapBody.getParts();
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; }
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; }
SoapBody outSoapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop); if (inSoapBody != null && StringUtils.isEmpty(inSoapBody.getNamespaceURI()) || outSoapBody != null && StringUtils.isEmpty(outSoapBody.getNamespaceURI())) {
SoapBody outSoapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop); if (inSoapBody != null && StringUtils.isEmpty(inSoapBody.getNamespaceURI()) || outSoapBody != null && StringUtils.isEmpty(outSoapBody.getNamespaceURI())) {