loopbackio / loopbackio/loopback-datasource-juggler

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

@rashmihunt arbeitet bereits daran.

Seit 05.7.2017.

bug help wanted major pinned
Vorherrschende Sprache
JavaScript
Sterne
282
Forks
366
Ø Merge
17 Std. 4 Min.
Gemergte PRs (30 T.)
10

Beschreibung

# 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. (testapp\node_modules\request\request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (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](https://github.com/strongloop/loopback-connector-soap/issues/77) 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

+-- loopback@3.8.0
+-- loopback-boot@2.24.1
+-- loopback-component-explorer@2.7.0
+-- loopback-connector-soap@4.0.0
+-- loopback-datasource-juggler@3.9.1

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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