Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7999973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:39:30+00:00 2026-06-04T15:39:30+00:00

I have a webservice method which described as follow: POST /servis.asmx HTTP/1.1 Host: webservice.myproject.com

  • 0

I have a webservice method which described as follow:

POST /servis.asmx HTTP/1.1
Host: webservice.myproject.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/MyMethod"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <AuthHeader xmlns="http://tempuri.org/">
      <Username>string</Username>
      <Password>string</Password>
    </AuthHeader>
  </soap:Header>
  <soap:Body>
    <MyMethod xmlns="http://tempuri.org/" />
  </soap:Body>
</soap:Envelope>

And i’m trying develop a Windows Phone 7 application which consumes this webservice method. In Visual Studio, i added the service referance to my project. I created Webservice client object like as doing it in .net platform, and created AuthHeader object and set its username and password. The following code is not my code but it like as mine:

        AuthWebService.WebService webService = new AuthWebService.WebService();
        AuthWebService.AuthHeader authentication = new AuthWebService.AuthHeader();

        authentication.Username = "test";
        authentication.Password = "test";
        webService.AuthHeaderValue = authentication;

But when i trying to set services headers with using this code line:

webService.AuthHeaderValue = authentication;

it doesn’t work. webservice object doesn’t have AuthHeaderValue property. I tried it in desktop application or a web application it works but in Windows Phone 7 application it did not.

Does anybody have a suggestion about this issue? Thanks for now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:39:32+00:00Added an answer on June 4, 2026 at 3:39 pm

    This is my friend’s solution for this problem and it is work for me:

    public class _ServiceCredential
    {
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.None)] [DataMember(Order = 2)] 
        public string Password; 
        [DataMember(Order = 1)] 
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.None)] 
        public string Username;
    }
    

    And the full blog post is here: WP7 SOAP Web Service with Custom Headers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we currently have an asmx webservice which exposes a single method to make various
I have a wcf WebService with a method which takes LogLevel type (part of
I have a webservice which is accepting a POST method with XML. It is
I have a winforms, and it connecting wit webservice. Webservice has method which create
I have a web service method in which I create a particular type of
I have to map a REST Webservice URL like http://server:8080/application/service/customer/v1 to createCustomer method in
I have a webservice method which takes an Id and then will kick off
I have an error which I can't understand in my webservice method. First, here
I have a webservice which returns the content of a pdf. I've noticed that
i have webservice with one method which recieves xml as string: [WebMethod] public int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.