MCPcopy
hub / github.com/vpulim/node-soap / addChild

Method addChild

src/wsdl/elements.ts:1109–1130  ·  view source on GitHub ↗
(child)

Source from the content-addressed store, hash-verified

1107 }
1108
1109 public addChild(child) {
1110 if (child instanceof TypesElement) {
1111 // Merge types.schemas into definitions.schemas
1112 merge(this.schemas, child.schemas);
1113 } else if (child instanceof MessageElement) {
1114 this.messages[child.$name] = child;
1115 } else if (child.name === 'import') {
1116 const schemaElement = new SchemaElement(child.$namespace, {});
1117 schemaElement.init();
1118 this.schemas[child.$namespace] = schemaElement;
1119 this.schemas[child.$namespace].addChild(child);
1120 } else if (child instanceof PortTypeElement) {
1121 this.portTypes[child.$name] = child;
1122 } else if (child instanceof BindingElement) {
1123 if (child.transport === 'http://schemas.xmlsoap.org/soap/http' || child.transport === 'http://www.w3.org/2003/05/soap/bindings/HTTP/') {
1124 this.bindings[child.$name] = child;
1125 }
1126 } else if (child instanceof ServiceElement) {
1127 this.services[child.$name] = child;
1128 }
1129 this.children.pop();
1130 }
1131}
1132
1133export class BodyElement extends Element {

Callers

nothing calls this directly

Calls 3

mergeFunction · 0.90
initMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected