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 4014362
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:29:16+00:00 2026-05-20T09:29:16+00:00

I am trying to consume a vendor provided AXIS Web service with WCF client.

  • 0

I am trying to consume a vendor provided AXIS Web service with WCF client. The service expects to have the request/response element <TXLife> as the root element of the SOAP body (no operation element wrapping it). I’m using the XmlSerializer because my data contract has some custom ACORD schema idiosyncrasies. For example, the server wants to see the following (…and yes, “service” is the name of the operation…):

...<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><TXLife><TXLifeRequest xmlns="">...    

My client is generating the XML with the operation serialized as a wrapping element like this:

...<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><service xmlns="urn:example.servicecontract"><TXLife><TXLifeRequest xmlns="">...

With the “extra” tag indicating the operation in the request the service is not able to handle the request and errors out. If I remove the <service> tag the Web service happily processes the request.

Unfortunately, the service also sends the response down with the unwrapped <TXLife> tag as the root element:

...<soapenv:Body><TXLife xmlns=""><TXLifeResponse>...

My de-serializer is not handling the response properly and I get a null object back. I assume because my client is expecting a service operation response wrapper tag and not getting one. I don’t get much help from the debugger at the de-serialization level.

I was thinking about implementing the IClientMessageFormatter or even the IClientMessageInspector to modify the request/response (e.g. Remove the operation tag from the request message and add a response tag to the response message). I know the Formatter is injected as an OperationalBehavior but I’m not sure where the MessageInspector fits into the stack. Maybe I’m going about this the wrong way…
Any insight or suggestions would be appreciated. Forgive me, this is my first attempt at WCF services and I’m slowly feeling my way through. Unfortunately, everything about this service seems to be “custom”.

My Service Contract:

[XmlSerializerFormat]
[ServiceContract(Namespace="urn:example.servicecontract")]
public interface IPayoutServiceContract
{
    [OperationContract]
    TXLife service([MessageParameter(Name = "TXLife")]TXLife request);
}

A portion of the service WSDL:

<wsdl:types><schema targetNamespace="urn:Tx103Service" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><import id="tx" namespace="http://ACORD.org/Standards/Life/2" schemaLocation="../acord/TXLife2.8.92.xsd" /></schema></wsdl:types><wsdl:message name="serviceRequest"><wsdl:part element="tx:TXLife" name="acordRequest" /></wsdl:message><wsdl:message name="serviceResponse"><wsdl:part element="tx:TXLife" name="acordResponse" /></wsdl:message><wsdl:portType name="LifeWebService"><wsdl:operation name="service"><wsdl:input message="impl:serviceRequest" name="serviceRequest" /><wsdl:output message="impl:serviceResponse" name="serviceResponse" /></wsdl:operation></wsdl:portType>

Update:

I first tried using the MessageContract(isWrapped=false) decorator on the proxy class (the interface disallows it). That did nothing. I also tried flavors of BodyStyle = WebMessageBodyStyle.Bare, also nothing. I assume this is due to the XMLSerializer I’m using. It seems to me that there is no easy way to “decorate” my way around this issue.

BTW: My service contract, data contract, and proxy client are all in separate projects per this recommendation which sounded solid to me:
blog post by Miguel Castro

Update2:

I created Request/Response wrapper classes decorated with MessageContract/MessageBodyMember tags. Now the XML is generated as expected. Still getting the null object in the response…

Update3:

The “null” objects in my response were actually present in the XML response, but not being de-serialized because the serializer was looking for them as qualified objects. I changed them to non-qualified and my objects showed up just fine after that.

  • 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-20T09:29:17+00:00Added an answer on May 20, 2026 at 9:29 am

    Have you tried using a MessageContract with IsWrapped=false instead of using [MessageParameter]?

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

Sidebar

Related Questions

I'm trying to consume a .NET 2.0 web service using Axis. I generated the
I am trying to consume an ASMX web service from my WCF service. Here
We have consumed a third party web service and are trying to invoke it
I'm trying to consume some .NET web services using JAX-WS. I have generated the
I am trying to consume a web service on an Apache/PHP server for which
Im trying to consume a Java web-service, that uses a certificate. I could generate
I've been trying to consume a .net WCF rest service using JAX-WS lately. Due
I'm trying to consume an ASP.net Web service, and found a utility called WSDL2ObjC.
I am trying to create an application will consume XML web service from one
I'm trying to consume a web service created in .NET which needs SOAP authentication.

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.