473,802 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataSet WSDL

How does one go about getting the information from an .xsd file into a WSDL
document? I have a web service that creates a simple object that IBM
Websphere can see and use. Great.
However, when I expose a DataSet, Websphere cant use the WSDL document, as
it doesnt describe the data elments in the dataset. Im done a lot of
readying and looking at posts, and typed datasets sounds like they might be
the answer, but I cant figure out how to information from the .xsd into the
WSDL document.
Thanks, Mark
Nov 21 '05 #1
2 5666
Don't use typed datasets.
Instead use an XSD schema that maps to custom objects. Think of them as
Data Transfer Objects (from GoF).
You can pass arrays and graphs of objects this way, with full interop,
between WebSphere and .NET.

To answer your question,
do a wsdl:import on the XSD .
example:

http://webservices.xml.com/2003/08/0...ockquote3.wsdl

article:

"MarkAurit" <Ma*******@disc ussions.microso ft.com> wrote in message
news:5E******** *************** ***********@mic rosoft.com...
How does one go about getting the information from an .xsd file into a
WSDL
document? I have a web service that creates a simple object that IBM
Websphere can see and use. Great.
However, when I expose a DataSet, Websphere cant use the WSDL document, as
it doesnt describe the data elments in the dataset. Im done a lot of
readying and looking at posts, and typed datasets sounds like they might
be
the answer, but I cant figure out how to information from the .xsd into
the
WSDL document.
Thanks, Mark

Nov 21 '05 #2
The Web Services framework has special knowledge of Datasets and typed
DataSet: WS recognizes them by checking the IXmlSerializabl e implementation:

public interface IXmlSerializabl e {
/// <include file='doc\IXmlS erializable.uex '
path='docs/doc[@for="IXmlSeria lizable.GetSche ma"]/*' />
XmlSchema GetSchema();
/// <include file='doc\IXmlS erializable.uex '
path='docs/doc[@for="IXmlSeria lizable.ReadXml "]/*' />
void ReadXml(XmlRead er reader);
/// <include file='doc\IXmlS erializable.uex '
path='docs/doc[@for="IXmlSeria lizable.WriteXm l"]/*' />
void WriteXml(XmlWri ter writer);
}

During wsdl generation WS calls the IXmlSerializabl e.GetSchema() method, if
it returns null WS assume that the type is a DataSet and uses predefined
schema for it:

<xs:element name="DSRespons e">
<xs:complexType >
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="DS5Result ">
<xs:complexType >
<xs:sequence>
<xs:element ref="xs:schema" />
<xs:any />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence> </xs:complexType>
</xs:element>

If the method returns a valid XmlSchema object, WS assume that the type is
a typed DataSet, and the schema object should be used for generating the
typed dataset on the client. The schema is added to the service
description document and referenced via <wsdl:import> statement where the
namespace=".." attribute is set to the XmlSchema.Targe tNamespace, and the
WS uses a different instance schema:

<xs:element name="ReturnTyp edDSResponse">
<xs:complexType >
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="ReturnTyp edDS1Result">
<xs:complexType >
<xs:sequence>
<xs:any namespace="http ://tempuri.org/TypedDataSet1" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

The client side recognizes the schema patterns:
1. if the complex type has only two elements, and the first one is a
reference to a schema element and the second one is <any/> --> then this
complex type is a DataSet
2. if the complex type has one element, and it is <any /> with a namespace
attribute, then this is a typed DataSet and the schema with targetNamespace
matching the namespace attribute value should be used to generate source
code for it.

Thanks,
Elena
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
354
by: Richard Myers | last post by:
Hello. I am getting an InvalidCastException which has revealed yet more of my ignorance. I cant believe i dont already know this and haven't encountered it before until now. I am consuming a dataset from a webservice. I wrote both the server and client apps and the both use the same middle teir. I fill a dataset on the server that has a relationship between two of the tables inside. The relationship is between two strongly typed tables...
1
1095
by: Roman S. Golubin | last post by:
Hi, all! Anyone help me please generate a DataSet from Xml above. When I try execute ds.InfernXmlSchema("test.xml", new string {"http://schemas.xmlsoap.org/wsdl/soap/"}) then I get message: table "binding" already exists. Can anyone help me? My test.xml file begin here:
22
25607
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to compile. <WebMethod()> _ Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet Test program : Dim cartSet As DataSet cartSet = ws.VerifySku(cartSet)
12
5317
by: Whoever | last post by:
Hi, I'm trying to return an XmlDocument or XmlNode converted from a typed dataset. public XmlNode whatever() { MyTypedDataSet ds = new MyTypedDataSet(); return new XmlDataDocument(ds); }
0
995
by: Steve B. | last post by:
Hello I'm building a Web service that have some methods. I've also two datasets class : DataSet1 and DataSet2. If I add a method in my WS that waits for or return either DataSet1 and DataSet2, the DataSet is embedded in the WSDL so the client application can use them as typed DataSet, which is working well with VS.
13
2368
by: Maxwell2006 | last post by:
Hi, We are having a debate over using DataSet as return value type for web services. The problem is that we don't know whether Java applications can use DataSet
0
1131
by: wc_chan | last post by:
I wrote a web service projects having 2 asmx and 1 dataset, says dsTest1. The amsx will have a parameter of the dataset as follows: in 1st asmx: <Wethod()HelloWorld1 (byval a1 as dsTest1) as string in 2nd asmx: <Wethod()HelloWorld2 (byval a2 as dsTest1) as string When I ran wsdl for the dynamic discovery file, vsdisco, I got the following
15
13517
by: Joseph Geretz | last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or Datatables between application tiers. http://support.microsoft.com/kb/306134 http://msdn2.microsoft.com/en-us/library/ms996381.aspx Formerly, with classic Microsoft DNA architecture, the ADO Recordset was a primary transport medium, recommended for transmitting data between application tiers. In fact, there are whole books written on the subject.
11
2900
by: casucci | last post by:
I do a return as XMLDataDocument in my webservice but it returns not with the namespaces etc in them. Anyone have and example where I can have the webservice return it as a XML. C# preferred. Flash just sees it as an object when it calls the web service. Thanks
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10538
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9115
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.