Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Complex XML document via SOAP?

Reply
Thread Tools

Complex XML document via SOAP?

 
 
-P-
Guest
Posts: n/a
 
      12-20-2004
Can someone point me to an example of passing a complex, highly nested XML document to a WebService via SOAP?

Nearly all the examples I've seen pass a handful of discrete arguments - foo.bar( int a, date b, string c) - which the
SOAP abstraction layer marshalls into an XML structure. I'm interested in seeing what happens when the argument itself
is an XML document, such as an Order/Line/Item structure.

Or would that just be a single String argument? Am I making that too difficult?

-P-



 
Reply With Quote
 
 
 
 
Mujtaba Syed
Guest
Posts: n/a
 
      12-20-2004
How about this:

[SoapDocumentMethod(ParameterStyle=SoapParamterStyl e.Bare,
Use=SoapBindingUse.Literal)]
public void MyWebMethod([XmlElement] XmlElement req) { //... }

Mujtaba.

"-P-" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can someone point me to an example of passing a complex, highly nested XML

document to a WebService via SOAP?
>
> Nearly all the examples I've seen pass a handful of discrete arguments -

foo.bar( int a, date b, string c) - which the
> SOAP abstraction layer marshalls into an XML structure. I'm interested in

seeing what happens when the argument itself
> is an XML document, such as an Order/Line/Item structure.
>
> Or would that just be a single String argument? Am I making that too

difficult?
>
> -P-
>
>
>



 
Reply With Quote
 
 
 
 
Dan Rogers
Guest
Posts: n/a
 
      12-20-2004
Hi,

Sure, this is simple. I am assuming you mean the method signature is what
you are interested in.

Here's a simple purchase order example. Assume the purchase order class is
highly nested, has repeating detail lines, etc.

The method signature for a SavePO method might look like this:

[WebMethod]
PurchaseOrder SavePo (PurchaseOrder data)
{
if (data != null)
return PersistPOClass(data);
}

make sure that the service class is marked as being document literal as
well - this is the default however in ASP.net 1.1.

I hope this helps

Dan Rogers
Microsoft Corporation

--------------------
>NNTP-Posting-Date: Mon, 20 Dec 2004 13:28:45 -0600
>From: "-P-" <(E-Mail Removed)>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>Subject: Complex XML document via SOAP?
>Date: Mon, 20 Dec 2004 14:28:41 -0500
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>X-RFC2646: Format=Flowed; Original
>Message-ID: <(E-Mail Removed)>
>Lines: 12
>NNTP-Posting-Host: 69.160.30.132
>X-Trace:

sv3-MIyfJum18LIVSYolZio0KbabAfjShCRgtymTv5+LouYxXs3AAF KKD/Q4Qj++k8uXNeTRIhag
NQHooA9!VFx03VLy3a0unyZ8+rBEJ0X2dQNazOvod2YO5Bph0Q XuPy6PZrJdPIOXLM2YCOvltMms
qCw3IF9k!m4NKkeGJrIY3pUqPFA==
>X-Complaints-To: http://www.velocityreviews.com/forums/(E-Mail Removed)
>X-DMCA-Complaints-To: (E-Mail Removed)
>X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
>X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your

complaint properly
>X-Postfilter: 1.3.22
>Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado .fastwebnet.it!tiscali!new
sfeed1.ip.tiscali.net!news.maxwell.syr.edu!border1 .nntp.dca.giganews.com!nnt
p.giganews.com!local1.nntp.dca.giganews.com!nntp.a delphia.com!news.adelphia.
com.POSTED!not-for-mail
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:27306
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Can someone point me to an example of passing a complex, highly nested XML

document to a WebService via SOAP?
>
>Nearly all the examples I've seen pass a handful of discrete arguments -

foo.bar( int a, date b, string c) - which the
>SOAP abstraction layer marshalls into an XML structure. I'm interested in

seeing what happens when the argument itself
>is an XML document, such as an Order/Line/Item structure.
>
>Or would that just be a single String argument? Am I making that too

difficult?
>
>-P-
>
>
>
>


 
Reply With Quote
 
Dilip Krishnan
Guest
Posts: n/a
 
      12-20-2004
Hello -P-,
This should help
http://pluralsight.com/blogs/dbox/ar...1/18/3554.aspx

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

> Can someone point me to an example of passing a complex, highly nested
> XML document to a WebService via SOAP?
>
> Nearly all the examples I've seen pass a handful of discrete arguments
> - foo.bar( int a, date b, string c) - which the SOAP abstraction layer
> marshalls into an XML structure. I'm interested in seeing what
> happens when the argument itself is an XML document, such as an
> Order/Line/Item structure.
>
> Or would that just be a single String argument? Am I making that too
> difficult?
>
> -P-
>



 
Reply With Quote
 
erymuzuan
Guest
Posts: n/a
 
      12-20-2004
Why not start from XML schema for both Request and response objects,
eventhough web services can be used for RPC, or distributed object it's
best used as messaging infrastructure. Then use xsd.exe to generate the
code for the objects, or better still you can hand crafyed the WSDL

[WebMethod]
public MakeOrderResponse MakeOrder(MakeOrderRequest MakeOrderRequest)
{
}

Regards
Erymuzuan Mustapa
-P- wrote:
> Can someone point me to an example of passing a complex, highly nested XML document to a WebService via SOAP?
>
> Nearly all the examples I've seen pass a handful of discrete arguments - foo.bar( int a, date b, string c) - which the
> SOAP abstraction layer marshalls into an XML structure. I'm interested in seeing what happens when the argument itself
> is an XML document, such as an Order/Line/Item structure.
>
> Or would that just be a single String argument? Am I making that too difficult?
>
> -P-
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best practice for complex standard XML support via WSDL/SOAP interface chriscorbell XML 3 09-19-2007 11:19 PM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
Refer to an XML document from within an XML document Manish Hatwalne XML 1 07-13-2004 10:24 AM
For expert on complex loops (reposted) - complex looping problem news.amnet.net.au Java 1 04-13-2004 07:10 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM



Advertisments