473,811 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
(BaseBusinessOb ject). So MyBusinessObjec t inherits from BaseBusinessObj ects.
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..bu t anything..

Thanx in advance

Regards

Henrik
Nov 23 '05 #1
4 2760
Hi,

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

Hope this helps,

Marvin Smit.
'

On Mon, 10 Oct 2005 09:43:17 +0200, Henrik Gøttig <hg@websolver.d k>
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
(BaseBusinessO bject). So MyBusinessObjec t inherits from BaseBusinessObj ects.
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..bu t 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.MyPro duct.Data) and the proxies to
another (eg. MyCompany.MyPro duct.Web.Servic es).

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(Name space="")] 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.d k>
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.MyPro duct.Data) and the proxies to
another (eg. MyCompany.MyPro duct.Web.Servic es).

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(Name space="")] 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.d k>
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.MyPro duct.Data) and the proxies to
another (eg. MyCompany.MyPro duct.Web.Servic es).

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...s o 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(Name space="")] attribute on your
dataclasse s?

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
4330
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 WebMethodAttribute provides for the method itself. For something lik public int XCoOrdinate public int YCoOrdinate [WebMethodAttribute(Description="Do some work") public void DoWork(Point input
0
1985
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/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.xignite.com/services/"
5
7095
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 company, if not for the want of reuse the gui app would have just simply accessed the DB Directly and each plugin in would have been fully self contained. Each time I create a new gui plugin I find myself modifying the web service to add new support...
2
22544
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 binding 'EndTransactionSoapBinding' from namespace 'http s://webservices.sabre.com/websvc'.
0
2061
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 Web Services" I took the WS-Eventing WSDL file and added <binding>'s and <service>'s... Then i took the apache axis wsdl2java tool and i got nice
4
5585
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 elementFormDefault="qualified" targetNamespace="http://www.test.com/"> <s:import namespace="http://www.test.com/" /> <s:element name="Process"> <s:complexType>
0
1156
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 return types) are added to WSDL)? The background is that I would like to (ab-) use .NET remoting for offering "webservices", which are consumed by java applications (AXIS is used for generating client-proxy-classes) via SOAP. It works in general,...
0
1343
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 sucessfully able to share the Business Types. So far so good.. My Class structure is somewhat like
13
3439
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 error from the WSDL utility. Error: Unable to import binding 'REMSOAPHttpsBinding' from namespace 'http://www.fnfis.com/services/Services-Common/REM/20040109/v1.0'. - The operation 'REMCorporationBPOOrder' on portType 'REMInterface' from...
0
9734
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
10652
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...
0
10395
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9211
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...
1
7673
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6895
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
5561
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
4346
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
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.