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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:26:14+00:00 2026-05-14T21:26:14+00:00

I am connecting to a Java Axis2 web service using a .NET web service

  • 0

I am connecting to a Java Axis2 web service using a .NET web service client. The client itself targets the .NET 3.5 framework. The application that wraps the client DLL is 2.0. I’m not sure if that has any bearing.

I have been given the WSDL and XSDs by email. From those I have built my proxy class using svcutil. Although I am able to successfully send messages, I am unable to pick up the correct faults when something goes wrong. In the example below, errors are always being picked up by the generic FaultException.

catch (FaultException<InvoiceErrorType> fex)
{
    OnLog(enLogLevel.ERROR, fex.Detail.ErrorDescription);
}
catch (FaultException gfex)
{
    OnLog(enLogLevel.ERROR, gfex.Message);
}

The proxy client appears to have the appropriate attributes for the FaultContract:

// CODEGEN: Generating message contract since the operation SendInvoiceProvider_Prod is neither RPC nor document wrapped.
[OperationContractAttribute(Action = "https://private/SendInvoiceProvider", ReplyAction = "*")]
[FaultContractAttribute(typeof(InvoiceErrorType), Action = "https://private/SendInvoiceProvider", Name = "InvoiceError", Namespace = "urn:company:schema:entities:base")]
[XmlSerializerFormatAttribute(SupportFaults = true)]
[ServiceKnownTypeAttribute(typeof(ItemDetail))]
[ServiceKnownTypeAttribute(typeof(Supplier))]
OutboundComponent.SendInvoiceProviderResponse SendInvoiceProvider_Prod(OutboundComponent.SendInvoiceProvider_Request request);

I have enabled tracing and I can see the content of the fault coming back, but .NET is not recognizing it as an InvoiceError. The SOAP fault in full is:

<soapenv:Fault>
    <faultcode xmlns="">soapenv:Client</faultcode>
    <faultstring xmlns="">Message found to be invalid</faultstring>
    <faultactor xmlns="">urn:SendInvoiceProvider</faultactor>
    <detail xmlns="">
        <InvoiceError xmlns="urn:company:schema:entities:common:invoiceerror:v01">
                <ErrorID>100040</ErrorID>
                <ErrorType>UNEXPECTED</ErrorType>
                <ErrorDescription>&lt;![CDATA[&lt;error xmlns="urn:company:schema:errordetail:v01"&gt;&lt;errorCode&gt;1000&lt;/errorCode&gt;&lt;highestSeverity&gt;8&lt;/highestSeverity&gt;&lt;errorDetails count="1"&gt;&lt;errorDetail&gt;&lt;errorType&gt;1&lt;/errorType&gt;&lt;errorSeverity&gt;8&lt;/errorSeverity&gt;&lt;errorDescription&gt;cvc-complex-type.2.4.a: Invalid content was found starting with element 'CompanyName'. One of '{"urn:company:schema:sendinvoice:rq:v01":RoleType}' is expected.&lt;/errorDescription&gt;&lt;errorNamespace&gt;urn:company:schema:sendinvoice:rq:v01&lt;/errorNamespace&gt;&lt;errorNode&gt;CompanyName&lt;/errorNode&gt;&lt;errorLine&gt;1&lt;/errorLine&gt;&lt;errorColumn&gt;2556&lt;/errorColumn&gt;&lt;errorXPath/&gt;&lt;errorSource/&gt;&lt;/errorDetail&gt;&lt;/errorDetails&gt;&lt;/error&gt;]]&gt;</ErrorDescription>
                <TimeStamp>2010-05-04T21:12:10Z</TimeStamp>
        </InvoiceError>
    </detail>
</soapenv:Fault>

I have noticed the namespace defined on the error:

<InvoiceError xmlns="urn:company:schema:entities:common:invoiceerror:v01">

This is nowhere to be seen in the generated proxy class, nor in the WSDLs. The interface WSDL defines the error schema namespace as such:

<xs:import namespace="urn:company:schema:entities:base" schemaLocation="InvoiceError.xsd"/>

Could this be the reason why the .NET client is not able to parse the typed Fault Exception correctly?

I have no control over the web service itself. I see no reason why .NET can’t talk to a Java Axis2 web service. This user had a similar issue, but the reason for his problem cannot be the same as mine, since I can see the fault detail in the trace: Does WCF FaultException<T> support interop with a Java web service Fault

Any help would be gratefully received.

  • 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-14T21:26:14+00:00Added an answer on May 14, 2026 at 9:26 pm

    The namespace given in the WSDL for the custom Fault type did not match the fault namespace that was being raised. As a result, the .NET client was unable to deserialize the fault correctly.

    In other words, the third party company needs to either change the WSDL or change the namespace on the error that is being raised.

    The most useful tool to help you get to the bottom of such problems is to setup a trace: http://msdn.microsoft.com/en-us/library/ms732023.aspx.

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

Sidebar

Ask A Question

Stats

  • Questions 422k
  • Answers 422k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Take a look at StyleCop. May 15, 2026 at 11:19 am
  • Editorial Team
    Editorial Team added an answer As far as I know, TCP doesn't have support for… May 15, 2026 at 11:19 am
  • Editorial Team
    Editorial Team added an answer Kind-of, there is a such thing as a CSS Reset… May 15, 2026 at 11:19 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.