Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2008

Tip: Looking for answers? Try searching our database.

Custom SOAP Body... How to handle?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Spam Catcher - 05 Feb 2008 18:12 GMT
Hi all,

The client is sending a SOAP body with the following information:

 <soap:Body>
 
   <MyFunction xmlns="http://mycompany/services/t1">
       <header>
              ... Custom Elements Here
       </header>
       <body>
              ... My Function Call Parameters Go Here (The regular stuff)
            <MyID>1</MyID>
       </body>
   </MyFunction>
 </soap:Body>

As you see this is very different than a normal web service call ...
what is the best way to parse such data in .NET?

P.S. How about sending such data  ... I'll probably need to build a test
client to send samples to myself.

Thanks!

Signature

spamhoneypot@rogers.com (Do not e-mail)

John Saunders [MVP] - 06 Feb 2008 00:16 GMT
> Hi all,
>
[quoted text clipped - 18 lines]
> P.S. How about sending such data  ... I'll probably need to build a test
> client to send samples to myself.

Did the client give you a WSDL? If you add a web reference, does a proxy
class get created?
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Spam Catcher - 06 Feb 2008 02:12 GMT
>> Hi all,
>>
[quoted text clipped - 21 lines]
> Did the client give you a WSDL? If you add a web reference, does a proxy
> class get created?

Since I'm building the service ... I guess I'm the one providing the
WSDL? If I receive a WSDL from the customer, I don't think I can just
reference it an create an interface to implement right?

However, the customer does have this interface implemented in a couple
other systems (Java based), but even our Java developer is a bit
confused about the messaging. Seems like this sort of format is custom
and requires custom parsing?

Signature

spamhoneypot@rogers.com (Do not e-mail)

John Saunders [MVP] - 06 Feb 2008 16:35 GMT
>>> Hi all,
>>>
[quoted text clipped - 32 lines]
> confused about the messaging. Seems like this sort of format is custom
> and requires custom parsing?

The reason I asked about a WSDL is that it would have provided a schema
describing the format. You can start from an XSD schema if they have one
(they really must). From that, you can use XSD.EXE to generate C# classes
that will serialize into that format. You can then try to create a WebMethod
that accepts the header and body as two parameters. I believe that will get
you the format you want.

Worse come to worst, you could define your web method to accept a single
parameter of type MyFunction, or, at absolute worst, a single parameter of
XmlNode type.
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.