Js-code from lib/model.js gets included in SOAP-request causing SOAP-fault

Offen
#1,412 39 Kommentare 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@rashmihunt arbeitet bereits daran.

Seit 05.7.2017.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

bug help wanted major pinned

Steps to reproduce

  • bug

I have auto discovered a SOAP 1.1 Webservice with lb soap and Loobback created models as expected. However when using the StrongLoop API explorer, the SOAP requests fail as they are not properly formatted.

Stack trace

"Error: faultcode: soap:Client faultstring: Unmarshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element '__cachedRelations'. One of '{xxx, xxx}' is expected.
at XMLHandler.xmlToJson (testapp\node_modules\strong-soap\src\parser\xmlHandler.js:635:23)
at testapp\node_modules\strong-soap\src\client.js:279:28
at testapp\node_modules\loopback\node_modules\loopback-datasource-juggler\lib\observer.js:172:22
at doNotify (testapp\node_modules\loopback\node_modules\loopback-datasource-juggler\lib\observer.js:99:49)
at SOAPConnector.ObserverMixin._notifyBaseObservers (testapp\node_modules\loopback\node_modules\loopback-datasource-juggler\lib\observer.js:122:5)
at SOAPConnector.ObserverMixin.notifyObserversOf (testapp\node_modules\loopback\node_modules\loopback-datasource-juggler\lib\observer.js:97:8)
at cbForWork (testapp\node_modules\loopback\node_modules\loopback-datasource-juggler\lib\observer.js:162:14)
at Request._callback (testapp\node_modules\loopback-connector-soap\lib\http.js:98:9)
at Request.self.callback (testapp\node_modules\request\request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (testapp\node_modules\request\request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (testapp\node_modules\request\request.js:1091:12)\
at IncomingMessage.g (events.js:292:16)"

When enabling the debug on loopback:persisted-model I can see the SOAP xml is cluttered by code originating from strongloop/loopback-datasource-juggler as is mentioned in issue 77 from loopback-connecter-soap by @liudonghua123. Since the code is in this repo I thought it would be best to open an issue here.

Expected result

I would expect the SOAP request to be properly formatted. And a SOAP response without an error.

Additional information

win32 x64 6.11.0

+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]

Vorherrschende Sprache
JavaScript
Sterne
279
Forks
362
Ø Merge
21 Std. 14 Min.
Gemergte PRs (30 T.)
16

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus loopbackio/loopback-datasource-juggler

Alle Issues in loopbackio/loopback-datasource-juggler

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.