someone have a a code to send an xml to a web service's

Posted on 2011-10-06
Last Modified: 2012-06-27

i need to send a xml file to a company web services

it give me this url

and it is  the web service descrpition:

  <?xml version="1.0" encoding="UTF-8" ?>
- <definitions name="PRVCargaCFD" targetNamespace="SiCFD" xmlns:tns="SiCFD" xmlns:wsdlns="SiCFD" xmlns:soap="" xmlns:xsd="" xmlns="" xmlns:tns1="SiCFD" xmlns:tns2="Genexus">
- <types>
- <schema targetNamespace="SiCFD" xmlns="" xmlns:SOAP-ENC="" elementFormDefault="qualified">
  <import namespace="Genexus" />
- <element name="PRVCargaCFD.Execute">
- <complexType>
- <sequence>
  <element minOccurs="1" maxOccurs="1" name="Intproveedor" type="xsd:int" />
  <element minOccurs="1" maxOccurs="1" name="Strxml" type="xsd:string" />
- <element name="PRVCargaCFD.ExecuteResponse">
- <complexType>
- <sequence>
  <element minOccurs="1" maxOccurs="1" name="Intrespuesta" type="xsd:byte" />
- <message name="PRVCargaCFD.ExecuteSoapIn">
  <part name="parameters" element="tns:PRVCargaCFD.Execute" />
- <message name="PRVCargaCFD.ExecuteSoapOut">
  <part name="parameters" element="tns:PRVCargaCFD.ExecuteResponse" />
- <portType name="PRVCargaCFDSoapPort">
- <operation name="Execute">
  <input message="wsdlns:PRVCargaCFD.ExecuteSoapIn" />
  <output message="wsdlns:PRVCargaCFD.ExecuteSoapOut" />
- <binding name="PRVCargaCFDSoapBinding" type="wsdlns:PRVCargaCFDSoapPort">
  <soap:binding style="document" transport="" />
- <operation name="Execute">
  <soap:operation soapAction="SiCFDaction/APRVCARGACFD.Execute" />
- <input>
  <soap:body use="literal" />
- <output>
  <soap:body use="literal" />
- <service name="PRVCargaCFD">
- <port name="PRVCargaCFDSoapPort" binding="wsdlns:PRVCargaCFDSoapBinding">
  <soap:address location="" />


i need to send my xml file with 2 parameters :

Intproveedor   integer 5
Strxml     string with xml complete

someone has a code to do this  with c# ?


Question by:tenriquez199
    LVL 96

    Assisted Solution

    by:Bob Learned
    What happens if you add a web reference (service reference), and look at the proxy class that gets generated?  It should generate a class that you can use to call the web method...
    LVL 6

    Accepted Solution

    The following C# code implements the Web Service call you asked help with:
                mx.gob.diconsa.www.PRVCargaCFD client = new;
                int iProveedor = 1;
                String stXml = "<root><elem1>abcdefg</elem1></root>";
                sbyte sbResult;
                sbResult = client.Execute(iProveedor, stXml);

    Open in new window

    "mx.gob.diconsa.www" is the name of the WSDL "Web Reference"
    Refer to the following post in order to define a Web Reference (not WCF Service Reference) -

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now