473,373 Members | 1,407 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,373 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 4142
"=?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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.