Hi all,
This is my first post to the community so please be kind
I was tasked to create a .NET client to consume these WSDLs:
//http://xxx.x.x.xxx:yyyy/DV910/AddressBookManager?wsdl
//http://xxx.x.x.xxx:yyyy/DV910/CustomerManager?wsdl
I have scoured the usual online resources and could not find any helpful/current examples for Visual Studio 2015 C#.
Here are some links that I did find but are not useful as they are too old (VS2005!) or rely on JDE specific tools.
o
http://sofb.developer-works.com/art...unicate+with+this+JDE+(JD+Edward)+Web+service
o
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=jde bssv vs2015
Should this be a WCF, WebAPI, or standard Class Library project?
I have added the "Web Reference" to a Class Library (Add Service Ref->Advanced->Add Web Ref) but am stuck with simple things like how to create an ICredentials object to log in - and after that ?????
I have created a WCF but am drowned out by the amount of coding overhead (first WCF for ME!!) and have lost track of the forest through the trees
What I'm really looking for is documentation of a shell project that:
1) adds the JDE WSDL web reference (URL)
2) gives an example for connecting to the service (login/auth)
3) calls a method on the jde object (getCustomerV2) with a parameter
4) process the result in some sort of meaningful way
here is an example of the type of code I'm loooking for ... just for VS2015 (the following code uses Microsoft WSE 2.0 SP2 which is not current)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Services.Protocols;
using JDEWebService.JDE_AddBookMgr_WebReference; //the webreference
using System.Web.Services;
using Microsoft.Web.Services2.Security.Tokens; //Microsoft WSE 2.0 SP2
using System.Net;
namespace webserviceJDE
{
class Program
{
static void Main(string[] args)
{
string username = "jde";
string password = "jde";
UsernameToken ut = new UsernameToken(username, password, PasswordOption.SendPlainText); //Create Security token...
RI_AddressBookManager abm = new RI_AddressBookManager();//RI_AddressBookManager();
NetworkCredential myCred = new NetworkCredential(username, password);
abm.RequestSoapContext.Security.Tokens.Add(ut);
RI_GetAddressBook a = new RI_GetAddressBook();//Selection Parameters
a.entityTypeCode = "E"; //just look for employees
RI_ShowAddressBook S = abm.getAddressBook(a);
if (S != null)
{
foreach (RI_AddressBook ab in S.addressBook)
{
Console.WriteLine(ab.entityName);
}
}
}
}
}
Here is my attempt:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using JDEWebService.JDE_CustMgr_WebReference;
using JDEWebService.Properties;
namespace JDEWebService
{
public class JDEWebService
{
public string TEST()
{
ICredentials credentials = new NetworkCredential("JDEWBSRVC", "BSSV42#T");
getCustomerV2 customer = new getCustomerV2();
using (CustomerManagerService service = new CustomerManagerService())
{
service.Credentials = credentials;
service.getCustomerV2(customer);
}
return "done";
}
}
}
Any and all suggestions would be greatly appreciated.
ty - marcus