473,320 Members | 1,694 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,320 software developers and data experts.

WSDL.exe doesn't generate array of complex objects from WSDL & XSD

I have a schema that defines my messages and objects. I then have a WSDL
that defines the web services. I have my sample XSD, sample WSDL, and the
code generated from WSDL.exe. In the generated code from WSDL.exe, the
"applicationList" object is not a array or "application", which is what it
should be, correct?

Thanks for the help.

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://me.com/xml/xsd/AppSec1.xsd"
elementFormDefault="qualified"
xmlns="http://me.com/xml/xsd/AppSec1.xsd"
xmlns:mstns="http://me.com/xml/xsd/AppSec1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1">
<xs:complexType name="application">
<xs:sequence>
<xs:element name="appid" type="xs:int" />
<xs:element name="description" type="xs:string" />
<xs:element name="guid" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="applicationList">
<xs:sequence>
<xs:element name="applications" type="application" />
</xs:sequence>
</xs:complexType>
<xs:element name="getApplicationListRequest">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="getApplicationListResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="apps" type="applicationList" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Here is the WSDL.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name="AppSec"
targetNamespace="http://www.your-company.com/AppSec.wsdl"
xmlns:as="http://www.vita.virginia.gov/xml/xsd/AppSec1.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.your-company.com/AppSec.wsdl"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:import
location="C:\VS.Net\AppSecTestAWSCF\AppSec.xsd"
namespace="http://me.com/xml/xsd/AppSec1.xsd"/>
<wsdl:message name="getApplicationListRequest">
<wsdl:part element="as:getApplicationListRequest" name="parameters"/>
</wsdl:message>
<wsdl:message name="getApplicationListResponse">
<wsdl:part element="as:getApplicationListResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="AppSecPortType">
<wsdl:operation name="getApplicationList">
<wsdl:input message="tns:getApplicationListRequest"/>
<wsdl:output message="tns:getApplicationListResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AppSecBinding" type="tns:AppSecPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getApplicationList">
<soap:operation

soapAction="capeconnect:AppSec:AppSecPortType#getA pplicationList"
style="document"/>
<wsdl:input>
<soap:body parts="parameters" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body parts="parameters" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AppSec">
<wsdl:port binding="tns:AppSecBinding" name="AppSecPort">
<soap:address location="http://localhost/ccx/AppSec"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

And here is the generated server code from WSDL.EXE.

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://www.vita.virginia.gov/xml/xsd/AppSec1.xsd")> _
Public Class application

Public appid As Integer
Public description As String
Public guid As String

End Class

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://www.vita.virginia.gov/xml/xsd/AppSec1.xsd")> _
Public Class applicationList

Public applications As application
End Class

--
Mike Logan
Nov 23 '05 #1
1 5019
Found the problem.

You must specify the complexType array with the following two properties.

maxOccurs="unbounded" minOccurs="0"

Therefore the modified section in the XSD would be.

<xs:complexType name="applicationList">
<xs:sequence>
<xs:element name="applications" type="application"
maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

--
Mike Logan
"Mike Logan" wrote:
I have a schema that defines my messages and objects. I then have a WSDL
that defines the web services. I have my sample XSD, sample WSDL, and the
code generated from WSDL.exe. In the generated code from WSDL.exe, the
"applicationList" object is not a array or "application", which is what it
should be, correct?

Thanks for the help.

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://me.com/xml/xsd/AppSec1.xsd"
elementFormDefault="qualified"
xmlns="http://me.com/xml/xsd/AppSec1.xsd"
xmlns:mstns="http://me.com/xml/xsd/AppSec1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1">
<xs:complexType name="application">
<xs:sequence>
<xs:element name="appid" type="xs:int" />
<xs:element name="description" type="xs:string" />
<xs:element name="guid" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="applicationList">
<xs:sequence>
<xs:element name="applications" type="application" />
</xs:sequence>
</xs:complexType>
<xs:element name="getApplicationListRequest">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="getApplicationListResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="apps" type="applicationList" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Here is the WSDL.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name="AppSec"
targetNamespace="http://www.your-company.com/AppSec.wsdl"
xmlns:as="http://www.vita.virginia.gov/xml/xsd/AppSec1.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.your-company.com/AppSec.wsdl"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:import
location="C:\VS.Net\AppSecTestAWSCF\AppSec.xsd"
namespace="http://me.com/xml/xsd/AppSec1.xsd"/>
<wsdl:message name="getApplicationListRequest">
<wsdl:part element="as:getApplicationListRequest" name="parameters"/>
</wsdl:message>
<wsdl:message name="getApplicationListResponse">
<wsdl:part element="as:getApplicationListResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="AppSecPortType">
<wsdl:operation name="getApplicationList">
<wsdl:input message="tns:getApplicationListRequest"/>
<wsdl:output message="tns:getApplicationListResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AppSecBinding" type="tns:AppSecPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getApplicationList">
<soap:operation

soapAction="capeconnect:AppSec:AppSecPortType#getA pplicationList"
style="document"/>
<wsdl:input>
<soap:body parts="parameters" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body parts="parameters" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AppSec">
<wsdl:port binding="tns:AppSecBinding" name="AppSecPort">
<soap:address location="http://localhost/ccx/AppSec"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

And here is the generated server code from WSDL.EXE.

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://www.vita.virginia.gov/xml/xsd/AppSec1.xsd")> _
Public Class application

Public appid As Integer
Public description As String
Public guid As String

End Class

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://www.vita.virginia.gov/xml/xsd/AppSec1.xsd")> _
Public Class applicationList

Public applications As application
End Class

--
Mike Logan

Nov 23 '05 #2

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

Similar topics

24
by: Generic Usenet Account | last post by:
Does anyone have an opinion on how IDL and WSDL compare to each other? Are they equally powerful in their "expressive power"? Sometimes it appears to me that IDL is a little easier for humans to...
1
by: Emanuele Parati | last post by:
I created a Web Service from a WSDL that come from Java (apache soap). It contains the definition of Vector as complex type: <schema targetNamespace="http://xml.apache.org/xml-soap"...
4
by: MattBell | last post by:
I've tried to search for an answer to this without much success, and I think it's probably a common thing to do: I have a web service I want to accept an XmlDocument as an argument which conforms...
0
by: saish | last post by:
Hello I am new to vb.net webservice. My requirement is to design a VB.net web service which will send and receive xml documents. The xml document send and received would be a very complex .xsd...
2
by: Danny Gagne | last post by:
I'm currently working an .net application (I can use 1.1 or 2.0 if needed) that needs to read a wsdl file and generate another piece of code that can use it. I'm encountering a problem where I...
5
by: Mike Logan | last post by:
I used WSDL.exe to generate a client side web proxy for a web service, called the web service, got the results but an array returned by the web service is not in the results. However if I use...
3
by: Arpan | last post by:
Web Services make use of proxy classes whose methods & properties are accessed in exactly the same way as how a normal class' methods & properties are accessed. So what for does ASP.NET generate...
7
by: tobiah | last post by:
I'm having trouble finding information about writing a SOAP server. I get the client part. There is much information about writing a client, but not so much about writing the server. Are there...
4
by: newtonwong | last post by:
I have a web reference WSDL, but it doesn't really create an XSD. I'm trying to generate datasets from the WSDL file but not sure how to do so. I successfully created the proxy class, but the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.