Wrox Programmer Forums
|
C# 4.0 aka C# 2010 General Discussion Discussions about the C# 4.0, C# 4, Visual C# 2010 language and tool not related to any specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 4.0 aka C# 2010 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2012, 04:24 PM
Registered User
 
Join Date: Mar 2011
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default Extra xmlns="" in web service call XML

Hi all,

In a web service call I’m making from a VS2010 console app, an extra xmlns=”” is showing up in a few nodes. For other nodes, it doesn’t appear.
The app is calling our customer’s web service to pass it data, so that they can update their database with it. We’re using their WSDL, which hasn’t changed.
In 3 of the 8 or 10 types of data being sent, an extra xmlns=”” is somehow showing up.
We don’t want it to be valued to anything, as I’ve seen various answers for on the web; we want it to not be there at all.

Here’s the request:

Code:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SYNC_V1_REQUEST xmlns="https://OurCustsWebserviceURL.com/types">
<ORDER xmlns="">
<ROW_ID>1234</ROW_ID>
… then the rest of the nodes for the ORDER , then the closing node for the order.
For other types of data, e.g., a CUSTOMER row, there’s no such extra xmlns=””.

Does anyone have any ideas how I get rid of it?

Thanks in advance...
 
Old May 1st, 2014, 04:08 PM
Friend of Wrox
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

you can either implement a message inspector to modify the outgoing message to remove it, or you can specify a namespace attribute in contract to fully qualify it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
XML to XML: transforming a "linear group" to a "hierarchical clustering" xmlfab XSLT 1 March 14th, 2012 10:25 AM
Random xmlns="" in output stolte XSLT 4 February 24th, 2011 02:19 PM
"xmlns" not allowing to work [email protected] XSLT 2 July 30th, 2010 08:56 AM
Difficulties with "web.config" and "ASPNETDB" CFRham BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 2 July 3rd, 2010 10:19 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.