Hello!

After I rework the WSDL to soap 1.2, like i show in the link, its now
running on 1.2.
Thanx

Csaba

On 2018.01.17. 10:53, Colm O hEigeartaigh wrote:
> It's possible there is a bug with enabling the binding via an annotation in
> CXF. Could you create a JIRA for this and attach a test-case to reproduce
> the problem?
>
> There is an example in the CXF STS systests of using SOAP 1.2 but where the
> binding is defined in the WSDL - maybe this could help you:
>
> https://github.com/apache/cxf/blob/dae5b16c80b4a8e4926e29e901b3c8477cec71b8/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl#L148
>
> Colm.
>
> On Tue, Jan 16, 2018 at 10:23 PM, Tóth Csaba <[email protected]> wrote:
>
>> Hello!
>>
>> I try to create a own STS service, and I need to use soap 1.2
>> First I created a own service based on the
>> DefaultSecurityTokenServiceProvider:
>>
>>  @WebService(targetNamespace =
>> "http://docs.oasis-open.org/ws-sx/ws-trust/200512/";,
>> portName = "UT_Port",
>> serviceName = "SecurityTokenService",
>> wsdlLocation = "WEB-INF/wsdl/ws-trust-1.4-service.wsdl")
>> @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING)
>> public class SecurityTokenServiceProvider extends
>> org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider {
>>
>> (the body is exactly the same, I'd like to rewrite later)
>>
>> I set up the cxf-servlet.xml:
>>
>>     <jaxws:endpoint
>> xmlns:tns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/";
>> id="securitytokenserviceprovider"
>>         implementor="myclass.sts.SecurityTokenServiceProvider"
>>         wsdlLocation="WEB-INF/wsdl/ws-trust-1.4-service.wsdl"
>> endpointName="tns:UT_Port"
>>         serviceName="tns:SecurityTokenService"
>> address="/SecurityTokenServiceProvider"
>>         >
>> <jaxws:binding>
>>        <soap:soapBinding mtomEnabled="true" version="1.2"/>
>>     </jaxws:binding>
>>         <jaxws:features>
>>             <bean class="org.apache.cxf.feature.LoggingFeature" />
>>         </jaxws:features>
>>         </jaxws:endpoint>
>>
>> but, when I send the test request with soap 1.2 i get the error
>>        <faultcode>soap:VersionMismatch</faultcode>
>>          <faultstring>A SOAP 1.2 message is not valid when sent to a
>> SOAP 1.1 only endpoint.</faultstring>
>>
>> I try everything what i found in the internet (@BindingType etc) but
>> don't work.
>> I use cxf v3.2.1
>>
>> Please some advice on how to solve this?
>>
>> Thanx
>> Csaba
>>
>>
>

Reply via email to