I have a requirement of creating a webservice which can accept XML as an input parameter and response also comes back as XMl. Can somebody please help?
Thanks
BC K2M wrote:
pass an XML Document from .net client to a JAVA Web Service
12-Jun-10
hi guys ! i have a problem, and it is making my life really disgusting. i'm developing an interoperability project! the Client is a .NET WebApp in C# and the Web Service is made with JAVA, and i need to pass objects from the client to the WS ! i used the Serialization/Deserialization to XML method ! i first created a XSD file to respect! and i created for the both Languages a class of Objects that will be sent ! in the beginning i wrote the XML Document in a XML file ! it did work and i saw my object going from app to an other !. but now i need to send the XML Doc to the web service, i had the idea to convert it to a String and send it ! but it didn't work :S (i'm not sure that it is an Error of coding or it is just impossible), and now i'm stick! so my question is : is there a way to pass an XML Document from .net client to a JAVA Web Service, if u have ideas SOS ! thxxx
Previous Posts In This Thread:
Passing XML data as parameter of web service
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
-
Ludwi
http://www.coders-lab.be
Ludwig, Does the XML data conform to a schema?
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
- (e-mail address removed)
Re: Passing XML data as parameter of web service
Hi
yes it conforms to an XSD. What do you mean with 'create a manage
type' ? (communication goes from a company to another company
Thanks
Ludwi
-
Ludwi
http://www.coders-lab.be
Ludwig, I am curious, if another company is exposing the web service, do
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
- (e-mail address removed)
Ludwig,ASP.
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
Pete
--
Site:
http://www.eggheadcafe.co
UnBlog:
http://petesbloggerama.blogspot.co
Short urls & more:
http://ittyurl.ne
:
Re: Passing XML data as parameter of web service
Well, they sent us the XSD, that is it..
-
Ludwi
http://www.coders-lab.be
Re: Passing XML data as parameter of web service
Yes, I have read that.... but I did not know if this is the best way t
do it......
-
Ludwi
http://www.coders-lab.be
Re: Passing XML data as parameter of web service
Are you sure it isn't a WSDL document? Does the top look like this
<?xml version="1.0" encoding="utf-8" ?
<wsdl:definitions xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="
http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="
http://tempuri.org/"
xmlns:s="
http://www.w3.org/2001/XMLSchema"
xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="
http://tempuri.org/"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
And so on...
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Re: Passing XML data as parameter of web service
No, only XSD, but I can ask the WSDL I guess!
--
Ludwig
http://www.coders-lab.be
That's definitely the better option.
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]
- (e-mail address removed)
Re: Passing XML data as parameter of web service
Thanks for the help!
--
Ludwig
http://www.coders-lab.be
Why not?
Why not? Surely a strongly typed object (that represents a well-formed Xml
Document) is better than a crummy old string?
--
Site:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
Short urls & more:
http://ittyurl.net
:
Re: Passing XML data as parameter of web service
On Fri, 11 May 2007 13:13:02 -0700, Peter Bromberg [C# MVP]
Yes.... but I want it to be 'open' and platform independent, and I was
not sure whether I should use a .NET framework class like XmlDocument.
If I would use this and send it to another company that does not use
..NET, can they still parse the XML with java for example?
--
Ludwig
http://www.coders-lab.be
The "Xml" has to go over the wire in string form inside an XML SOAP Envelope.
The "Xml" has to go over the wire in string form inside an XML SOAP Envelope.
All SOAP Messages are essentially "strings" - even binary data is
"string-ified". You can check with other vendors' platforms to see how they
treat a complete XML Document as being the payload or a parameter.
Peter
--
Site:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
Short urls & more:
http://ittyurl.net
:
When an XmlDocument is exposed as a parameter or return value of a web service
When an XmlDocument is exposed as a parameter or return value of a web
service in ASP.NET, the WSDL produces a schema for that parameter/return
value of a complex type with a single element which allows any element. So
basically, the content is open-ended. I can't imagine another platform that
doesn't handle this in some manner.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
message
Re: Passing XML data as parameter of web service
Ludwig wrote:
Use string.
I am pretty sure that a web service using XmlDocument will
not be usable from non-.NET languages.
Arne
pass an XML Document from .net client to a JAVA Web Service
hi guys ! i have a problem, and it is making my life really disgusting. i'm developing an interoperability project! the Client is a .NET WebApp in C# and the Web Service is made with JAVA, and i need to pass objects from the client to the WS ! i used the Serialization/Deserialization to XML method ! i first created a XSD file to respect! and i created for the both Languages a class of Objects that will be sent ! in the beginning i wrote the XML Document in a XML file ! it did work and i saw my object going from app to an other !. but now i need to send the XML Doc to the web service, i had the idea to convert it to a String and send it ! but it didn't work :S (i'm not sure that it is an Error of coding or it is just impossible), and now i'm stick! so my question is : is there a way to pass an XML Document from .net client to a JAVA Web Service, if u have ideas SOS ! thxxx
Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET Providerless Custom Forms Authentication, Roles and Profile with MongoDb
http://www.eggheadcafe.com/tutorial...ntication-roles-and-profile-with-mongodb.aspx