p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > .NET > Other .NET > .NET Web Services
I forgot my password Register Now
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 26th, 2009, 08:57 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
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 09:30 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C#, COM. .NET and Web services RedEye General .NET 3 March 10th, 2008 10: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 05:22 AM



All times are GMT -4. The time now is 03:02 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc