How to call invoke webservice method Using WSDL file as refernce ?
I am not able to invoke the Web service Method using WSDL web reffernce.Step i Follow to invoke the webservice method
1. Add Web refernce of WSDL file. (It generates the refernce method )
2. create instance of service.
3. assign parameter to service method.
I am not able to invoke the service.
Sample c# code
CM_PORTG3_Ref.CM_PORTG3 _CM_PORTG3 = new CM_PORTG3_Ref.CM_PORTG3();
_CM_PORTG3.startdate = "1-Aug-2015";
_CM_PORTG3.enddate = "31-Aug-2015";
_CM_PORTG3.aid = "Agent1";
CM_PORTG3_Ref.CM_PORTG3Service _CM_PORTG3Service = new CM_PORTG3_Ref.CM_PORTG3Service();
////Smaple WSDl file format
<?xml version="1.0"?>
<!-- root element wsdl:definitions defines set of related services -->
<wsdl:definitions name="CM_PORTG3"
targetNamespace="http://ouaf.oracle.com/spl/XAIXapp/xaiserver/CM_PORTG3"
xmlns:xai="http://ouaf.oracle.com/spl/XAIXapp/xaiserver/CM_PORTG3"
xmlns:xaixsd="http://ouaf.oracle.com/spl/XAIXapp/xaiserver/CM_PORTG3"
xmlns:schemans1="http://oracle.com/CM_PORTG3.xsd"
xmlns:schemans2="http://oracle.com/CM_PORTG3.xsd"
xmlns:ouaf="urn:oracle:ouaf"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!-- wsdl:types encapsulates schema definitions of communication types;
here using xsd -->
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ouaf="urn:oracle:ouaf" targetNamespace="urn:oracle:ouaf" elementFormDefault="unqualified">
<xsd:element name="Fault">
<xsd:complexType>
<xsd:all>
<xsd:element name="ResponseStatus" type="xsd:string"/>
<xsd:element name="ResponseCode" type="xsd:int"/>
<xsd:element name="ResponseText" type="xsd:string"/>
<xsd:element name="ResponseData" minOccurs="0">
<xsd:complexType>
<xsd:attribute name="parm1" type="xsd:string"/>
<xsd:attribute name="parm2" type="xsd:string"/>
<xsd:attribute name="parm3" type="xsd:string"/>
<xsd:attribute name="parm4" type="xsd:string"/>
<xsd:attribute name="parm5" type="xsd:string"/>
<xsd:attribute name="parm6" type="xsd:string"/>
<xsd:attribute name="parm7" type="xsd:string"/>
<xsd:attribute name="parm8" type="xsd:string"/>
<xsd:attribute name="parm9" type="xsd:string"/>
<xsd:attribute name="text" type="xsd:string"/>
<xsd:attribute name="category" type="xsd:string"/>
<xsd:attribute name="numParm" type="xsd:int"/>
<xsd:attribute name="number" type="xsd:int"/>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="dateTime">
<xsd:restriction base="xsd:token">
<xsd:pattern value="[0-9]{4}-[0-1][0-9]-[0-3][0-9]-[0-2][0-9]:[0-6][0-9]:[0-6][0-9]"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="date">
<xsd:restriction base="xsd:token">
<xsd:pattern value="[0-9]{4}-[0-1][0-9]-[0-3][0-9]"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="time">
<xsd:restriction base="xsd:token">
<xsd:pattern value="[0-2][0-9]:[0-6][0-9]:[0-6][0-9]"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="money">
<xsd:restriction base="xsd:decimal"/>
</xsd:simpleType>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ouaf="urn:oracle:ouaf" targetNamespace="http://oracle.com/CM_PORTG3.xsd" elementFormDefault="qualified">
<xsd:import namespace="urn:oracle:ouaf"/>
<xsd:element name="CM_PORTG3">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="zone" type="xsd:string" minOccurs="0" default="CM_PORTG3"/>
<xsd:element name="startdate" type="xsd:string" minOccurs="0"/>
<xsd:element name="enddate" type="xsd:string" minOccurs="0"/>
<xsd:element name="aid" type="xsd:string" minOccurs="0"/>
<xsd:element name="rowCount" type="xsd:decimal" minOccurs="0"/>
<xsd:element name="results" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="total1" type="xsd:string" minOccurs="0"/>
<xsd:element name="casecd" type="xsd:string" minOccurs="0"/>
<xsd:element name="aid" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="faultStyle" type="xsd:string" fixed="wsdl" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<!-- wsdl:message elements describe potential transactions -->
<!-- request CM_PORTG3Request is of type CM_PORTG3 -->
<wsdl:message name="CM_PORTG3Request">
<wsdl:part name="body" element="schemans1:CM_PORTG3"/>
</wsdl:message>
<!-- response CM_PORTG3Response is of type CM_PORTG3Response -->
<wsdl:message name="CM_PORTG3Response">
<wsdl:part name="body" element="schemans2:CM_PORTG3"/>
</wsdl:message>
<!-- fault CM_PORTG3Fault is of type CM_PORTG3Fault -->
<wsdl:message name="CM_PORTG3Fault">
<wsdl:part name="fault" element="ouaf:Fault"/>
</wsdl:message>
<!-- wsdl:portType describes messages in an operation -->
<wsdl:portType name="CM_PORTG3PortType">
<!-- the value of wsdl:operation eludes me -->
<wsdl:operation name="CM_PORTG3">
<wsdl:input message="xai:CM_PORTG3Request"/>
<wsdl:output message="xai:CM_PORTG3Response"/>
<wsdl:fault name="fault" message="xai:CM_PORTG3Fault"/>
</wsdl:operation>
</wsdl:portType>
<!-- wsdl:binding states a serialization protocol for this service -->
<wsdl:binding name="CM_PORTG3SoapBinding"
type="xai:CM_PORTG3PortType">
<!-- leverage off soap:binding document style @@@(no wsdl:foo pointing at
the soap binding) -->
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<!-- semi-opaque container of network transport details classed by
soap:binding above @@@ -->
<wsdl:operation name="CM_PORTG3">
<!-- again bind to SOAP? @@@ -->
<soap:operation soapAction="http://ouaf.oracle.com/spl/XAIXapp/xaiserver/CM_PORTG3"/>
<!-- furthur specify that the messages in the wsdl:operation
"CM_PORTG3" use SOAP? @@@ -->
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="fault">
<soap:fault name="fault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<!-- wsdl:service names a new service "CM_PORTG3Service" -->
<wsdl:service name="CM_PORTG3Service">
<wsdl:documentation>CM_PORTG3 version 2: Case Count against status-User ID for Genesys</wsdl:documentation>
<!-- connect it to the binding "CM_PORTG3SoapBinding" above -->
<wsdl:port name="CM_PORTG3Port"
binding="xai:CM_PORTG3SoapBinding">
<!-- give the binding a network address -->
<soap:address location="http://192.168.1.50:4500/spl/XAIApp/xaiserver/CM_PORTG3"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>