Hello,

 

TL;DR: How do I force Apache CXF 4.0.8 to generate code that sends SOAP 1.1
messages instead of SOAP 1.2 messages?

 

I'm working on upgrading a portion of our code base from Java 8 to Java 11.
Java is not my native language (I'm more of a C/C++ or Python guy) and I
always struggle considerably when I'm working with Java.

In the past two weeks, I've taught myself more than I ever wanted to know
about JavaX, Jakarta, JAXB, JAXWS, et cetera, and I'm far from an expert.
It has been almost a Herculean task finding what mix of JAR files I need to
include on my classpath and how the code needs to be edited for the switch
from javax.xml.* to jakarta.xml.* imports.

 

The component I'm upgrading involved some code generated from a WSDL file.
I've replaced wsimport with a bash shell script that calls
org.apache.cxf.tools.wsdlto.WSDLToJava using CXF 4.0.8.  There's a
handler-chain.xml file as well that I can't figure out how to include --
when I send it in to my wsimport.sh with the -b flag, I'm told it's not a
valid jaxb or jaxws bindings file.  Rude.

 

As far as I can tell, the WSDL file specifies SOAP 1.1 only and has no SOAP
1.2 components.

 

When I try to send a request to the endpoint, I get the following error:

 

org.apache.cxf.binding.soap.SoapFault: A SOAP 1.2 message is not valid when
sent to a SOAP 1.1 only endpoint.

 

Presumably, this means my client is sending a SOAP 1.2 message to the
endpoint when it should be sending a SOAP 1.1 message.  

 

I have no control over the endpoint.

 

I can't find ANY references to SOAP 1.2 (or, for that matter, SOAP 1.1)
anywhere in the code base, except for the namespaces defined in the WSDL
file.

 

Professor Google unfortunately hasn't been very helpful.  Often, I'm being
told to set the binding protocol to SOAP 1.1 and I'm not sure where exactly
to do that.

 

Thanks!

 

Tom Castelli

Staff Software Engineer

National Security Space
 <http://www.lockheedmartin.com/> Lockheed Martin Space
O 610-354-1833 | M 443-201-6577



 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to