![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| 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 Specs![]() |
| | #2 (permalink) |
| 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 Specs![]() |
| 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 |