File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
mock/soap/src/main/java/io/gatehill/imposter/plugin/soap/parser Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -155,16 +155,14 @@ abstract class AbstractWsdlParser(
155155 * Attempt to resolve the element with the given, optionally qualified, name
156156 * from within the XSD.
157157 */
158- protected fun resolveElementFromXsd (elementQName : QName ): QName ? {
159- // TODO should this use xsd.findElement(elementQName).name instead?
160- // TODO should this use QName.equals instead?
161- // TODO should this be filtered on unqualified elements?
162- // the top level element from the XSD
163- val matchingElement: QName ? =
164- xsd.documentTypes().find { it.documentElementName.localPart == elementQName.localPart }?.documentElementName
165-
166- logger.trace(" Resolved element name {} to qualified type: {}" , elementQName, matchingElement)
167- return matchingElement
158+ protected fun resolveElementTypeFromXsd (elementQName : QName ): QName ? {
159+ val matchingElement = xsd.findElement(elementQName)
160+ ? : return null
161+
162+ val elementType = matchingElement.type.name
163+
164+ logger.trace(" Resolved element name {} to qualified type: {}" , elementQName, elementType)
165+ return elementType
168166 }
169167
170168 /* *
You can’t perform that action at this time.
0 commit comments