472,978 Members | 2,118 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,978 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 3294
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.