I need some help figuring out how to create a Web Services Reference Component using Alpha's Web Services tool.
The service I am attempting to connect to is a test server.
The WSDL definitions are here http://cnx.test.dat.com:9280/wsdl/Tf...tMatching.wsdl
The service URL is http://cnx.test.dat.com:9280/TfmiRequest
A user ID and password have been supplied. Anyone that wants to try can use them as it is a test server.
Login:
lst_cnx1
Password:
services
The support people at the company I am working with tell me these credentials work and have been tested using SoapUI. I have not tested with SoapUI myself.
It is my understanding that in order to retrieve the WSDL definitions the user ID, password and service URL are not required. I've tried it with and without them.
When creating a new Soap Definition in Alpha, it returns an error, and according to the company's support, the logs on their end don't show any attempt at a connection.
Alpha allows the selection of three different Service Types - WCF, SOAP and SOAP12. Each returns a different error, and the Web Services Component is not created.
Error1.png Error2.png Error3.png
Using DotNet::Services.GenerateWebServiceClientFromURL Method I have attempted to do this in xbasic:
This creates three files - MyProxy.DLL, MyProxy.cs, MyProxy.pdb
This returns "Assembly 'C:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLL' was successfully created"
This returns:
"AssemblyC:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLLC:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLLMyProxyAssembly '"
Can I generate the WebServices Component from xbasic?
The service I am attempting to connect to is a test server.
The WSDL definitions are here http://cnx.test.dat.com:9280/wsdl/Tf...tMatching.wsdl
The service URL is http://cnx.test.dat.com:9280/TfmiRequest
A user ID and password have been supplied. Anyone that wants to try can use them as it is a test server.
Login:
lst_cnx1
Password:
services
The support people at the company I am working with tell me these credentials work and have been tested using SoapUI. I have not tested with SoapUI myself.
It is my understanding that in order to retrieve the WSDL definitions the user ID, password and service URL are not required. I've tried it with and without them.
When creating a new Soap Definition in Alpha, it returns an error, and according to the company's support, the logs on their end don't show any attempt at a connection.
Alpha allows the selection of three different Service Types - WCF, SOAP and SOAP12. Each returns a different error, and the Web Services Component is not created.
Error1.png Error2.png Error3.png
Using DotNet::Services.GenerateWebServiceClientFromURL Method I have attempted to do this in xbasic:
Code:
DIM ProxyAssembly as C = "C:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLL" DIM WSDLURL as C = "http://cnx.test.dat.com:9280/wsdl/TfmiFreightMatching.wsdl?WSDL" IF .not. File.Exists(ProxyAssembly) DIM Sv as DotNet::Services Sv.GenerateWebServiceClientFromURL(WSDLURL, ProxyAssembly) END IF
Code:
'Generate the Assembly dim Service as DotNet::Services dim WebLink as C = "http://cnx.test.dat.com:9280/wsdl/TfmiFreightMatching.wsdl?WSDL" dim AssyFile as C = "C:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLL" 'This directory must already exist dim Result as C if Service.GenerateWebServiceClientFromURL(WebLink, AssyFile) Result = Result + "Assembly '" + AssyFile \ + "' was successfully created " else Result = Result + "Error creating assembly '" + AssyFile \ + "'" + crlf() \ + chr(9) + Service.CallResult.Text + crlf() end if showvar(Result)
Code:
'Register the service dim Service as DotNet::Services dim AssyRef as DotNet::AssemblyReference dim Namespace as C = "MyProxy" AssyRef.FileName = "C:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLL" 'must exist Dim Result as C if Service.RegisterAssembly(NameSpace, AssyRef) Result = Result + "Assembly '" + AssyRef.FileName \ + "C:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLL" + NameSpace + "Assembly '" + crlf() else Result = Result + "' was successfully registered in namespace '" + AssyRef.FileName \ + "':" + NameSpace + "Assembly '" + crlf() \ + chr(9) + Service.CallResult.Text + crlf() end if showvar(Result)
"AssemblyC:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLLC:\Alpha5\FreightZone\FreightProV1.WebProjects\Default.WebProject\bin\webreference\MyProxy.DLLMyProxyAssembly '"
Can I generate the WebServices Component from xbasic?
Comment