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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:54:58+00:00 2026-05-19T11:54:58+00:00

Does anyone know the trick to calling a WCF (Soap 1.2) web service from

  • 0

Does anyone know the trick to calling a WCF (Soap 1.2) web service from CXF?

I’ve been trying to get a basic hello world client working for a while now and I’ve had no luck.

It works fine with Soap 1.1.

When I print out the SoapBinding the client is using it’s using soap 1.1 even though it’s a soap 1.2 service
when I set the soap binding manually to 1.2 it freezes up when you make the web service call and eventually dies with a socket timeout exception (Read timed out).

public static void main(String[] args) {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setServiceClass(ITest.class);
        factory.setAddress("http://localhost/Test/test.svc");
        final Soap12 soap12 = Soap12.getInstance();

        BindingConfiguration config = new BindingConfiguration() {

            @Override
            public String getBindingId() {
                return soap12.getBindingId();
            }
        };
        factory.setBindingConfig(config);
        factory.setBindingId(soap12.getBindingId());        
        ITest service = (ITest) factory.create();

        org.apache.cxf.endpoint.Client client = ClientProxy.getClient(service);
        client.getRequestContext().put("ContentType", "text/xml; charset=utf-8");
        SoapBinding binding = (SoapBinding) client.getEndpoint().getBinding();
        System.out.println("[" + binding.getSoapVersion() + "]");
        System.out.println(service.test("World"));
    }

This is the soap request that gets sent to the WCF Service.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<Test xmlns="http://tempuri.org/" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/">
<s>World</s>
</Test>
</soap:Body>
</soap:Envelope>
  • 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-19T11:54:58+00:00Added an answer on May 19, 2026 at 11:54 am

    I actually found out CXF doesn’t support calling a Soap 1.2 WCF Service that uses wsHttpBinding. I switched the WCF web service to use BasicHttpBinding and It works now.

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

Sidebar

Related Questions

Does anyone know how to get IntelliSense to work reliably when working in C/C++
Does anyone know how I can, in platform-independent C++ code prevent an object from
Does anyone know a trick in Visual Studio 2008 to make it remember the
Does anyone know any trick I could use to keep the Derived class until
Does anyone know how to transform a enum value to a human readable value?
Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that
Does anyone know of a FOSS Python lib for generating Identicons ? I've looked,
Does anyone know of any existing packages or libraries that can be used to
Does anyone know a good Java lib that will hook into SVN so I
Does anyone know where online copies of the old The Perl Journal articles can

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.