Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.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 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 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..





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





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