473,396 Members | 2,061 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,396 software developers and data experts.

how to prevent "xmlns=''" from being serialized in the ASP.net WebService plumbing work.

when I use the XmlWebSerivce to response the xmlelement to Web Service client.
the ASP.net plumbing work ( the XmlSerializer in WebServices ) will serialize the XML

if we can control the wrapper class , I can set the XmlSchemaForm.None or Qualified so that there will no be a 'xmlns=""' in the following namespace, but I don't know how to do that in WebService plumbing.

this null namespace will makes my web service wrapper class complains.
we need to fix it.

xmlns="http://www.cedar.com.tw/bluestar/">
- <BlueStar MsgName="Bank1980" Status="9502" xmlns="">
<StatusCode>9502</StatusCode>
<Severity>Error</Severity>
<StatusDesc>SubmitXML - GetXMLTagName Failed!</StatusDesc>
</BlueStar>

Anyone can provide some help on this?
thanks in adv.

Jim

///<soapBox>it seems there are too many plumbing work in XML WebServices that is not configurable for developers, especially for us that pass XML, instead of .net Class. , SoapExtension seems to be the only solution....</soapBox>

Nov 21 '05 #1
3 3311
Hello Jim!

The WS I'm working on right now is also returning XmlElement, but my WS-client is reading response
soap-xml directly without any proxy. In your case, what happens if your client treats the response
as an XmlElement, converts it to a string/stream, replaces xmlns="" with whatever You want it to be
and then creates a new XmlElement? I know it's just a workaround, but anyway.

I'm not exactly an expert but the impression I've got is that when you use soap extensions you are
working outside the .NET-WS infrastructure. For example what happens with Your automatic
asmx?WSDL-file and what about web service enhancements and the security infrastructure it's
promising?

/Regards Björn

Nov 21 '05 #2
there might be various ways the client of the WS is,
in fact, msxml parser and string might not experience significant issues,
but in System.net and XmlSerializer, default namespace and xmlns='' makes a
lot differnece.
my solution is now is with the XmlNoNamespaceWriter.
but that's a workaround.

thanks

-Jim

"BjörnHolmberg" <bj*****************************@sulitelma.com> wrote in
message news:40***************@sulitelma.com...
Hello Jim!

The WS I'm working on right now is also returning XmlElement, but my WS-client is reading response soap-xml directly without any proxy. In your case, what happens if your client treats the response as an XmlElement, converts it to a string/stream, replaces xmlns="" with whatever You want it to be and then creates a new XmlElement? I know it's just a workaround, but anyway.
I'm not exactly an expert but the impression I've got is that when you use soap extensions you are working outside the .NET-WS infrastructure. For example what happens with Your automatic asmx?WSDL-file and what about web service enhancements and the security infrastructure it's promising?

/Regards Björn

Nov 21 '05 #3
Hello Jim! I made a google-search on XmlNoNamespaceWriter and found it on Kirk Allens blog. Seems to
be a good idea. But how can You plug in XmlNoNamespaceWriter into WS-plumbing?

By the way, here is a third workaround (fourth if we count soap extensions):

Instead of sending xml, it's possible to play by Microsoft rules and send objects instead of xml.
What You have to do then to get at xml is to use XmlSerializer on the object. This will decrease
performance since we will have first have deserialization (in plumbing) and then ask for
serialization again. But both seems to be fast in dotnet. I guess this will be ok for folks like me
that want to create xhtml from xml and xslt. But I don't know how it works for people that create
complicated web services by first designing their own xml-schemas...

Regards
Björn

Jim Hsu wrote:
there might be various ways the client of the WS is,
in fact, msxml parser and string might not experience significant issues,
but in System.net and XmlSerializer, default namespace and xmlns='' makes a
lot differnece.
my solution is now is with the XmlNoNamespaceWriter.
but that's a workaround.

thanks

-Jim

"BjörnHolmberg" <bj*****************************@sulitelma.com> wrote in
message news:40***************@sulitelma.com...
Hello Jim!

The WS I'm working on right now is also returning XmlElement, but my

WS-client is reading response
soap-xml directly without any proxy. In your case, what happens if your

client treats the response
as an XmlElement, converts it to a string/stream, replaces xmlns="" with

whatever You want it to be
and then creates a new XmlElement? I know it's just a workaround, but

anyway.

I'm not exactly an expert but the impression I've got is that when you use

soap extensions you are
working outside the .NET-WS infrastructure. For example what happens with

Your automatic
asmx?WSDL-file and what about web service enhancements and the security

infrastructure it's
promising?

/Regards Björn


Nov 21 '05 #4

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

Similar topics

3
by: Mike Dickens | last post by:
hi, i'm sure this has come up before but havn't managed to find an answer. if i have the following xslt <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet method="xml" version="1.0"...
4
by: cyclops | last post by:
I'm trying to do XML + XSLT -> Another XML. The source XML contains multiple namespaces and XSLT will handle all possible tags under each name space. ----source---- <document xmlns="..."...
3
by: Keith Hill | last post by:
I am creating an XmlDocument in code and then using XmlTextWriter via doc.WriteTo(xwriter) to output the result to a text box. I have a root element that defines a default namespace. However, the...
5
by: NeilL | last post by:
In the XML document I'm trying to create I do the following elem = _doc.CreateElement("Author"); elem.InnerText = "something"; parentElem.AppendChild(elem); Thiw works properly however the...
3
by: ano | last post by:
Hi, Anyone knows how to get "xmlns" value from XML file? For example, how to check that this xml file has a xmlns or not? Or how to read the xmlns value? <bookstore...
0
by: R. Ian Lee | last post by:
I've built an XSLT file that transforms data to SpreadsheetML format. The XSLT uses a <xsl:call-template/to build each worksheet. For some reason, when I transform the file, it is inserting...
0
by: SolaFide | last post by:
I have an XML doc that looks something like this: <?xml version="1.0" encoding="utf-8"?> <elem1> <elem2 xmlns="http://someurl.com"> <elem3> <item>some stuff here</item> ...
3
by: Lee | last post by:
Hello guys, I am new to XML and working on a XSLT to transforn yahoo shopping search result to html. my problem is the return XML contain xmlns in root element, here is the sample xml: <?xml...
4
by: BorisBoshond | last post by:
Hi all, Hope someone is able and willing to help me with following problem. I received a xsd file from another company, our company i supposed to return xml based on that xsd. Problem is that I...
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...
0
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...

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.