can any one help me with this WS?
-
Im trying to consume this WS and response NULL. I dont know why because when I test it in boomerang tool work good. Please if someone can help me :( The method dont receive parameters and return a string.
using Tassadar.Core.Interfaces;
using ServiceSeedReference;
using System.Threading.Tasks;namespace Tassadar.Infrastucture.Repositories
{
public class FacturaRepository : IFacturaRepository
{public string GetSeedSII() { string s2; CrSeedClient seedClient = new CrSeedClient(); s2 = seedClient.getSeed(); //RETURN NULL I DONT KNOW WHY return s2; } }
}
Is a public WS. wsdl: https://palena.sii.cl/DTEWS/CrSeed.jws?WSDL[^] Thanks!! PD: sorry for my english!
-
Im trying to consume this WS and response NULL. I dont know why because when I test it in boomerang tool work good. Please if someone can help me :( The method dont receive parameters and return a string.
using Tassadar.Core.Interfaces;
using ServiceSeedReference;
using System.Threading.Tasks;namespace Tassadar.Infrastucture.Repositories
{
public class FacturaRepository : IFacturaRepository
{public string GetSeedSII() { string s2; CrSeedClient seedClient = new CrSeedClient(); s2 = seedClient.getSeed(); //RETURN NULL I DONT KNOW WHY return s2; } }
}
Is a public WS. wsdl: https://palena.sii.cl/DTEWS/CrSeed.jws?WSDL[^] Thanks!! PD: sorry for my english!
You're going to have to contact the vendor for this one. Everything is being done by the "CrSeedClient" class, but nobody but the vendor knows what the class is doing, what it is expecting from your code, or how it works.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Im trying to consume this WS and response NULL. I dont know why because when I test it in boomerang tool work good. Please if someone can help me :( The method dont receive parameters and return a string.
using Tassadar.Core.Interfaces;
using ServiceSeedReference;
using System.Threading.Tasks;namespace Tassadar.Infrastucture.Repositories
{
public class FacturaRepository : IFacturaRepository
{public string GetSeedSII() { string s2; CrSeedClient seedClient = new CrSeedClient(); s2 = seedClient.getSeed(); //RETURN NULL I DONT KNOW WHY return s2; } }
}
Is a public WS. wsdl: https://palena.sii.cl/DTEWS/CrSeed.jws?WSDL[^] Thanks!! PD: sorry for my english!
getSeed
requires a parameter of typegetSeedRequest
, and returns agetSeedResponse
object. Testing this in a console app:CrSeedClient client = new CrSeedClient(); getSeedRequest req = new getSeedRequest(); getSeedResponse resp = client.getSeed(req);
runs OK but still returns
null
inresp
. If I omit thegetSeedRequest
parameter it won't compile. However, if I run the above code with Fiddler listening in, then I can see the response received does actually contain XML, and is not null. Not entirely sure what's happening here but I suspect there's no implementation of getSeedRequest.ToString() so it returns nothing. As a workaround, the following seems to work fine:using System.Diagnostics;
using System.IO;
using System.Net;
using System.Text;
using System.Xml;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
WebRequest webreq = WebRequest.Create("https://palena.sii.cl/DTEWS/CrSeed.jws?WSDL");
webreq.Headers.Add("SOAPAction", "");
webreq.Method = "POST";
byte[] bData = Encoding.ASCII.GetBytes("");
webreq.GetRequestStream().Write(bData, 0, bData.Length);WebResponse webresp = webreq.GetResponse(); XmlDocument doc = new XmlDocument(); doc.LoadXml(new StreamReader(webresp.GetResponseStream()).ReadToEnd()); Debug.WriteLine(doc.InnerText); } }
}
-
getSeed
requires a parameter of typegetSeedRequest
, and returns agetSeedResponse
object. Testing this in a console app:CrSeedClient client = new CrSeedClient(); getSeedRequest req = new getSeedRequest(); getSeedResponse resp = client.getSeed(req);
runs OK but still returns
null
inresp
. If I omit thegetSeedRequest
parameter it won't compile. However, if I run the above code with Fiddler listening in, then I can see the response received does actually contain XML, and is not null. Not entirely sure what's happening here but I suspect there's no implementation of getSeedRequest.ToString() so it returns nothing. As a workaround, the following seems to work fine:using System.Diagnostics;
using System.IO;
using System.Net;
using System.Text;
using System.Xml;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
WebRequest webreq = WebRequest.Create("https://palena.sii.cl/DTEWS/CrSeed.jws?WSDL");
webreq.Headers.Add("SOAPAction", "");
webreq.Method = "POST";
byte[] bData = Encoding.ASCII.GetBytes("");
webreq.GetRequestStream().Write(bData, 0, bData.Length);WebResponse webresp = webreq.GetResponse(); XmlDocument doc = new XmlDocument(); doc.LoadXml(new StreamReader(webresp.GetResponseStream()).ReadToEnd()); Debug.WriteLine(doc.InnerText); } }
}
Thanks! Thats work me :thumbsup::thumbsup::thumbsup:
-
Thanks! Thats work me :thumbsup::thumbsup::thumbsup: