What's the best way to pass xml data to a web service: as XmlDocument,
or as a string, or....? (the xml data is structured by XSD)
Thanks,
kind regards,
--
Ludwig http://www.coders-lab.be 15 8196
Ludwig,
Does the XML data conform to a schema? If so, you should be able to
create a managed type which represents the schema and then expose that.
If you are looking to send any arbitrary XML data, then expose the
XmlDocument, and it will be exposed in the WSDL as allowing any element.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Ludwig" <ludwig.stuyck( remove)@telenet .bewrote in message
news:bh******** *************** *********@4ax.c om...
What's the best way to pass xml data to a web service: as XmlDocument,
or as a string, or....? (the xml data is structured by XSD)
Thanks,
kind regards,
--
Ludwig http://www.coders-lab.be
On Fri, 11 May 2007 10:02:45 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard .caspershouse.c omwrote:
>Ludwig,
Does the XML data conform to a schema? If so, you should be able to create a managed type which represents the schema and then expose that.
If you are looking to send any arbitrary XML data, then expose the XmlDocument, and it will be exposed in the WSDL as allowing any element.
Hi,
yes it conforms to an XSD. What do you mean with 'create a managed
type' ? (communication goes from a company to another company)
Thanks,
Ludwig
--
Ludwig http://www.coders-lab.be
Ludwig,
I am curious, if another company is exposing the web service, do they
have a WSDL document that you can use? If so the VS.NET (or wsdl.exe if you
want to work from the command line) should develop the appropriate types
that you can use (instead of an arbitrary XmlDocument).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Ludwig" <ludwig.stuyck( remove)@telenet .bewrote in message
news:86******** *************** *********@4ax.c om...
On Fri, 11 May 2007 10:02:45 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard .caspershouse.c omwrote:
>>Ludwig,
Does the XML data conform to a schema? If so, you should be able to create a managed type which represents the schema and then expose that.
If you are looking to send any arbitrary XML data, then expose the XmlDocument , and it will be exposed in the WSDL as allowing any element.
Hi,
yes it conforms to an XSD. What do you mean with 'create a managed
type' ? (communication goes from a company to another company)
Thanks,
Ludwig
--
Ludwig http://www.coders-lab.be
Ludwig,
ASP.NET webservices can serialize / deserialize and accept an XmlDocument
instance as an input parameter to a WebMethod. Internally this materializes
as an XmlNodeList I believe.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Ludwig" wrote:
On Fri, 11 May 2007 10:02:45 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard .caspershouse.c omwrote:
Ludwig,
Does the XML data conform to a schema? If so, you should be able to
create a managed type which represents the schema and then expose that.
If you are looking to send any arbitrary XML data, then expose the
XmlDocument, and it will be exposed in the WSDL as allowing any element.
Hi,
yes it conforms to an XSD. What do you mean with 'create a managed
type' ? (communication goes from a company to another company)
Thanks,
Ludwig
--
Ludwig http://www.coders-lab.be
On Fri, 11 May 2007 10:18:35 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard .caspershouse.c omwrote:
>Ludwig,
I am curious, if another company is exposing the web service, do they have a WSDL document that you can use? If so the VS.NET (or wsdl.exe if you want to work from the command line) should develop the appropriate types that you can use (instead of an arbitrary XmlDocument).
Well, they sent us the XSD, that's it...
--
Ludwig http://www.coders-lab.be
On Fri, 11 May 2007 07:25:01 -0700, Peter Bromberg [C# MVP]
<pb*******@yaho o.yabbadabbadoo .comwrote:
>Ludwig, ASP.NET webservices can serialize / deserialize and accept an XmlDocument instance as an input parameter to a WebMethod. Internally this materializes as an XmlNodeList I believe. Peter
Yes, I've read that.... but I didn't know if this is the best way to
do it.......
--
Ludwig http://www.coders-lab.be
Are you sure it isn't a WSDL document? Does the top look like this:
<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitio ns xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:mime="htt p://schemas.xmlsoap .org/wsdl/mime/"
xmlns:tns="http ://tempuri.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="h ttp://schemas.xmlsoap .org/wsdl/soap12/"
xmlns:http="htt p://schemas.xmlsoap .org/wsdl/http/"
targetNamespace ="http://tempuri.org/"
xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/">
<wsdl:types>
And so on...
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Ludwig" <ludwig.stuyck( remove)@telenet .bewrote in message
news:1u******** *************** *********@4ax.c om...
On Fri, 11 May 2007 10:18:35 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard .caspershouse.c omwrote:
>>Ludwig,
I am curious, if another company is exposing the web service, do they have a WSDL document that you can use? If so the VS.NET (or wsdl.exe if you want to work from the command line) should develop the appropriate types that you can use (instead of an arbitrary XmlDocument).
Well, they sent us the XSD, that's it...
--
Ludwig http://www.coders-lab.be
On Fri, 11 May 2007 10:46:40 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard .caspershouse.c omwrote:
Are you sure it isn't a WSDL document? Does the top look like this:
<?xml version="1.0" encoding="utf-8" ?> <wsdl:definiti ons xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:mime="htt p://schemas.xmlsoap .org/wsdl/mime/"
xmlns:tns="http ://tempuri.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="h ttp://schemas.xmlsoap .org/wsdl/soap12/"
xmlns:http="htt p://schemas.xmlsoap .org/wsdl/http/"
targetNamespace ="http://tempuri.org/" xmlns:wsdl="ht tp://schemas.xmlsoap .org/wsdl/"> <wsdl:types>
And so on...
No, only XSD, but I can ask the WSDL I guess!
--
Ludwig http://www.coders-lab.be
That's definitely the better option. If it is a web service and it
offers a WSDL file, then you can auto generate the proxies and be done with
it.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Ludwig" <ludwig.stuyck( remove)@telenet .bewrote in message
news:52******** *************** *********@4ax.c om...
On Fri, 11 May 2007 10:46:40 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard .caspershouse.c omwrote:
> Are you sure it isn't a WSDL document? Does the top look like this:
<?xml version="1.0" encoding="utf-8" ?> <wsdl:definit ions xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/" xmlns:mime="htt p://schemas.xmlsoap .org/wsdl/mime/" xmlns:tns="http ://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="h ttp://schemas.xmlsoap .org/wsdl/soap12/" xmlns:http="htt p://schemas.xmlsoap .org/wsdl/http/" targetNamespace ="http://tempuri.org/" xmlns:wsdl="h ttp://schemas.xmlsoap .org/wsdl/"> <wsdl:types >
And so on...
No, only XSD, but I can ask the WSDL I guess!
--
Ludwig http://www.coders-lab.be This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: gagans |
last post by:
Hi
My web service has a method which accepts byte array as parameter.
<WebMethod()> _
Public Function SendLoan(ByVal data As Byte()) As String
Dim filePath As String
filePath = System.AppDomain.CurrentDomain.BaseDirectory() &
"\WorkingFiles\"
objImportExport = New BrainImportExport.BrainImportExport
SendLoan = objImportExport.ImportLoanByLoan(data, filePath)
objImportExport = Nothing
|
by: J. L. Goddard |
last post by:
1) Do c# web methods support default parameters ?
2) Can a web method, or a c# method such as:
public nullTest( int i )
{
return i++;
}
|
by: Bob |
last post by:
Hi,
Can anyone tell me how to resolve this:
I am calling a web service from a WinForm app and passing a typed dataset as
a parameter. I have added the dataset to the web service project but I get
an error telling me that the WinForm dataset can't be converted to the web
service dataset - even though they are exactly the same.
How do I get around this? I have tried using CType and DirectCast but always
|
by: James Wong |
last post by:
Dear all,
I've a web service function and it contains a parameter in
System.Text.Encoding. I found that the data type of this parameter in
caller application becomes MyWebSvcName.Encoding (where "MyWebSvcName" is
the name of my web service). I don't know how to assign value to this
parameter. (I'm using VB.NET 2003.)
Here are some sample codes:
|
by: Arne |
last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart
from a pocket PC to a webservice.
What is the right datatype?
II have tried dataset as a datatype, but I can't get it to compile.
<WebMethod()> _
Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet
Test program :
Dim cartSet As DataSet
cartSet = ws.VerifySku(cartSet)
| |
by: amazon |
last post by:
Our vender provided us a web service:
1xyztest.xsd file...
------------------------------------
postEvent PostEventRequest
-------------------------------------
authetication authentication
eventname string
source string
ID string
|
by: amazon |
last post by:
I have web service that acceping following parameters..
postev.PostEvent(authentication as ws.authentication, name as string,id as
string, exdate as date, parameter() as ws.nameparametervaluepair (I need help
in passing this))
Postev.postEvent(auth(), "Test", "1234567", tdt, parameter())
For the first parameter authentication I have:
Private Function auth() As ws.Authentication
|
by: TS |
last post by:
I was under the assumption that if you pass an object as a param to a method
and inside that method this object is changed, the object will stay changed
when returned from the method because the object is a reference type?
my code is not proving that. I have a web project i created from a web
service that is my object:
public class ExcelService : SoapHttpClientProtocol
{
|
by: Hakan Örnek |
last post by:
Hi ,
I want to parameter passing to my windows sevice. I call service commands
like this ;
'------------------------------------------------------------
Dim sc As ServiceController
sc = New ServiceController("ProsetLogServices")
sc.MachineName = "."
If sc.Status = ServiceControllerStatus.Stopped Then
sc.Start()
End If
|
by: =?Utf-8?B?UmF2aQ==?= |
last post by:
Hi,
I'm trying to pass values of different data-types to a web-service. I
thought it would be easier to box these values and pass them as a
System.object parameter, like
public void webmethod1(object a)
where a can be of type string, DateTime, float, etc..
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |