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

WSDL generation of types

Hi all

Feeling a bit frustrated here. Maybe I did not find the correct info
yet, that's why I am asking you.

I have "developed" a .NET 2.0 WebService and generated (using wsdl.exe)
the WSDL for it.
The types I am returning from webmethod calls has a superclass
(BaseBusinessObject). So MyBusinessObject inherits from BaseBusinessObjects.
That gives me two schemas in the <types> section of my wsdl. One for the
superclass and one for the "real" business object.

Can I setup wsdl.exe somehow to generate the types in my wsdl to a
specific namespace, that is *not* the same as the namespacing I am
generating the WebService proxies to.
That way I can encourage type sharing between webmethods where it is
appropriate.
I have read somewhere that there is a way to "hook" in the schemaimport
process, but that is really a last resort....
Anyone has an idea, may be alternative..but anything..

Thanx in advance

Regards

Henrik
Nov 23 '05 #1
4 2743
Hi,

Are you looking for the [XmlElement(Namespace="")] attribute on your
dataclasses?

Hope this helps,

Marvin Smit.
'

On Mon, 10 Oct 2005 09:43:17 +0200, Henrik Gøttig <hg@websolver.dk>
wrote:
Hi all

Feeling a bit frustrated here. Maybe I did not find the correct info
yet, that's why I am asking you.

I have "developed" a .NET 2.0 WebService and generated (using wsdl.exe)
the WSDL for it.
The types I am returning from webmethod calls has a superclass
(BaseBusinessObject). So MyBusinessObject inherits from BaseBusinessObjects.
That gives me two schemas in the <types> section of my wsdl. One for the
superclass and one for the "real" business object.

Can I setup wsdl.exe somehow to generate the types in my wsdl to a
specific namespace, that is *not* the same as the namespacing I am
generating the WebService proxies to.
That way I can encourage type sharing between webmethods where it is
appropriate.
I have read somewhere that there is a way to "hook" in the schemaimport
process, but that is really a last resort....
Anyone has an idea, may be alternative..but anything..

Thanx in advance

Regards

Henrik

Nov 23 '05 #2
Hi Marvin

Thanx for taking yuor time to answer.

I have already done what you suggests, but it only applies to the XML
namespace.

What I want, is to get wsdl.exe to generate the dataclasses to a
specific CLR namespace (eg. MyCompany.MyProduct.Data) and the proxies to
another (eg. MyCompany.MyProduct.Web.Services).

One way I could think of is to use extern XML schemas for the
dataclasses and then include them in the types element of my WSDL.
Then run this as a two step process:
1) Generate classes using xsd.exe in the correct CLR namespace.
2) Generate proxies using wsdl.exe in the correct CLR namespace.

But option step 2 still generates the dataclasses of the included
schemas...so I will end up having the dataclasses doubled up anyway.
Just in two different CLR namespaces, but still in the same XML namespace.

Regards

Henrik

Marvin Smit wrote:
Hi,

Are you looking for the [XmlElement(Namespace="")] attribute on your
dataclasses?

Hope this helps,

Marvin Smit.

Nov 23 '05 #3
Hi,

ehh.. yeah. Thats a general problem with the WSDL tool. I think the
option you provide at the bottom of this post is the way to go. The
only issue being; You're modifying stuff from generated files (WSDL
will recreate this problem each time you generate).

I know its not the answer you hoped for, but my advise in class is
always to say: "The toolkit is a means to a goal, not the goal itself.
If it doesn't do what you want, drop the toolkit!"

Eassier said than done looking at the alternatives :S

Marvin Smit.

ps; Last thing i thought of, in combination with your solution below;
Did you try the "/namespace" option for WSDL.EXE?
On Wed, 12 Oct 2005 16:00:35 +0200, Henrik Gøttig <hg@websolver.dk>
wrote:
Hi Marvin

Thanx for taking yuor time to answer.

I have already done what you suggests, but it only applies to the XML
namespace.

What I want, is to get wsdl.exe to generate the dataclasses to a
specific CLR namespace (eg. MyCompany.MyProduct.Data) and the proxies to
another (eg. MyCompany.MyProduct.Web.Services).

