Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Wed, 23 Jul 2008 04:33:00 -0700,    group: microsoft.public.dotnet.framework.webservices        back       


What is the way one should send XML to a webservice   
Hello,

I need to send XML data to a web service.
Is there an XSD type I need to define? should I use some kind of encoding 
before?

My problem is that the sent XML is being received encoded as follows:
<?xml version="1.0" encoding="utf-8"?> .......

now I cant do HTML decoding in the web service as the XML itself contains 
HTML tags inside which are also being encoded (i.e. <).

Please help,
Thanks in advance,
Yaniv.
date: Wed, 23 Jul 2008 04:33:00 -0700   author:   Yaniv

Re: What is the way one should send XML to a webservice   
"Yaniv"  wrote in message 
news:F3C76CE0-CD04-4167-A27E-BCA29932EC31@microsoft.com...
> Hello,
>
> I need to send XML data to a web service.
> Is there an XSD type I need to define? should I use some kind of encoding
> before?

The XSD should have come from the Web service provider as to what the Web 
service expects in the XML that you are sending to the provider.

>
> My problem is that the sent XML is being received encoded as follows:
> <?xml version="1.0" encoding="utf-8"?> .......
>

You should be in contact with the Web service provider about this.

> now I cant do HTML decoding in the web service as the XML itself contains
> HTML tags inside which are also being encoded (i.e. <).
>
see above
date: Wed, 23 Jul 2008 11:11:35 -0400   author:   Mr. Arnold MR.

Re: What is the way one should send XML to a webservice   
Hello Mr. Arnold,

Thank you for the reply but I guess I wasn't clear enough.
I own the web service and right now the type is String as I'm sending XML as 
String.

However when I'm sending the XML to the web service I get the XML in the web 
service encoded (i.e. <) and not "<".

My question is how can I send it so in the web service I will get XML 
properly (i.e. "<").

one more thing, the XML may contain HTML tags inside for example:
<XML>
 <Items>
  <Item>
   <Title>
     <!-- This is the html -->
    <div>HTML VALUE</div>
   </Title>
  </Item>
 </Items>
</XML>


Thanks a lot,
Yaniv.
date: Thu, 24 Jul 2008 01:09:00 -0700   author:   Yaniv

Re: What is the way one should send XML to a webservice   
I'm sorry I just noticed it's not displaying the encoded chars as I wanted.
What I meant in the i.e. was &-l-t-;  without the dashes.
date: Thu, 24 Jul 2008 01:20:03 -0700   author:   Yaniv

Re: What is the way one should send XML to a webservice   
How to do this depends on whether you're developing the contract first, or 
the code first. If you do contract-first, then define the element as type 
xsd:any. In the code, define the corresponding field or property to be of 
type XmlElement.

-- 
John Saunders | MVP - Connected System Developer
date: Thu, 24 Jul 2008 21:27:40 -0400   author:   John Saunders

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us