×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    3

    Exclamation Portable Client Library - MessageContractAttribute isWrapped not defined

    I am attempting to use Microsoft's Portable Library Tools, to create a common "Portable" project that can be used by both a Windows Phone and Windows Store application.
    I've run into trouble with adding a Service Reference to a 3rd party WebService to the portable project. It seems that the Portable Class Library does not support the isWrapped attribute of the MessageContractAttribute class, e.g. if I create the client Stubs directly in a Windows Phone application, the stub looks like this:

    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class ServiceRequest1 {

    But in my Portable project, it looks like this, missing the IsWrapped property setting:

    [System.ServiceModel.MessageContractAttribute()]
    public partial class ServiceRequest1 {

    It seems it can't be set manually either, it just isn't available / undefined. The result is, my Web Service SOAP request has an unwanted wrapper tags around it, causing the server to respond with a malformed request error message.
    I'm wondering are there any known workarounds for this? Is there any other way to switch the wrapper off, or does anyone know why the IsWrapped property is not available?
    It would be great if I could get this to work.
    Thanks.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2012
    Location
    Bilbao
    Posts
    53

    Re: Portable Client Library - MessageContractAttribute isWrapped not defined

    Hi chintan1891

    I have This working on a Portable Class Library targeting Windows Store and Windows Phone 8 apps... what your PCL targets are? Maybe if you are targeting Windows Phone 7 IsWrapped is not Supported, since Windows Phone 7.0 used Silverlight 3. If you target Windows Phone 7.1 it likely be Supported.

    Hope This help!

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    3

    Re: Portable Client Library - MessageContractAttribute isWrapped not defined

    Quote Originally Posted by josueyeray View Post
    Hi chintan1891

    I have This working on a Portable Class Library targeting Windows Store and Windows Phone 8 apps... what your PCL targets are? Maybe if you are targeting Windows Phone 7 IsWrapped is not Supported, since Windows Phone 7.0 used Silverlight 3. If you target Windows Phone 7.1 it likely be Supported.

    Hope This help!
    Hi,
    I need a portable class library which should work in Windows Phone 7.5 & Windows Store app. And IsWrapped property is not available in that Portable Class Library.
    So can you help me in any alternative solution?

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    568

    Re: Portable Client Library - MessageContractAttribute isWrapped not defined

    Can you post a complete class so we can test it?

    EDIT:

    I see you got a semi-official confirmation here...
    http://social.msdn.microsoft.com/For...c-31d738d6b89e

    Is there any way to remove the wrapping before the data is sent?
    Last edited by theothernt; 2013-04-04 at 14:58.

  5. #5
    Registered User
    Join Date
    Apr 2013
    Posts
    3

    Re: Portable Client Library - MessageContractAttribute isWrapped not defined

    Yes, IsWrapped property is not available in Portable Class library, so i am finding its work around.
    I didn't know how to remove wrapper before data is send because the wrapper is added on data in "Reference.cs" which was automatically generated when i had added web service reference.

Similar Threads

  1. Replies: 7
    Last Post: 2009-09-09, 07:38
  2. FTP Client Library
    By earamsey in forum Mobile Java General
    Replies: 4
    Last Post: 2009-05-06, 16:13
  3. TApaTask library not defined
    By ubik15 in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2006-12-18, 22:56
  4. link to user defined library
    By danie78 in forum Symbian
    Replies: 3
    Last Post: 2004-01-13, 04:36
  5. HTTP client library
    By FatBastard in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-05-04, 19:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×