Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { request, gql } from 'graphql-request'


import { example } from './example.js';
//import requestFunc from './request.js'
import consume from './request.js'

const url = "http://localhost:5000/graphql";

Expand Down Expand Up @@ -62,7 +62,7 @@ app.get('/', function(req, res) {
})

//routes for consuming the other system
//app.get('/consume/:id', requestFunc);
app.get('/consume/:id', consume);

// Launch the server and listen
const port = 8000;
Expand Down
3 changes: 2 additions & 1 deletion client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import soap from 'soap';

//const url = 'https://lalu-soap-dot-lalu-storage.uc.r.appspot.com/wsdl?wsdl';
const url = 'http://localhost:8000/wsdl?wsdl';
//const url = 'http://localhost:8000/wsdl?wsdl';
const url = "https://2ftestinterface.team-uncademy.repl.co/wsdl?wsdl"

// Create client
soap.createClient(url, function(err, client) {
Expand Down
15 changes: 8 additions & 7 deletions request.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import soap from 'soap';

// const url = 'http://34.123.106.254:3009/wsdl?wsdl';
const url = "http://soap.skillsly.app:8080/ws/users.wsdl"
const url = "https://2ftestinterface.team-uncademy.repl.co/wsdl?wsdl"

export default async(req, res) => {
const id = req.params.id;

soap.createClient(url, function(err, client) {
soap.createClient(url, function (err, client) {
if (err) {
throw err;
}
Expand All @@ -15,14 +13,17 @@ export default async(req, res) => {
* in the WSDL file
*/
var args = {
userId: id
id: id
};
// call the service
client.getUser(args, function(err, response) {
client.MessageSplitter(args, function(err, response) {
if (err)
throw err;
// print the service returned result
return res.json(response);
//res.send(client.describe());
//res.json(typeOf(client.Message.courseName));
console.log(response.example);
return res.json(response.example);
});
});
};