One way I could think of is to use extern XML schemas for the
dataclasses and then include them in the types element of my WSDL.
Then run this as a two step process:
1) Generate classes using xsd.exe in the correct CLR namespace.
2) Generate proxies using wsdl.exe in the correct CLR namespace.

But option step 2 still generates the dataclasses of the included
schemas...so I will end up having the dataclasses doubled up anyway.
Just in two different CLR namespaces, but still in the same XML namespace.

Regards

Henrik

Marvin Smit wrote:
Hi,

Are you looking for the [XmlElement(Namespace="")] attribute on your
dataclasses?

Hope this helps,

Marvin Smit.

Nov 23 '05 #4
Hi Marvin

Yup, I already use the /namespace switch of the wsdl.exe tool.
And it generates to the correct CLR namespace - both data and proxi
classes. It would be nice though if one could split those

Regards

Henrik

Marvin Smit wrote:
Hi,

ehh.. yeah. Thats a general problem with the WSDL tool. I think the
option you provide at the bottom of this post is the way to go. The
only issue being; You're modifying stuff from generated files (WSDL
will recreate this problem each time you generate).

I know its not the answer you hoped for, but my advise in class is
always to say: "The toolkit is a means to a goal, not the goal itself.
If it doesn't do what you want, drop the toolkit!"

Eassier said than done looking at the alternatives :S

Marvin Smit.

ps; Last thing i thought of, in combination with your solution below;
Did you try the "/namespace" option for WSDL.EXE?
On Wed, 12 Oct 2005 16:00:35 +0200, Henrik Gøttig <hg@websolver.dk>
wrote:

Hi Marvin

Thanx for taking yuor time to answer.

I have already done what you suggests, but it only applies to the XML
namespace.

What I want, is to get wsdl.exe to generate the dataclasses to a
specific CLR namespace (eg. MyCompany.MyProduct.Data) and the proxies to
another (eg. MyCompany.MyProduct.Web.Services).

One way I could think of is to use extern XML schemas for the
dataclasses and then include them in the types element of my WSDL.
Then run this as a two step process:
1) Generate classes using xsd.exe in the correct CLR namespace.
2) Generate proxies using wsdl.exe in the correct CLR namespace.

But option step 2 still generates the dataclasses of the included
schemas...so I will end up having the dataclasses doubled up anyway.
Just in two different CLR namespaces, but still in the same XML namespace.

Regards

Henrik

Marvin Smit wrote:
Hi,

Are you looking for the [XmlElement(Namespace="")] attribute on your
dataclasses?

Hope this helps,

Marvin Smit.

Nov 23 '05 #5

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

Similar topics

1
by: PMCG | last post by:
Hi Is it possible to decorate web service parameters with attributes that can add documentation elements to the complex type for a web method in WSDL, something similar to what the...
0
by: Suresh Pasala | last post by:
Hello All, Iam using the ServiceDescription class and writing a wsdl file. Currently the way wsdl is generated is as follows. <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"...
5
by: Wayne | last post by:
I have a way for doing plugin's in my gui app. These plugins have to talk to a webservice to do database calls. I've done the DB access as a web service so it can be shared with the rest of the...
2
by: Carmit | last post by:
Hi, I'm trying to build a proxy for this webservice: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/EndTransactionLLSRQ.wsdl I'm getting the following error: Error: Unable to import...
0
by: Stefan Lischke | last post by:
Hi, I'm really desperate using code generation(wsdl.exe) from wsdl files for latest WS-Eventing(including WS-Addressing) Specs. I'm writing my diploma about "publish subscribe systems based on...
4
by: Mike | last post by:
I have a web service being consume by a new client. The WebMethod they are calling is called Process. So in the WSDL I have has 2 elements, Process and ProcessResponse. <s:schema...
0
by: Albert Greinöcker | last post by:
Hi there, I have a very general question about .NET remoting using SOAP: is there any way to influence WSDL generation (like setting a different target-namespace, or which classes (e.g. custom...
0
by: Ashish | last post by:
Iam working on a project that would use web services to transfer business objects around. I worked a little bit with the new SchemaImporterExtension class to tweak the proxy generation, and Iam...
13
by: ScottM | last post by:
I have run into a problem generating the class file via the WSDL utility. I have a WSDL file that was generated by XMLSpy and is able to be read by the Java code utility, but I get the following...
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: 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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
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.