cxf git commit: [CXF-6488] Binding style vs part type R2203 And R2204 problems in wsdl document
Repository: cxf Updated Branches: refs/heads/2.7.x-fixes d426c3adf - b4fcc78f8 [CXF-6488] Binding style vs part type R2203 And R2204 problems in wsdl document Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b4fcc78f Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b4fcc78f Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b4fcc78f Branch: refs/heads/2.7.x-fixes Commit: b4fcc78f86252c606f767ded8f7d10c257375cdd Parents: d426c3a Author: Akitoshi Yoshida a...@apache.org Authored: Mon Aug 17 13:51:32 2015 +0200 Committer: Akitoshi Yoshida a...@apache.org Committed: Mon Aug 17 14:01:07 2015 +0200 -- .../validator/internal/WSIBPValidator.java | 41 +- .../cxf/tools/validator/WSDLValidationTest.java | 8 ++ .../test/resources/validator_wsdl/cxf6488.wsdl | 84 3 files changed, 129 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/b4fcc78f/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java -- diff --git a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java index cfc69b7..98fa716 100644 --- a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java +++ b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java @@ -22,8 +22,11 @@ package org.apache.cxf.tools.validator.internal; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Set; + import javax.jws.soap.SOAPBinding; import javax.wsdl.Binding; import javax.wsdl.BindingOperation; @@ -33,6 +36,10 @@ import javax.wsdl.Message; import javax.wsdl.Operation; import javax.wsdl.Part; import javax.wsdl.PortType; +import javax.wsdl.WSDLElement; +import javax.wsdl.extensions.mime.MIMEContent; +import javax.wsdl.extensions.mime.MIMEMultipartRelated; +import javax.wsdl.extensions.mime.MIMEPart; import javax.xml.namespace.QName; import org.apache.cxf.binding.soap.SOAPBindingUtil; @@ -306,11 +313,12 @@ public class WSIBPValidator extends AbstractDefinitionValidator { BindingOperation bop = wsdlHelper.getBindingOperation(def, operation.getName()); if (operation.getInput() != null operation.getInput().getMessage() != null) { Message inMess = operation.getInput().getMessage(); +SetString ignorableParts = getIgnorableParts(bop.getBindingInput()); for (Iterator? ite3 = inMess.getParts().values().iterator(); ite3.hasNext();) { Part p = (Part)ite3.next(); if (SOAPBinding.Style.RPC.name().equalsIgnoreCase(style) p.getTypeName() == null - !isHeaderPart(bop, p)) { + !isHeaderPart(bop, p) !isIgnorablePart(p.getName(), ignorableParts)) { addErrorMessage(An rpc-literal binding in a DESCRIPTION MUST refer, + in its soapbind:body element(s), only to + wsdl:part element(s) that have been defined @@ -319,7 +327,7 @@ public class WSIBPValidator extends AbstractDefinitionValidator { } if (SOAPBinding.Style.DOCUMENT.name().equalsIgnoreCase(style) - p.getElementName() == null) { + p.getElementName() == null !isIgnorablePart(p.getName(), ignorableParts)) { addErrorMessage(A document-literal binding in a DESCRIPTION MUST refer, + in each of its soapbind:body element(s), + only to wsdl:part element(s) @@ -331,10 +339,12 @@ public class WSIBPValidator extends AbstractDefinitionValidator { } if (operation.getOutput() != null operation.getOutput().getMessage() != null) { Message outMess = operation.getOutput().getMessage(); +SetString ignorableParts = getIgnorableParts(bop.getBindingInput()); + for (Iterator? ite3 = outMess.getParts().values().iterator(); ite3.hasNext();) { Part p = (Part)ite3.next(); if (style.equalsIgnoreCase(SOAPBinding.Style.RPC.name()) p.getTypeName() == null - !isHeaderPart(bop, p)) { +
cxf git commit: [CXF-6488] Binding style vs part type R2203 And R2204 problems in wsdl document
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 7de1b04ff - 35ae7e451 [CXF-6488] Binding style vs part type R2203 And R2204 problems in wsdl document Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/35ae7e45 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/35ae7e45 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/35ae7e45 Branch: refs/heads/3.0.x-fixes Commit: 35ae7e4514b22fc42a7d090b4eb83f5c9086b195 Parents: 7de1b04 Author: Akitoshi Yoshida a...@apache.org Authored: Mon Aug 17 13:51:32 2015 +0200 Committer: Akitoshi Yoshida a...@apache.org Committed: Mon Aug 17 13:55:52 2015 +0200 -- .../validator/internal/WSIBPValidator.java | 41 +- .../cxf/tools/validator/WSDLValidationTest.java | 8 ++ .../test/resources/validator_wsdl/cxf6488.wsdl | 84 3 files changed, 129 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/35ae7e45/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java -- diff --git a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java index fc70e91..e042087 100644 --- a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java +++ b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java @@ -22,8 +22,11 @@ package org.apache.cxf.tools.validator.internal; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Set; + import javax.jws.soap.SOAPBinding; import javax.wsdl.Binding; import javax.wsdl.BindingOperation; @@ -33,6 +36,10 @@ import javax.wsdl.Message; import javax.wsdl.Operation; import javax.wsdl.Part; import javax.wsdl.PortType; +import javax.wsdl.WSDLElement; +import javax.wsdl.extensions.mime.MIMEContent; +import javax.wsdl.extensions.mime.MIMEMultipartRelated; +import javax.wsdl.extensions.mime.MIMEPart; import javax.xml.namespace.QName; import org.apache.cxf.binding.soap.SOAPBindingUtil; @@ -318,11 +325,12 @@ public class WSIBPValidator extends AbstractDefinitionValidator { BindingOperation bop = wsdlHelper.getBindingOperation(def, operation.getName()); if (operation.getInput() != null operation.getInput().getMessage() != null) { Message inMess = operation.getInput().getMessage(); +SetString ignorableParts = getIgnorableParts(bop.getBindingInput()); for (Iterator? ite3 = inMess.getParts().values().iterator(); ite3.hasNext();) { Part p = (Part)ite3.next(); if (SOAPBinding.Style.RPC.name().equalsIgnoreCase(style) p.getTypeName() == null - !isHeaderPart(bop, p)) { + !isHeaderPart(bop, p) !isIgnorablePart(p.getName(), ignorableParts)) { addErrorMessage(An rpc-literal binding in a DESCRIPTION MUST refer, + in its soapbind:body element(s), only to + wsdl:part element(s) that have been defined @@ -331,7 +339,7 @@ public class WSIBPValidator extends AbstractDefinitionValidator { } if (SOAPBinding.Style.DOCUMENT.name().equalsIgnoreCase(style) - p.getElementName() == null) { + p.getElementName() == null !isIgnorablePart(p.getName(), ignorableParts)) { addErrorMessage(A document-literal binding in a DESCRIPTION MUST refer, + in each of its soapbind:body element(s), + only to wsdl:part element(s) @@ -343,10 +351,12 @@ public class WSIBPValidator extends AbstractDefinitionValidator { } if (operation.getOutput() != null operation.getOutput().getMessage() != null) { Message outMess = operation.getOutput().getMessage(); +SetString ignorableParts = getIgnorableParts(bop.getBindingInput()); + for (Iterator? ite3 = outMess.getParts().values().iterator(); ite3.hasNext();) { Part p = (Part)ite3.next(); if (style.equalsIgnoreCase(SOAPBinding.Style.RPC.name()) p.getTypeName() == null - !isHeaderPart(bop, p)) { +
cxf git commit: [CXF-6488] Binding style vs part type R2203 And R2204 problems in wsdl document
Repository: cxf Updated Branches: refs/heads/master a3b70f3a4 - d1b812ee9 [CXF-6488] Binding style vs part type R2203 And R2204 problems in wsdl document Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d1b812ee Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d1b812ee Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d1b812ee Branch: refs/heads/master Commit: d1b812ee948d0412cc0c3864db67a3342b951e7e Parents: a3b70f3 Author: Akitoshi Yoshida a...@apache.org Authored: Mon Aug 17 13:51:32 2015 +0200 Committer: Akitoshi Yoshida a...@apache.org Committed: Mon Aug 17 13:54:47 2015 +0200 -- .../validator/internal/WSIBPValidator.java | 41 +- .../cxf/tools/validator/WSDLValidationTest.java | 8 ++ .../test/resources/validator_wsdl/cxf6488.wsdl | 84 3 files changed, 129 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/d1b812ee/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java -- diff --git a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java index fc70e91..e042087 100644 --- a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java +++ b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java @@ -22,8 +22,11 @@ package org.apache.cxf.tools.validator.internal; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Set; + import javax.jws.soap.SOAPBinding; import javax.wsdl.Binding; import javax.wsdl.BindingOperation; @@ -33,6 +36,10 @@ import javax.wsdl.Message; import javax.wsdl.Operation; import javax.wsdl.Part; import javax.wsdl.PortType; +import javax.wsdl.WSDLElement; +import javax.wsdl.extensions.mime.MIMEContent; +import javax.wsdl.extensions.mime.MIMEMultipartRelated; +import javax.wsdl.extensions.mime.MIMEPart; import javax.xml.namespace.QName; import org.apache.cxf.binding.soap.SOAPBindingUtil; @@ -318,11 +325,12 @@ public class WSIBPValidator extends AbstractDefinitionValidator { BindingOperation bop = wsdlHelper.getBindingOperation(def, operation.getName()); if (operation.getInput() != null operation.getInput().getMessage() != null) { Message inMess = operation.getInput().getMessage(); +SetString ignorableParts = getIgnorableParts(bop.getBindingInput()); for (Iterator? ite3 = inMess.getParts().values().iterator(); ite3.hasNext();) { Part p = (Part)ite3.next(); if (SOAPBinding.Style.RPC.name().equalsIgnoreCase(style) p.getTypeName() == null - !isHeaderPart(bop, p)) { + !isHeaderPart(bop, p) !isIgnorablePart(p.getName(), ignorableParts)) { addErrorMessage(An rpc-literal binding in a DESCRIPTION MUST refer, + in its soapbind:body element(s), only to + wsdl:part element(s) that have been defined @@ -331,7 +339,7 @@ public class WSIBPValidator extends AbstractDefinitionValidator { } if (SOAPBinding.Style.DOCUMENT.name().equalsIgnoreCase(style) - p.getElementName() == null) { + p.getElementName() == null !isIgnorablePart(p.getName(), ignorableParts)) { addErrorMessage(A document-literal binding in a DESCRIPTION MUST refer, + in each of its soapbind:body element(s), + only to wsdl:part element(s) @@ -343,10 +351,12 @@ public class WSIBPValidator extends AbstractDefinitionValidator { } if (operation.getOutput() != null operation.getOutput().getMessage() != null) { Message outMess = operation.getOutput().getMessage(); +SetString ignorableParts = getIgnorableParts(bop.getBindingInput()); + for (Iterator? ite3 = outMess.getParts().values().iterator(); ite3.hasNext();) { Part p = (Part)ite3.next(); if (style.equalsIgnoreCase(SOAPBinding.Style.RPC.name()) p.getTypeName() == null - !isHeaderPart(bop, p)) { +