Cannot access Web Methods from .Net Client

Hi All,

I got some problems in consuming Web Methods from .NET Client by referencing the WSDL generated by WBI Connector.

There’s only one Method in this WSDL.
But I cannot even find this method, named “getExRate()” in this WSDL.
I have Add Web Reference the WSDL successfully in MS Visual Studio 2005.
But I couldn’t able to access the Methods of this WSDL.

I don’t know why.
Could anyone help me?

The below text and attach is the WSDL file generated by WBI Connector.

<?xml version="1.0"?>
<wsdl:definitions name=“GetExRate_collabsService-interface” targetNamespace=“/wbia/webservices/samples_GetExRate_collabs-interface” xmlns=“[URL=“”][/URL]” xmlns:jms=“[URL=“”][/URL]” xmlns:mns=“/wbia/webservices/samples_GetExRate_collabs” xmlns:ns1=“[URL=“”]Bing” xmlns:soap=“[URL=“”][/URL]” xmlns:tns=“/wbia/webservices/samples_GetExRate_collabs-interface” xmlns:wsdl=“[URL=“”][/URL]” xmlns:xsd=“[URL=“XML Schema”][/URL]”>
wsdl:types<xsd:schema targetNamespace=“[URL=“”]Bing” xmlns=“[URL=“XML Schema”][/URL]” xmlns:soapenc=“[URL=“”][/URL]” xmlns:tns=“[URL=“”]Bing” xmlns:wsdl=“[URL=“”][/URL]” xmlns:xsd=“xsd:annotationxsd:documentationSep”>XML Schema">xsd:annotationxsd:documentationSep 11, 2006 12:43:16 PM Singapore Time; English (United States)</xsd:documentation></xsd:annotation><xsd:complexType name=“ExchangeRate”>xsd:sequence<xsd:element name=“CurrnFrom” type=“xsd:string”/><xsd:element name=“CurrnTo” type=“xsd:string”/><xsd:element name=“DateValid” type=“xsd:string”/><xsd:element name=“Rate” type=“xsd:string”/></xsd:sequence></xsd:complexType><xsd:complexType name=“ArrayOfExchangeRate”>xsd:complexContent<xsd:restriction base=“soapenc:Array”><xsd:attribute ref=“soapenc:arrayType” wsdl:arrayType=“tns:ExchangeRate[]”/></xsd:restriction></xsd:complexContent></xsd:complexType></xsd:schema></wsdl:types><wsdl:message name=“TLO_ExRateRequestMsg”>
<wsdl:part name=“DummyKey” type=“xsd:string”/>
<wsdl:message name=“TLO_ExRateResponseMsg”>
<wsdl:part name=“ExRateDetails” type=“ns1:ArrayOfExchangeRate”/>
<wsdl:portType name=“GetExRate_collabs_From_PortType”>
<wsdl: operation name=“getExRate”>
<wsdl:input message=“tns:TLO_ExRateRequestMsg” name=“TLO_ExRateInput”/>
<wsdl: output message=“tns:TLO_ExRateResponseMsg” name=“TLO_ExRateOutput”/>
</wsdl: operation>
<wsdl:binding name=“From_SOAPHTTPSListener1_Binding” type=“tns:GetExRate_collabs_From_PortType”>
<soap:binding style=“rpc” transport=“<A href=“"/">”/>
<wsdl: operation name=“getExRate”>
<soap: operation soapAction=”“/>
<wsdl:input name=“TLO_ExRateInput”>
<soap:body encodingStyle=“” namespace=“” use=“encoded”/>
<wsdl: output name=“TLO_ExRateOutput”>
<soap:body encodingStyle=“” namespace=“” use=“encoded”/>
</wsdl: output>
</wsdl: operation>
<wsdl:binding name=“From_SOAPHTTPListener1_Binding” type=“tns:GetExRate_collabs_From_PortType”>
<soap:binding style=“rpc” transport=”<A href=“"/">”/>
<wsdl: operation name=“getExRate”>
<soap: operation soapAction=“”/>
<wsdl:input name=“TLO_ExRateInput”>
<soap:body encodingStyle=“” namespace=“” use=“encoded”/>
<wsdl: output name=“TLO_ExRateOutput”>
<soap:body encodingStyle=“” namespace=“” use=“encoded”/>
</wsdl: output>
</wsdl: operation>
<wsdl:service name=“GetExRate_collabs”>
<wsdl:port binding=“tns:From_SOAPHTTPSListener1_Binding” name=“From_SOAPHTTPSListener1_BindingPort”>
<soap:address location=“<A href=“"/">”/>
<wsdl:port binding=“tns:From_SOAPHTTPListener1_Binding” name=“From_SOAPHTTPListener1_BindingPort”>
<soap:address location=”<A href=“"/">”/>

GetExRate_collabs.wsdl (3.82 KB)

Okay so we have the RPC binding style is bad out of the way.

<wsdl: operation name="getExRate">

corresponds to your method that has a single input parameter of

<wsdl:message name="TLO_ExRateRequestMsg">
<wsdl:part name="DummyKey" type="xsd:string"/>

Which will return an output (array it looks like) of

<wsdl:message name="TLO_ExRateResponseMsg">
<wsdl:part name="ExRateDetails" type="ns1:ArrayOfExchangeRate"/>

In .Net getExRate will be the method name of an object related to your web reference name. It will take the single argument of a String somevariable.

Hey Mark,

Thanks for your reply.

So, do I need to regenerate the WSDL in correct format?
From .Net Client, I wanna invote the "getExRate()’ method like this without parameters.

WCService wcs=new WCService();

And this getExRate function will return the string data type with xml format data.
For e.g,.

USD SGD 1.62 1.32 USD SGD 1.62 1.32 . . .

So, what should this WSDL looks like?
Do we need to change or configure the setting in WBI Connector when generating the WSDL to return XML String instead of array?
How do we generate the WSDL to be able to access the methods from .Net Client?

Your kindly help is greatly appreciated.

How are you using webMethods Integration Server in your architecture? What role does WBI play? Ideally, you would change your web service to use document/literal style messaging and then generate the WSDL to match.