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

  • Home
  • SEARCH
  • 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 5937843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:35:59+00:00 2026-05-22T15:35:59+00:00

I have the following Soap Request I receive from the client, where basically I

  • 0

I have the following Soap Request I receive from the client, where basically I have to extract the Name and then send back “Hello Test”

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"   
xmlns:ns1="http://tempuri.org/">
<SOAP-ENV:Body>
    <ns1:Customer>
    <ns1:Name>Test</ns1:Name>
    </ns1:Customer>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If I have a class Customer define like this:

public class Customer
{
    public string Name {get;set;}
}

I am unsure how to pass in the soap request to my wcf service operation which will take in a Customer Request Object generated from an xsd?

After my wcf service operation receives the soap request, I am not sure how to get the Name attribute out of it and send a response back to the client, like maybe “Hello Test”

Note: The client is not going to send a Customer object, they are going to send an xml request and I have to parse it into a Customer object. I hope this clears things up.

Do I have to do something like this where I pass in a XDocument to my wcf service operation:

private static void ParsSoapDocument(XDocument soapDocument)
{
   //Parse XDocument for elements/attributes

}
  • 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-05-22T15:35:59+00:00Added an answer on May 22, 2026 at 3:35 pm

    You should not have to parse anything, this is what WCF handles for you.

    There may be variations based on whether you are using wrapped/unwrapped messages, but the basic scenario, for the soap message you describe coming from the client, your service interface would be as follows (assuming your response is a string):

    [ServiceContract]
    public interface IMyService
    {
        [OperationContract]
        public string Customer(string Name);
    }
    

    More likely, you are actually trying to perform an operation which takes in a Customer. For instance, to check if a customer exists you might have:

    [ServiceContract]
    public interface IMyService
    {
        [OperationContract]
        public bool CheckCustomerExists(Customer Customer);
    }
    

    and your Customer class on the service side would need to be defined as a DataContract:

    [DataContract]
    public class Customer
    {
        public string Name{get;set;}
    }
    

    This would make the soap request look as follows:

    <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/"> <SOAP-ENV:Body>
        <ns1:CheckCustomerExists>
        <ns1:Customer>
        <ns1:Name>Test</ns1:Name>
        </ns1:Customer>
        </ns1:CheckCustomerExists> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Ajax call: function ajaxCall(soap, url){ // Post SOAP request. $.ajax({
I have following scenario: Lets say we have two different webparts operating on the
I have following structure: class User < ActiveRecord::Base has_many :Hobbies, :dependent => :destroy accepts_nested_attributes_for
I have following model: class Customer < ActiveRecord::Base has_one :cart end class Cart <
I have following problem. I want to make some graphics in c# windows form.
I have following table (type, id, title). When new object is created and type=1
I have following method in the c code. void add(int number) { Node node1;
I have following now. regex=^[0-9]{6}$ this is working for starting 0 to 9 and
I am trying to pass an exception from a specific catch block to a
i need to use gsoap library in C++ and i need to use https.

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.