472,119 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Creating client from WSDL

(I'm new in SOAP)
I get some wsdl file (from apache service ). I tried creating SOAP client
with .NET - trying to add Web Reference and get error like: "Custom tool
error: Unable to import WebService/Schema. Unable to import binding..."
I thought may be wsdl file is not good enough (it was created with qsoap
toolkit), so I paste-copy sample from
http://www.w3.org/TR/2001/NOTE-wsdl-20010315#_wsdl (will paste below) and
receive same error (qsoap give some warning on this file but create client) .
Could you say what I'm doing wrong? Thanks ahead.
<?xml version="1.0" encoding="utf-8" ?>
<definitions
targetNamespace="http://autodevbsd1.dallas.corp.yahoo.com:9466/ymon.wsdl"
xmlns:tns="http://autodevbsd1.dallas.corp.yahoo.com:9466/ymon.wsdl"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urn:ymon" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="urn:ymon"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:ymon"
xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="statsResponse">
<sequence>
<element name="version" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true" />
<element name="uptime" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="treqs" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="tmillis" type="xsd:unsignedLong" minOccurs="1"
maxOccurs="1" />
<element name="avgrt" type="xsd:float" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>
<complexType name="ArrayOfstring">
<complexContent>
<restriction base="SOAP-ENC:Array">
<sequence>
<element name="item" type="xsd:string" minOccurs="0" maxOccurs="unbounded"
/>
</sequence>
<attribute ref="SOAP-ENC:arrayType" WSDL:arrayType="xsd:string[]" />
</restriction>
</complexContent>
</complexType>
<complexType name="execResponse">
<sequence>
<element name="code" type="xsd:int" minOccurs="1" maxOccurs="1" />
<element name="output" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
<element name="ping">
<complexType>
<sequence />
</complexType>
</element>
<element name="pingResponse">
<complexType>
<sequence>
<element name="pingResp" type="xsd:int" />
</sequence>
</complexType>
</element>
<element name="version">
<complexType>
<sequence />
</complexType>
</element>
<element name="versionResponse">
<complexType>
<sequence>
<element name="version" type="xsd:string" />
</sequence>
</complexType>
</element>
<element name="stats">
<complexType>
<sequence>
<element name="reserved" type="xsd:int" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>
</element>
<element name="statsResponse">
<complexType>
<sequence>
<element name="version" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true" />
<element name="uptime" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="treqs" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="tmillis" type="xsd:unsignedLong" minOccurs="1"
maxOccurs="1" />
<element name="avgrt" type="xsd:float" minOccurs="1" maxOccurs="1" />
</sequence>
</complexType>
</element>
<element name="echo">
<complexType>
<sequence>
<element name="msg" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
</element>
<element name="echoResponse">
<complexType>
<sequence>
<element name="echoResp" type="xsd:string" />
</sequence>
</complexType>
</element>
<element name="syncNode">
<complexType>
<sequence>
<element name="cluster" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="host" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="gtime" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="node" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
</element>
<element name="syncNodeResponse">
<complexType>
<sequence>
<element name="syncResp" type="xsd:int" />
</sequence>
</complexType>
</element>
<element name="nagiosHostCheckResult">
<complexType>
<sequence>
<element name="cluster" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="host" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="rtime" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="pcode" type="xsd:int" minOccurs="1" maxOccurs="1" />
<element name="pout" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
</element>
<element name="nagiosHostCheckResultResponse">
<complexType>
<sequence>
<element name="hostCheckResp" type="xsd:int" />
</sequence>
</complexType>
</element>
<element name="nagiosServiceCheckResult">
<complexType>
<sequence>
<element name="cluster" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="host" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="service" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="rtime" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="pcode" type="xsd:int" minOccurs="1" maxOccurs="1" />
<element name="pout" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
</element>
<element name="nagiosServiceCheckResultResponse">
<complexType>
<sequence>
<element name="serviceCheckResp" type="xsd:int" />
</sequence>
</complexType>
</element>
<element name="nagiosCommand">
<complexType>
<sequence>
<element name="cluster" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="host" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="command" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
</element>
<element name="nagiosCommandResponse">
<complexType>
<sequence>
<element name="nagiosCommandResp" type="xsd:int" />
</sequence>
</complexType>
</element>
<element name="exec">
<complexType>
<sequence>
<element name="cmd" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="args" type="ns:ArrayOfstring" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="timeout" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"
/>
</sequence>
</complexType>
</element>
<element name="execResponse">
<complexType>
<sequence>
<element name="code" type="xsd:int" minOccurs="1" maxOccurs="1" />
<element name="output" type="xsd:string" minOccurs="0" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
</element>
<element name="serviceLog">
<complexType>
<sequence>
<element name="cluster" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="host" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="service" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="rtime" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="log" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
</element>
<element name="serviceLogResponse">
<complexType>
<sequence>
<element name="logResp" type="xsd:int" />
</sequence>
</complexType>
</element>
<element name="serviceMetrics">
<complexType>
<sequence>
<element name="cluster" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="host" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="service" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
<element name="rtime" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"
/>
<element name="metrics" type="xsd:string" minOccurs="1" maxOccurs="1"
nillable="true" />
</sequence>
</complexType>
</element>
<element name="serviceMetricsResponse">
<complexType>
<sequence>
<element name="metricsResp" type="xsd:int" />
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="pingRequest">
<part name="body" element="ns:ping" />
</message>
<message name="pingResponse">
<part name="body" element="ns:pingResponse" />
</message>
<message name="versionRequest">
<part name="body" element="ns:version" />
</message>
<message name="versionResponse">
<part name="body" element="ns:versionResponse" />
</message>
<message name="statsRequest">
<part name="body" element="ns:stats" />
</message>
<message name="statsResponse">
<part name="body" element="ns:statsResponse" />
</message>
<message name="echoRequest">
<part name="body" element="ns:echo" />
</message>
<message name="echoResponse">
<part name="body" element="ns:echoResponse" />
</message>
<message name="syncNodeRequest">
<part name="body" element="ns:syncNode" />
</message>
<message name="syncNodeResponse">
<part name="body" element="ns:syncNodeResponse" />
</message>
<message name="nagiosHostCheckResultRequest">
<part name="body" element="ns:nagiosHostCheckResult" />
</message>
<message name="nagiosHostCheckResultResponse">
<part name="body" element="ns:nagiosHostCheckResultResponse" />
</message>
<message name="nagiosServiceCheckResultRequest">
<part name="body" element="ns:nagiosServiceCheckResult" />
</message>
<message name="nagiosServiceCheckResultResponse">
<part name="body" element="ns:nagiosServiceCheckResultResponse" />
</message>
<message name="nagiosCommandRequest">
<part name="body" element="ns:nagiosCommand" />
</message>
<message name="nagiosCommandResponse">
<part name="body" element="ns:nagiosCommandResponse" />
</message>
<message name="execRequest">
<part name="body" element="ns:exec" />
</message>
<message name="execResponse">
<part name="body" element="ns:execResponse" />
</message>
<message name="serviceLogRequest">
<part name="body" element="ns:serviceLog" />
</message>
<message name="serviceLogResponse">
<part name="body" element="ns:serviceLogResponse" />
</message>
<message name="serviceMetricsRequest">
<part name="body" element="ns:serviceMetrics" />
</message>
<message name="serviceMetricsResponse">
<part name="body" element="ns:serviceMetricsResponse" />
</message>
<portType name="ymonPortType">
<operation name="ping">
<documentation>Service definition of function ns__ping</documentation>
<input message="tns:pingRequest" />
<output message="tns:pingResponse" />
</operation>
<operation name="version">
<documentation>Service definition of function ns__version</documentation>
<input message="tns:versionRequest" />
<output message="tns:versionResponse" />
</operation>
<operation name="stats">
<documentation>Service definition of function ns__stats</documentation>
<input message="tns:statsRequest" />
<output message="tns:statsResponse" />
</operation>
<operation name="echo">
<documentation>Service definition of function ns__echo</documentation>
<input message="tns:echoRequest" />
<output message="tns:echoResponse" />
</operation>
<operation name="syncNode">
<documentation>Service definition of function ns__syncNode</documentation>
<input message="tns:syncNodeRequest" />
<output message="tns:syncNodeResponse" />
</operation>
<operation name="nagiosHostCheckResult">
<documentation>Service definition of function
ns__nagiosHostCheckResult</documentation>
<input message="tns:nagiosHostCheckResultRequest" />
<output message="tns:nagiosHostCheckResultResponse" />
</operation>
<operation name="nagiosServiceCheckResult">
<documentation>Service definition of function
ns__nagiosServiceCheckResult</documentation>
<input message="tns:nagiosServiceCheckResultRequest" />
<output message="tns:nagiosServiceCheckResultResponse" />
</operation>
<operation name="nagiosCommand">
<documentation>Service definition of function
ns__nagiosCommand</documentation>
<input message="tns:nagiosCommandRequest" />
<output message="tns:nagiosCommandResponse" />
</operation>
<operation name="exec">
<documentation>Service definition of function ns__exec</documentation>
<input message="tns:execRequest" />
<output message="tns:execResponse" />
</operation>
<operation name="serviceLog">
<documentation>Service definition of function
ns__serviceLog</documentation>
<input message="tns:serviceLogRequest" />
<output message="tns:serviceLogResponse" />
</operation>
<operation name="serviceMetrics">
<documentation>Service definition of function
ns__serviceMetrics</documentation>
<input message="tns:serviceMetricsRequest" />
<output message="tns:serviceMetricsResponse" />
</operation>
</portType>
<binding name="ymon" type="tns:ymonPortType">
<SOAP:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="ping">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="version">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="stats">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="echo">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="syncNode">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="nagiosHostCheckResult">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="nagiosServiceCheckResult">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="nagiosCommand">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="exec">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="serviceLog">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
<operation name="serviceMetrics">
<SOAP:operation style="document" soapAction="" />
<input>
<SOAP:body use="literal" />
</input>
<output>
<SOAP:body use="literal" />
</output>
</operation>
</binding>
<service name="ymon">
<documentation>gSOAP 2.6.0 generated service definition</documentation>
<port name="ymon" binding="tns:ymon">
<SOAP:address location="http://autodevbsd1.dallas.corp.yahoo.com:9466" />
</port>
</service>
</definitions>
Nov 23 '05 #1
2 4029
"=?Utf-8?B?cHNodmFydHM=?=" <ps******@discussions.microsoft.com> wrote in
news:B8**********************************@microsof t.com:
"Custom tool error: Unable to import WebService/Schema. Unable to import
binding..." I thought may be wsdl file is not good enough (it was
created with qsoap toolkit), so I paste-copy sample from
http://www.w3.org/TR/2001/NOTE-wsdl-20010315#_wsdl (will paste below)
and receive same error (qsoap give some warning on this file but create
client) . Could you say what I'm doing wrong? Thanks ahead.


