Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 26th, 2009, 07:57 PM
Registered User
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Avoid some tags in .Net web services call

Hello everybody,

First of all, sorry for my english, and now let me explain you the scenario I have.

I have to consume some web services another company made. In cases where one of the parameters is null, .Net automatically builds the tag like this: <longitud/>

The problem I have, is that the other company doesn´t understand that tag, their sytem thinks that it has a value and returns an error.

The question now is, if there is a way to prevent .Net from incluiding that tag in those cases.

I would need .Net building instead of this xml:

<?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>
<ExampleMethod xmlns="http://example.com/moncholv/">
<exampleParameter1>USUTCA</exampleParameter1>
<exampleParameter2 />
</ExampleMethod>
</soap:Body>
</soap:Envelope>


To build this one:

<?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>
<ExampleMethod xmlns="http://example.com/moncholv/">
<exampleParameter1>USUTCA</exampleParameter1>
</ExampleMethod>
</soap:Body>
</soap:Envelope>


Thanks in advance

Last edited by moncholv; October 26th, 2009 at 08:30 PM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C#, COM. .NET and Web services RedEye General .NET 3 March 10th, 2008 09:42 AM
Proxy script to call web services with Ajax 2mk Ajax 0 March 4th, 2008 04:58 AM
Call PHP Web Services 2mk Ajax 1 February 10th, 2008 10:50 AM
ASP.NET Web Services aliirfan84 General .NET 1 February 5th, 2007 03:31 PM
flash/.net web services softplay .NET Web Services 2 June 14th, 2004 04:22 AM



All times are GMT -4. The time now is 07:40 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.