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

How to add style="document" attribute in .Net 2.0 wsdl

When .Net 1.0 webservice (VS2003) generates a wsdl -

<wsdl:binding name="TestSoap" type="tns:TestSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/(note: style attribute present)
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld"
style="document" />

But when .Net 2.0 webservice (VS2005) generates a wsdl -

<wsdl:binding name="TestSoap" type="tns:TestSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" /(note:
style attribute missing)
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld"
style="document" />

so the new VS2005 webservice wsdl omits the style="document" attribute. The
style is however "document" by default.

The problem that this causes is - Java specifically requires the
style="document" when it consumes a .Net Webservice.

And we do not want our Java users to make any change on their side. All our
webservices are currently in VS2003 and want to convert to VS2005, but want
this change to be transparant to Java users.

I found that in .Net2.0 using SoapExtensionReflector you can intercept the
wsdl, the wsdl/servicedescription is accessible via a object model - a
ServiceDescription class and through one of it's collection which is the
BindingCollection (of the SoapExtension collection) you can set the style to
either "document" or "RPC"

When I set it to RPC it does add the style="RPC" attribute. But when I set
style to document it still omits the style="document"
NOTE: style is a enumerated type. here is my code below.

ServiceDescription myDescription =
ReflectionContext.ServiceDescription;

BindingCollection myBindingCollection = myDescription.Bindings;
SoapBinding sb =
(SoapBinding)myBindingCollection[0].Extensions[0];
sb.Style = SoapBindingStyle.Document; //does not add
style="document" attribute

sb.Style = SoapBindingStyle.Rpc; //does add style="rpc" attribute

Any clues ?? No, we don't want to manually create the wsdl. We want a
solution that will not break Java code. Other than the missing style
attribute the rest of the wsdl looks similar to the one created by VS2003.
May 5 '07 #1
0 2621

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

Similar topics

8
by: Hostile17 | last post by:
Consider the following HTML. ---------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <meta...
52
by: Markus Elfring | last post by:
How much are you interested that the attribute "style" will offer the same or similar capabilities like they are provided by the element "style" in the element "head"? Do you want that the...
15
by: Gérard Talbot | last post by:
Hello all, I'd like to know and understand the difference between, say, <img src="/ImageFilename.png" width="123" height="456" alt=""> and <img src="/ImageFilename.png" style="width:...
5
by: johnsuth | last post by:
I want to produce a trivial demonstration of dynamic modification. I thought that pressing a button might change its color. I studied O'Reillys books and successfully created the button with a...
2
by: Mike Fiedler | last post by:
On a client web services request, I have a SoapExtension that is adding a header to the message in the BeforeSerialize stage. If the Web Service request is for an operation with...
0
by: Symon | last post by:
I've just upgraded our web services from ASP.NET 1.1 to 2.0 and am having trouble consuming the WSDL from Delphi 7 since the upgrade. We've traced the problem to the fact that ASP.NET 2.0 does...
5
by: Tobin Fricke | last post by:
In posting to a blog, I would like to bold every list item (<li>). Because I cannot influence the <head>...</head> section of the HTML document, I can neither add a <style>...</style> block, nor...
2
by: Bryan | last post by:
Hello all, Can anyone explain when one should use the "document" object and when one should use the "this" object? Also, is the "self" object the same as the "document" or "this" object?
4
by: dr1ft3r | last post by:
Hey guys, I'm building a site for a landscaping business down the street and can't seem to get part of the code functioning correctly. The code fails on line 68 where I make a reference to an...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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...
0
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,...
0
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...

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.