Its quite possible you arent doing anything wrong. XML is very open - in fact
it lets you do so much that no matter how good the "add web reference" is, it
will never be able to interpret every possiblity. If you control the server
side definition, find out what binding it says (you wrote ....) and try to
simplify it.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 23 '05 #2
Sorry, by mistake I paste my wsdl. But same problem happen with first sample
from wsdl.org and how I can simplify what describe only one function?

<?xml version="1.0"?>
<definitions name="StockQuote"

targetNamespace="http://example.com/stockquote.wsdl"
xmlns:tns="http://example.com/stockquote.wsdl"
xmlns:xsd1="http://example.com/stockquote.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">

<types>
<schema targetNamespace="http://example.com/stockquote.xsd"
xmlns="http://www.w3.org/2000/10/XMLSchema">
<element name="TradePriceRequest">
<complexType>
<all>
<element name="tickerSymbol" type="string"/>
</all>
</complexType>
</element>
<element name="TradePrice">
<complexType>
<all>
<element name="price" type="float"/>
</all>
</complexType>
</element>
</schema>
</types>

<message name="GetLastTradePriceInput">
<part name="body" element="xsd1:TradePriceRequest"/>
</message>

<message name="GetLastTradePriceOutput">
<part name="body" element="xsd1:TradePrice"/>
</message>

