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=“http://schemas.xmlsoap.org/wsdl/”]http://schemas.xmlsoap.org/wsdl/[/URL]” xmlns:jms=“[URL=“http://schemas.xmlsoap.org/wsdl/jms/”]http://schemas.xmlsoap.org/wsdl/jms/[/URL]” xmlns:mns=“/wbia/webservices/samples_GetExRate_collabs” xmlns:ns1=“[URL=“http://tempuri.org/”]Bing” xmlns:soap=“[URL=“http://schemas.xmlsoap.org/wsdl/soap/”]http://schemas.xmlsoap.org/wsdl/soap/[/URL]” xmlns:tns=“/wbia/webservices/samples_GetExRate_collabs-interface” xmlns:wsdl=“[URL=“http://schemas.xmlsoap.org/wsdl/”]http://schemas.xmlsoap.org/wsdl/[/URL]” xmlns:xsd=“[URL=“XML Schema”]http://www.w3.org/2001/XMLSchema[/URL]”>
wsdl:types<xsd:schema targetNamespace=“[URL=“http://tempuri.org/”]Bing” xmlns=“[URL=“XML Schema”]http://www.w3.org/2001/XMLSchema[/URL]” xmlns:soapenc=“[URL=“http://schemas.xmlsoap.org/soap/encoding/”]http://schemas.xmlsoap.org/soap/encoding/[/URL]” xmlns:tns=“[URL=“http://tempuri.org/”]Bing” xmlns:wsdl=“[URL=“http://schemas.xmlsoap.org/wsdl/”]http://schemas.xmlsoap.org/wsdl/[/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>
<wsdl:message name=“TLO_ExRateResponseMsg”>
<wsdl:part name=“ExRateDetails” type=“ns1:ArrayOfExchangeRate”/>
</wsdl:message>
<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:portType>
<wsdl:binding name=“From_SOAPHTTPSListener1_Binding” type=“tns:GetExRate_collabs_From_PortType”>
<soap:binding style=“rpc” transport=“<A href=“http://schemas.xmlsoap.org/soap/http"/">http://schemas.xmlsoap.org/soap/http”/>
<wsdl: operation name=“getExRate”>
<soap: operation soapAction=”“/>
<wsdl:input name=“TLO_ExRateInput”>
<soap:body encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/” namespace=“http://tempuri.org/” use=“encoded”/>
</wsdl:input>
<wsdl: output name=“TLO_ExRateOutput”>
<soap:body encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/” namespace=“http://tempuri.org/” use=“encoded”/>
</wsdl: output>
</wsdl: operation>
</wsdl:binding>
<wsdl:binding name=“From_SOAPHTTPListener1_Binding” type=“tns:GetExRate_collabs_From_PortType”>
<soap:binding style=“rpc” transport=”<A href=“http://schemas.xmlsoap.org/soap/http"/">http://schemas.xmlsoap.org/soap/http”/>
<wsdl: operation name=“getExRate”>
<soap: operation soapAction=“”/>
<wsdl:input name=“TLO_ExRateInput”>
<soap:body encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/” namespace=“http://tempuri.org/” use=“encoded”/>
</wsdl:input>
<wsdl: output name=“TLO_ExRateOutput”>
<soap:body encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/” namespace=“http://tempuri.org/” use=“encoded”/>
</wsdl: output>
</wsdl: operation>
</wsdl:binding>
<wsdl:service name=“GetExRate_collabs”>
<wsdl:port binding=“tns:From_SOAPHTTPSListener1_Binding” name=“From_SOAPHTTPSListener1_BindingPort”>
<soap:address location=“<A href=“http://tech.forums.softwareag.com:8443/wbia/webservices/samples"/">http://tech.forums.softwareag.com:8443/wbia/webservices/samples”/>
</wsdl:port>
<wsdl:port binding=“tns:From_SOAPHTTPListener1_Binding” name=“From_SOAPHTTPListener1_BindingPort”>
<soap:address location=”<A href=“http://172.16.200.80:8080/wbia/webservices/samples"/">http://172.16.200.80:8080/wbia/webservices/samples”/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

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();
wcs.getExRate();

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?

Thanks!
Your kindly help is greatly appreciated.
:slight_smile:

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.

Mark