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 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 following databases: test table1 fields: id, password, name, lastname test2 table2 fields:
I have the following Ajax call: function ajaxCall(soap, url){ // Post SOAP request. $.ajax({
I have been tasked with obtaining a response from a SOAP request, using classic
The CXF generated client sends the following SOAP request which does not return records
I have a WSDL script which has the following format <definitions name=ProcessData targetNamespace=urn:ProcessData> <message
I have the following PHP example code: $client = new SoapClient("http://example.com/example.wsdl"); $h = Array();
We have a WSDL which contains the following type definition: ... <xsd:complexType name=OrderItem> <xsd:all>
I have an applet that makes a SOAP request to a web service. It
I have make a soap-call with Savon. This works fine and give the following
I have the following query: SELECT users_extra.first_name, users_extra.last_name FROM (branches, users_extra) WHERE ((branches.manager_id =

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.