<portType name="StockQuotePortType">
<operation name="GetLastTradePrice">
<input message="tns:GetLastTradePriceInput"/>
<output message="tns:GetLastTradePriceOutput"/>
</operation>
</portType>

<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetLastTradePrice">
<soap:operation soapAction="http://example.com/GetLastTradePrice"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>

<service name="StockQuoteService">
<documentation>My first service</documentation>
<port name="StockQuotePort" binding="tns:StockQuoteBinding">
<soap:address location="http://example.com/stockquote"/>
</port>
</service>

</definitions>

"Chad Z. Hower aka Kudzu" wrote:
"=?Utf-8?B?cHNodmFydHM=?=" <ps******@discussions.microsoft.com> wrote in
news:B8**********************************@microsof t.com:
"Custom tool error: Unable to import WebService/Schema. Unable to import
binding..." I thought may be wsdl file is not good enough (it was
created with qsoap toolkit), so I paste-copy sample from
http://www.w3.org/TR/2001/NOTE-wsdl-20010315#_wsdl (will paste below)
and receive same error (qsoap give some warning on this file but create
client) . Could you say what I'm doing wrong? Thanks ahead.


Its quite possible you arent doing anything wrong. XML is very open - in fact
it lets you do so much that no matter how good the "add web reference" is, it
will never be able to interpret every possiblity. If you control the server
side definition, find out what binding it says (you wrote ....) and try to
simplify it.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Christian Wilhelm | last post: by
reply views Thread by jennifer.perkins | last post: by
5 posts views Thread by Nick K. | last post: by
reply views Thread by =?Utf-8?B?UlN1Yg==?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.