“Unable to call from C#” is a very general statement.
If you could post the error you receive I could probably say more.
To cover some of the more common errors you should know the following:
The XML Gateways SOAP interface is based on the AXIS engine from Apache so you should make sure of that the C# client adds a SOAPAction to the HTTP header. AXIS is very dependent on this.
The XML Gateways supports MIME but not DIME (a favorite of Microsoft). Make sure your client is creating MIME formatted messages.
javax.resource.ResourceException: StmtMapField.setObject Field Number <2> - null input value for required parameter.; nested exception is:
com.softwareag.fresno.resourceadapter.managed.ManagedAdapterException: StmtMapField.setObject Field Number <2> - null input value for required parameter.
We try to do this because we want to executed using HTTP, because the SOAPCLient in C# dont work.
Being the inexperienced c# programmers we are, we are still looking for a way for you to call the Web Service using c#.
In the meantime, it is probably also helpful for you to know that you the way you are calling the web service is not supported. From the logs posted so far, it looks like you are using the http get method, placing the information required by the Web Service in the request URL.
The Web Service is expecting a document literal SOAP message however which should be "post"ed to the URL of the service.
I don’t have a complete Visual Studio installed at this time so it might take a while to get you an example of how it should work…
If I have the chance to do this, I’ll let you know.
We were able to create a c# program that calls a document literal style web service without too many problems.
The c# program is actually quite simple but requires that you add the wsdl file of your web service to integrate as a WebReference in you c# project.
To get your web service call working, you should begin by creating a C# Console Application Project (called Example below). Once that is done, add your web service as a WebReference to the project.
Once the WebReference is added you can then write the c# program to call your service. In the following example, I used a web service URL of http://pcmaga5/services/EELIB?wsdl to import the Web Reference.
using System;
using System.Collections.Generic;
using System.Text;
namespace Example
{
class Program
{
static void Main(string args)
{
pcmaga5.EELIB ee = new pcmaga5.EELIB();
pcmaga5.EEODEN01 eeoden = new pcmaga5.EEODEN01();
eeoden.ENGLISHNAME = "Jonathan";
ee.Enquiry(eeoden);
Console.WriteLine(eeoden);
}
}
}
All this does is create an instance of the Service and operation. It then sets the value of one of the XML nodes to Jonathan and sends it.
Hi i was able to create adapt the proxy class generated by Visual Studio to call the Web Service the XML Gateways had generate.
Here is the source code.
Thanks for all your help and i hope this can help others to.
Regards
Carlos Abad
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
using System.Configuration;
///
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(“code”)]
[System.Web.Services.WebServiceBindingAttribute(Name=“WS_SP_SAGPRIORIZARDIFERIDOSoapBinding”, Namespace=“”)]
public class PriorizarDiferidoT : System.Web.Services.Protocols.SoapHttpClientProtocol
{