Pass parameter to webservice through c#

RakeshBhandari used Ask the Experts™
i want to pass parameters & use a third party webservice

i will pass parameters to it using c#

however, i don't know how to do it since i don't know much about the webservice that is created

i only know how many and which parameters to pass to it... but don't know how to interface it

can someone with knowledge about the same please help me?

attaching the link to the webservice as well as the xml code when i open it in a webbrowser:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<definitions xmlns="" xmlns:soap="" xmlns:tns="" xmlns:xsd="" name="EODSMSBroadcastService" targetNamespace="">
<xs:schema xmlns:tns="" xmlns:xs="" targetNamespace="" version="1.0">
<xs:element name="eodbroadcast" type="tns:eodbroadcast"/>
<xs:element name="eodbroadcastResponse" type="tns:eodbroadcastResponse"/>
<xs:complexType name="eodbroadcast">
<xs:element minOccurs="0" name="username" type="xs:string"/>
<xs:element minOccurs="0" name="password" type="xs:string"/>
<xs:element minOccurs="0" name="senderid" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="mobilenos" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="message" type="xs:string"/>
<xs:element name="validatenos" type="xs:boolean"/>
<xs:element minOccurs="0" name="messagetype" type="xs:string"/>
<xs:complexType name="eodbroadcastResponse">
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="xs:string"/>
<message name="EODSMSBroadcast_eodbroadcastResponse">
<part element="tns:eodbroadcastResponse" name="eodbroadcastResponse"/>
<message name="EODSMSBroadcast_eodbroadcast">
<part element="tns:eodbroadcast" name="eodbroadcast"/>
<portType name="EODSMSBroadcast">
<operation name="eodbroadcast" parameterOrder="eodbroadcast">
<input message="tns:EODSMSBroadcast_eodbroadcast"/>
<output message="tns:EODSMSBroadcast_eodbroadcastResponse"/>
<binding name="EODSMSBroadcastBinding" type="tns:EODSMSBroadcast">
<soap:binding style="document" transport=""/>
<operation name="eodbroadcast">
<soap:operation soapAction=""/>
<soap:body use="literal"/>
<soap:body use="literal"/>
<service name="EODSMSBroadcastService">
<port binding="tns:EODSMSBroadcastBinding" name="EODSMSBroadcastPort">
<soap:address location=""/>

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Navneet.Net Full Stack Developer



i am unable to understand

can someone PLEASE provide me a C# example to CALL this webservice with the parameters that are defined inside it?

also, what is the method name, if any?
Navneet.Net Full Stack Developer


Your webservice looks like

        Dim ss As New com.jaamoon.smsc2.EODSMSBroadcastService()

        Dim testClass As New com.jaamoon.smsc2.eodbroadcast
        testClass.username = "sa"
        testClass.password = "abx"

        Dim result As String() = ss.eodbroadcast(testClass)

1. testClass has different properties which you have to assign
2. This result  will be result as Array which you will get back

.Net Full Stack Developer

Like this in C#

            com.jaamoon.smsc2.EODSMSBroadcastService myService = new com.jaamoon.smsc2.EODSMSBroadcastService()

            com.jaamoon.smsc2.eodbroadcast  myBroadcast = new com.jaamoon.smsc2.eodbroadcast();
            myBroadcast.username = "";
            myBroadcast.password = "";
            myBroadcast.senderid = "";

           String[] result =  myService.eodbroadcast(myBroadcast);




thank you for your help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial