CXF Set SOAP Version to 1.2

I'm getting the following error:
<soap:Fault xmlns:env="">
      <faultstring>Invalid version of SOAP in the request. SOAP 1.2 must be used. </faultstring>

Open in new window

How do I pro grammatically or using a config file change the SOAP to 1.2?

I have tried putting this line on the interface file but does not seem to be working. @BindingType(

I'm currently call the service like this:
LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
            LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();

CORETransactionService service = new CORETransactionService();
CORETransaction port = service.getCoreSoapPort();

Client client = ClientProxy.getClient(port);
Endpoint endpoint = client.getEndpoint();


Map<String, Object> ctx = ((;

Open in new window

HItesh RanaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HItesh RanaAuthor Commented:
I see a post on this website about it

But I get stuck on aspects of it

Code from the link above
// Create the service
Service service = Service.create(serviceQName);
// Add a Port to the service and specify the SOAP 1.2 binding
service.addPort(serviceQName,, wsUrl);
// Access the port
return service.getPort(serviceQName, portTypeClass);

Open in new window

1) What is the portTypeClass
2) why am I returning the type?  
3) How is the return value used?
mccarlIT Business Systems Analyst / Software DeveloperCommented:
While, I don't really have an answer to your original question, I am pretty sure that the post that you found is referring to setting 1.2 on the "server" side, not the client side.

Is 1.2 correctly specified in the WSDL that you use to generate your Java code? And is WSDL2Java applying the correct annotations to the generated code to specify 1.2?
HItesh RanaAuthor Commented:
I believe its on the client side.  

Is 1.2 correctly specified in the WSDL that you use to generate your Java code? And is WSDL2Java applying the correct annotations to the generated code to specify 1.2?  

I'm not sure about these questions.  I'm fairly new to Java.  I can certainly look into it.  Thanks you for the suggestion.
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

This is about namespace. Look here for more details.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HItesh RanaAuthor Commented:
Oh I see.  So I need to change the WSDL file namespace to  I would that cause any issues down the line? The WSDL file was given to me by the client.
I don't expect any issues.
HItesh RanaAuthor Commented:
So then when Apache CXF creates the stubs it will be for 1.2 then?
The best you can do here is to trace SOAP request and responses. Then you'll see everything. You may look here how to do it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.