i need to consume a web service

i need to consume a web service at http://www.diconsa.gob.mx/SiCFDQA/servlet/aprvcargacfd?wsdl

i need to send 3 xml files

i'm reading some articles about web services, but i don'r understand how can i do it

could some one help me

httpwww.diconsa.gob.mxSiCFDQAser.txt
ejemplo.xml
LVL 1
tenriquez199Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

alexey_gusevCommented:
do the following:

- in your c# project r-click on References => Add Web Reference - this will open a window where you can paste the url for wsdl file and click Go; this will discover the web service for you and show its methods and offer its name; click OK

- in your source code where you want to use this web service, add

using wsTest.mx.gob.diconsa.www;
....

then you can consume it as

namespace wsTest
{
    class Program
    {
        static void Main(string[] args)
        {
            // This is the wrapper class defined in ws
            PRVCargaCFD ws = new PRVCargaCFD();
            StreamReader r = File.OpenText("c:\\test1.xml");
            string xml = r.ReadToEnd();
            r.Close();
            sbyte res = ws.Execute(1, xml);
            // do whatever you need with the result or call Execute again
            ....
            // Finally, dispose the object
            ws.Dispose();
        }
    }
}

that's it :)
0
tenriquez199Author Commented:
alexey a lot thanks

i'm testing you tell me ....i have dude....it can put in a default form? cause i did that, but have error

system tell me "can't find type or namespace wstest....missing using sirective or assemble reference"

could you help me please


error.jpg
0
alexey_gusevCommented:
you have to use your default namespace, not mine :)

so in your case it will be probably WebApplication1
0
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

tenriquez199Author Commented:
thanks alexey

other dude

that webservice work with 2 parameters ...how it will be the syntax ..cause i test 2 and have error.

            r.Close();
            string Strxml = xml;
            string Intproveedor = "1389";
            sbyte res = ws.Execute(Intproveedor ,Strxml );
            Console.WriteLine("Construido Objeto con el valor {0}",

also :
            sbyte res = ws.Execute(1,Intproveedor ,Strxml );

.........
you know wich is my error ?

thanks a lot
0
tenriquez199Author Commented:
excuse me.....i  solve it ...previous comment

now i have  next error:

"is not possible go to server. conection error with www.diconsa.gob.mx it look that remote debug monitor MSVSMON it not run at the remote server "


you know some about it?

thanks a lot


0
alexey_gusevCommented:
hmm, it looks strange. can you try both versions?

I've tested it from console app - works just fine
0
tenriquez199Author Commented:
alexev thnks

now my web server provider tell me i need to stay off debug

i have this error :
Error:debug remote MOnitor Microsoft Viusual Studio (MSVSMON.EXE) look down at remote server

you know wich can i do to avoid it?
0
tenriquez199Author Commented:
alexey thanks

i confuse
i don't have acces to remote server

that server is property a gobernemente institution..

how can i acces to remote server to run debug procees?

is ther other solution ..or i'm confuse


my provider tell me ...only stay off debug, but i don't know jow can we that
0
alexey_gusevCommented:
maybe they mean you cannot debug it? then try running it in release mode
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tenriquez199Author Commented:
Alexey

wonderful

it run fine at test time.

also run fine at live time

thanks a lot
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.