Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Can a pre-existing SOAP tail wag the WCF dog?

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 03-05-2007   #1 (permalink)
VermillionRaelin@gmail.com
Guest


 

Can a pre-existing SOAP tail wag the WCF dog?

I'm trying to map Zimbra's existing SOAP API to WCF. It's not working
out too well. Here's an edited sample of the SOAP requests that I
would like my WCF service to accept:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra">
<userAgent name="ZimbraWebClient - FF2.0 (Win)"
version="undefined"/>
<nosession/>
<format type="js"/>
</context>
</soap:Header>
<soap:Body>
<AuthRequest xmlns="urn:zimbraAccount">
<account by="name">user1</account>
<password>test123</password>
</AuthRequest>
</soap:Body>
</soap:Envelope>

I've tried several approaches, the most promising being a
MessageContract, but it's not working out all that well. First, I
don't know if WCF is going to accept anything that doesn't have an
Action element on the header. If that's the case, it wouldn't be too
difficult to tag an Action header onto the request on Zimbra's side of
the fence. Second, I can't figure out any way, even with vanilla XML
serialization, to create a simple element with an attached attribute
(see the "account" element above). If I can't do that, then I'm
pretty well dead in the water because that pattern is all over the
API.

If I can build a service that accepts the SOAP request listed above,
it should be simple for me to repeat the pattern for the rest of the
API. Any help?


My System SpecsSystem Spec
Old 04-10-2007   #2 (permalink)
Dwight@QuickLearn
Guest


 

RE: Can a pre-existing SOAP tail wag the WCF dog?

The Message Contract would be your best bet here.

And yes, an Action must be applied to the Message for WCF to determine what
to do with it.

Within your Message Contract, use a custom class for your header of the
"Content" section, and use a custom class for the Body of the Message
Contract. For the Body use a custom class for the "AuthRequest" section that
uses the XmlSerializer instead of the DataContract Serializer.

In the Custom "AuthRequest" class the [XmlFormatter] attribute and apply the
name property/field as a [XmlAttribute] markup.

hth



"VermillionRaelin@gmail.com" wrote:

> I'm trying to map Zimbra's existing SOAP API to WCF. It's not working
> out too well. Here's an edited sample of the SOAP requests that I
> would like my WCF service to accept:
>
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
> <soap:Header>
> <context xmlns="urn:zimbra">
> <userAgent name="ZimbraWebClient - FF2.0 (Win)"
> version="undefined"/>
> <nosession/>
> <format type="js"/>
> </context>
> </soap:Header>
> <soap:Body>
> <AuthRequest xmlns="urn:zimbraAccount">
> <account by="name">user1</account>
> <password>test123</password>
> </AuthRequest>
> </soap:Body>
> </soap:Envelope>
>
> I've tried several approaches, the most promising being a
> MessageContract, but it's not working out all that well. First, I
> don't know if WCF is going to accept anything that doesn't have an
> Action element on the header. If that's the case, it wouldn't be too
> difficult to tag an Action header onto the request on Zimbra's side of
> the fence. Second, I can't figure out any way, even with vanilla XML
> serialization, to create a simple element with an attached attribute
> (see the "account" element above). If I can't do that, then I'm
> pretty well dead in the water because that pattern is all over the
> API.
>
> If I can build a service that accepts the SOAP request listed above,
> it should be simple for me to repeat the pattern for the rest of the
> API. Any help?
>
>

My System SpecsSystem Spec
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
tail -f file | cut ...? dbrower PowerShell 0 08-29-2008 12:58 PM
Any command like the tail -f from unix/linux to open log-files Florian Broeder PowerShell 11 06-22-2007 03:02 PM
head and tail in PS? Renugopal PowerShell 18 04-08-2007 11:03 AM
Tail functionality? Christian Schindler PowerShell 10 03-13-2007 03:05 PM
Re: grep, which, and tail commands? Jonathan Eric Miller PowerShell 21 07-15-2006 03:53 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51