473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 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 4145
"=?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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
0
by: jennifer.perkins | last post by:
I've seen a couple posts by people having similar problems, but the suggested solutions I've tried so far haven't worked. I'm using a SOAP client in VB.Net (constructed by wsdl.exe) and the...
1
by: louis_la_brocante | last post by:
Dear all, I am having trouble generating a client proxy for a webservice whose methods return a "complex" type. The type is complex in that it is a class whose members are a mix of primitive...
5
by: Nick K. | last post by:
I use wsdl.exe to generate client code to call a web service. The actual web service is generated with the BizTalk Web Services Publishing Wizard. I'm not sure this is particular to the BizTalk...
7
by: beachdog | last post by:
I'm using Visual Studio 2005/C# to build a web client. The web server is something I've written in a different framework, which does not support generating wsdl, so I have hand-built a wsdl file,...
2
by: Bert Leu | last post by:
Hi I understand, that the "normal way" in creating Web Services is: Creating Web Service -- WSDL -- Creating Client Unfortunately, I have to create a Web Service (Service, not Clinet) from...
0
by: vpal61 | last post by:
Hello, I have an Excel/VBA web service client with SOAP Toolkit, consuming Apache Tomcat webservice, which is working fine. Now I am trying to migrate to .NET, and build client in VS2005 with...
0
by: =?Utf-8?B?UlN1Yg==?= | last post by:
Hello, Hope I am asking this question in the right forum. We have been given a Wsdl file and the webservices link from a client. I am trying to invoke their web service first by creating a proxy...
4
by: gcharbon | last post by:
Hi community, I have a problem with a Soap client written in php. I have a local server (coded in c and a client in c too, it works fine), but i want to test client in php, and i have an error...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.