You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by selvanayagam <se...@ravsoftsolutions.com> on 2013/06/18 15:25:54 UTC

Invalid SOAP Fault

I have java web service using CXF 2.6.2 with JAX_WS. When trying to 
consume this web service in .Net C# client we get the below error.

Server returned an invalid SOAP Fault. Please see InnerException for 
more details. ---> System.Xml.XmlException: Start element 'Code' from 
namespace 'http://www.w3.org/2003/05/soap-envelope' expected. Found 
element 'faultcode' from namespace.

As per the investigation, the .Net client sends the message using SOAP 
1.1, whereas the server application uses SOAP 1.2.

Can anyone suggest me what would be problem?

Re: Invalid SOAP Fault

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

This should be discussed in users mailing list.

You are using ws-security, right?

You may wanna take a look at ws_security examples shipped with CXF kit, especially the sign_enc, to get some concrete idea how it works.
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-6-19, at 下午10:26, selvanayagam wrote:

> Hi,
> Thanks for your fast reply.
> 
> Now when I connect to server server throws the blow message. How to solve the below issue?
> 
> [WARN] Interceptor for {http://www.merge.com/services}DICOMWebServiceMTOMDisabled has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: General security error (WSSecurityEngine: No crypto property file supplied for decryption)
> ....
> ....
> Caused by: org.apache.ws.security.WSSecurityException: General security error (WSSecurityEngine: No crypto property file supplied for decryption)
>    at org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:67)
> 
> On 19-06-2013 06:35, Freeman Fang wrote:
>> Hi,
>> 
>> This error means your .net client expect a SOAP 1.2 fault but the CXF server return a SOAP 1.1 fault.
>> 
>> This is caused by you have a SOAP 1.1 server but a SOAP 1.2 client, you need fix this mismatch.
>> -------------
>> Freeman(Yue) Fang
>> 
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Web: http://fusesource.com | http://www.redhat.com/
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>> http://blog.sina.com.cn/u/1473905042
>> weibo: @Freeman小屋
>> 
>> 
>> 
>> On 2013-6-18, at 下午9:25, selvanayagam wrote:
>> 
>>> I have java web service using CXF 2.6.2 with JAX_WS. When trying to consume this web service in .Net C# client we get the below error.
>>> 
>>> Server returned an invalid SOAP Fault. Please see InnerException for more details. ---> System.Xml.XmlException: Start element 'Code' from namespace 'http://www.w3.org/2003/05/soap-envelope' expected. Found element 'faultcode' from namespace.
>>> 
>>> As per the investigation, the .Net client sends the message using SOAP 1.1, whereas the server application uses SOAP 1.2.
>>> 
>>> Can anyone suggest me what would be problem?
>> 
> 


RE: Invalid SOAP Fault

Posted by Andrei Shakirin <as...@talend.com>.
Hi,

This exception means that either IssuedTokenOutInterceptor or IssuedTokenInInterceptor have not set IssuedPolicy assertion into asserted status.
The reason on the receiver side can be that message contains no security token, on the sender side that token was not obtained.

It will be a little bit easy to help if you describe your use case and provide information about wsdl, policy and configuration.

Regards,
Andrei.

> -----Original Message-----
> From: selvanayagam
> [mailto:selvanayagam.kulandaiyesu@ravsoftsolutions.com]
> Sent: Donnerstag, 20. Juni 2013 15:57
> To: Andrei Shakirin
> Cc: users@cxf.apache.org
> Subject: Re: Invalid SOAP Fault
> 
> Hi,
> 
> Thanks for you reply I have configured the keys now i am getting the below
> error.
> 
> org.apache.cxf.interceptor.Fault: These policy alternatives can not be
> satisfied:
> {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken
> ..............
> ...............
> Caused by: org.apache.cxf.ws.policy.PolicyException: These policy
> alternatives can not be satisfied:
> {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken
>      at
> org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(AssertionIn
> foMap.java:167)
>      at
> org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerific
> ationInInterceptor.java:101)
>      at
> org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(Abstract
> PolicyInterceptor.java:45)
> 
> On 20-06-2013 18:15, Andrei Shakirin wrote:
> > Hi,
> >
> > Have moved the discussion in user mailing list.
> > This error means that your client or service configuration does not set "ws-
> security.encryption.properties" property containing URL pointing to keystore
> properties file.
> > Properties file normally looks like:
> >
> > org.apache.ws.security.crypto.merlin.keystore.type=jks
> > org.apache.ws.security.crypto.merlin.keystore.password=cspass
> > org.apache.ws.security.crypto.merlin.keystore.alias=myclientkey
> > org.apache.ws.security.crypto.merlin.keystore.file=./etc/keystores/cli
> > entstore.jks
> >
> > Access to private key in keystore is necessary to decrypt the message.
> >
> > Regards,
> > Andrei.
> >
> >> -----Original Message-----
> >> From: selvanayagam
> >> [mailto:selvanayagam.kulandaiyesu@ravsoftsolutions.com]
> >> Sent: Mittwoch, 19. Juni 2013 16:27
> >> To: dev@cxf.apache.org
> >> Subject: Re: Invalid SOAP Fault
> >>
> >> Hi,
> >> Thanks for your fast reply.
> >>
> >> Now when I connect to server server throws the blow message. How to
> >> solve the below issue?
> >>
> >> [WARN] Interceptor for
> >> {http://www.merge.com/services}DICOMWebServiceMTOMDisabled has
> thrown
> >> exception, unwinding now
> >> org.apache.cxf.binding.soap.SoapFault: General security error
> >> (WSSecurityEngine: No crypto property file supplied for decryption) ....
> >> ....
> >> Caused by: org.apache.ws.security.WSSecurityException: General
> >> security error (WSSecurityEngine: No crypto property file supplied for
> decryption)
> >>       at
> >>
> org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(En
> >> cr
> >> yptedKeyProcessor.java:67)
> >>
> >> On 19-06-2013 06:35, Freeman Fang wrote:
> >>> Hi,
> >>>
> >>> This error means your .net client expect a SOAP 1.2 fault but the
> >>> CXF server
> >> return a SOAP 1.1 fault.
> >>> This is caused by you have a SOAP 1.1 server but a SOAP 1.2 client,
> >>> you
> >> need fix this mismatch.
> >>> -------------
> >>> Freeman(Yue) Fang
> >>>
> >>> Red Hat, Inc.
> >>> FuseSource is now part of Red Hat
> >>> Web: http://fusesource.com | http://www.redhat.com/
> >>> Twitter: freemanfang
> >>> Blog: http://freemanfang.blogspot.com
> >>> http://blog.sina.com.cn/u/1473905042
> >>> weibo: @Freeman小屋
> >>>
> >>>
> >>>
> >>> On 2013-6-18, at 下午9:25, selvanayagam wrote:
> >>>
> >>>> I have java web service using CXF 2.6.2 with JAX_WS. When trying to
> >> consume this web service in .Net C# client we get the below error.
> >>>> Server returned an invalid SOAP Fault. Please see InnerException
> >>>> for
> >> more details. ---> System.Xml.XmlException: Start element 'Code' from
> >> namespace 'http://www.w3.org/2003/05/soap-envelope' expected.
> Found
> >> element 'faultcode' from namespace.
> >>>> As per the investigation, the .Net client sends the message using
> >>>> SOAP
> >> 1.1, whereas the server application uses SOAP 1.2.
> >>>> Can anyone suggest me what would be problem?


Re: Invalid SOAP Fault

Posted by selvanayagam <se...@ravsoftsolutions.com>.
Hi,

Thanks for you reply I have configured the keys now i am getting the 
below error.

org.apache.cxf.interceptor.Fault: These policy alternatives can not be 
satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken
..............
...............
Caused by: org.apache.cxf.ws.policy.PolicyException: These policy 
alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken
     at 
org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(AssertionInfoMap.java:167)
     at 
org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerificationInInterceptor.java:101)
     at 
org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:45)

On 20-06-2013 18:15, Andrei Shakirin wrote:
> Hi,
>
> Have moved the discussion in user mailing list.
> This error means that your client or service configuration does not set "ws-security.encryption.properties" property containing URL pointing to keystore properties file.
> Properties file normally looks like:
>
> org.apache.ws.security.crypto.merlin.keystore.type=jks
> org.apache.ws.security.crypto.merlin.keystore.password=cspass
> org.apache.ws.security.crypto.merlin.keystore.alias=myclientkey
> org.apache.ws.security.crypto.merlin.keystore.file=./etc/keystores/clientstore.jks
>
> Access to private key in keystore is necessary to decrypt the message.
>
> Regards,
> Andrei.
>
>> -----Original Message-----
>> From: selvanayagam
>> [mailto:selvanayagam.kulandaiyesu@ravsoftsolutions.com]
>> Sent: Mittwoch, 19. Juni 2013 16:27
>> To: dev@cxf.apache.org
>> Subject: Re: Invalid SOAP Fault
>>
>> Hi,
>> Thanks for your fast reply.
>>
>> Now when I connect to server server throws the blow message. How to
>> solve the below issue?
>>
>> [WARN] Interceptor for
>> {http://www.merge.com/services}DICOMWebServiceMTOMDisabled has
>> thrown exception, unwinding now
>> org.apache.cxf.binding.soap.SoapFault: General security error
>> (WSSecurityEngine: No crypto property file supplied for decryption) ....
>> ....
>> Caused by: org.apache.ws.security.WSSecurityException: General security
>> error (WSSecurityEngine: No crypto property file supplied for decryption)
>>       at
>> org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(Encr
>> yptedKeyProcessor.java:67)
>>
>> On 19-06-2013 06:35, Freeman Fang wrote:
>>> Hi,
>>>
>>> This error means your .net client expect a SOAP 1.2 fault but the CXF server
>> return a SOAP 1.1 fault.
>>> This is caused by you have a SOAP 1.1 server but a SOAP 1.2 client, you
>> need fix this mismatch.
>>> -------------
>>> Freeman(Yue) Fang
>>>
>>> Red Hat, Inc.
>>> FuseSource is now part of Red Hat
>>> Web: http://fusesource.com | http://www.redhat.com/
>>> Twitter: freemanfang
>>> Blog: http://freemanfang.blogspot.com
>>> http://blog.sina.com.cn/u/1473905042
>>> weibo: @Freeman小屋
>>>
>>>
>>>
>>> On 2013-6-18, at 下午9:25, selvanayagam wrote:
>>>
>>>> I have java web service using CXF 2.6.2 with JAX_WS. When trying to
>> consume this web service in .Net C# client we get the below error.
>>>> Server returned an invalid SOAP Fault. Please see InnerException for
>> more details. ---> System.Xml.XmlException: Start element 'Code' from
>> namespace 'http://www.w3.org/2003/05/soap-envelope' expected. Found
>> element 'faultcode' from namespace.
>>>> As per the investigation, the .Net client sends the message using SOAP
>> 1.1, whereas the server application uses SOAP 1.2.
>>>> Can anyone suggest me what would be problem?


RE: Invalid SOAP Fault

Posted by Andrei Shakirin <as...@talend.com>.
Hi,

Have moved the discussion in user mailing list.
This error means that your client or service configuration does not set "ws-security.encryption.properties" property containing URL pointing to keystore properties file.
Properties file normally looks like:

org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=cspass
org.apache.ws.security.crypto.merlin.keystore.alias=myclientkey
org.apache.ws.security.crypto.merlin.keystore.file=./etc/keystores/clientstore.jks

Access to private key in keystore is necessary to decrypt the message.

Regards,
Andrei.

> -----Original Message-----
> From: selvanayagam
> [mailto:selvanayagam.kulandaiyesu@ravsoftsolutions.com]
> Sent: Mittwoch, 19. Juni 2013 16:27
> To: dev@cxf.apache.org
> Subject: Re: Invalid SOAP Fault
> 
> Hi,
> Thanks for your fast reply.
> 
> Now when I connect to server server throws the blow message. How to
> solve the below issue?
> 
> [WARN] Interceptor for
> {http://www.merge.com/services}DICOMWebServiceMTOMDisabled has
> thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: General security error
> (WSSecurityEngine: No crypto property file supplied for decryption) ....
> ....
> Caused by: org.apache.ws.security.WSSecurityException: General security
> error (WSSecurityEngine: No crypto property file supplied for decryption)
>      at
> org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(Encr
> yptedKeyProcessor.java:67)
> 
> On 19-06-2013 06:35, Freeman Fang wrote:
> > Hi,
> >
> > This error means your .net client expect a SOAP 1.2 fault but the CXF server
> return a SOAP 1.1 fault.
> >
> > This is caused by you have a SOAP 1.1 server but a SOAP 1.2 client, you
> need fix this mismatch.
> > -------------
> > Freeman(Yue) Fang
> >
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Web: http://fusesource.com | http://www.redhat.com/
> > Twitter: freemanfang
> > Blog: http://freemanfang.blogspot.com
> > http://blog.sina.com.cn/u/1473905042
> > weibo: @Freeman小屋
> >
> >
> >
> > On 2013-6-18, at 下午9:25, selvanayagam wrote:
> >
> >> I have java web service using CXF 2.6.2 with JAX_WS. When trying to
> consume this web service in .Net C# client we get the below error.
> >>
> >> Server returned an invalid SOAP Fault. Please see InnerException for
> more details. ---> System.Xml.XmlException: Start element 'Code' from
> namespace 'http://www.w3.org/2003/05/soap-envelope' expected. Found
> element 'faultcode' from namespace.
> >>
> >> As per the investigation, the .Net client sends the message using SOAP
> 1.1, whereas the server application uses SOAP 1.2.
> >>
> >> Can anyone suggest me what would be problem?
> >


Re: Invalid SOAP Fault

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

This should be discussed in users mailing list.

You are using ws-security, right?

You may wanna take a look at ws_security examples shipped with CXF kit, especially the sign_enc, to get some concrete idea how it works.
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-6-19, at 下午10:26, selvanayagam wrote:

> Hi,
> Thanks for your fast reply.
> 
> Now when I connect to server server throws the blow message. How to solve the below issue?
> 
> [WARN] Interceptor for {http://www.merge.com/services}DICOMWebServiceMTOMDisabled has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: General security error (WSSecurityEngine: No crypto property file supplied for decryption)
> ....
> ....
> Caused by: org.apache.ws.security.WSSecurityException: General security error (WSSecurityEngine: No crypto property file supplied for decryption)
>    at org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:67)
> 
> On 19-06-2013 06:35, Freeman Fang wrote:
>> Hi,
>> 
>> This error means your .net client expect a SOAP 1.2 fault but the CXF server return a SOAP 1.1 fault.
>> 
>> This is caused by you have a SOAP 1.1 server but a SOAP 1.2 client, you need fix this mismatch.
>> -------------
>> Freeman(Yue) Fang
>> 
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Web: http://fusesource.com | http://www.redhat.com/
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>> http://blog.sina.com.cn/u/1473905042
>> weibo: @Freeman小屋
>> 
>> 
>> 
>> On 2013-6-18, at 下午9:25, selvanayagam wrote:
>> 
>>> I have java web service using CXF 2.6.2 with JAX_WS. When trying to consume this web service in .Net C# client we get the below error.
>>> 
>>> Server returned an invalid SOAP Fault. Please see InnerException for more details. ---> System.Xml.XmlException: Start element 'Code' from namespace 'http://www.w3.org/2003/05/soap-envelope' expected. Found element 'faultcode' from namespace.
>>> 
>>> As per the investigation, the .Net client sends the message using SOAP 1.1, whereas the server application uses SOAP 1.2.
>>> 
>>> Can anyone suggest me what would be problem?
>> 
> 


Re: Invalid SOAP Fault

Posted by selvanayagam <se...@ravsoftsolutions.com>.
Hi,
Thanks for your fast reply.

Now when I connect to server server throws the blow message. How to 
solve the below issue?

[WARN] Interceptor for 
{http://www.merge.com/services}DICOMWebServiceMTOMDisabled has thrown 
exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: General security error 
(WSSecurityEngine: No crypto property file supplied for decryption)
....
....
Caused by: org.apache.ws.security.WSSecurityException: General security 
error (WSSecurityEngine: No crypto property file supplied for decryption)
     at 
org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:67)

On 19-06-2013 06:35, Freeman Fang wrote:
> Hi,
>
> This error means your .net client expect a SOAP 1.2 fault but the CXF server return a SOAP 1.1 fault.
>
> This is caused by you have a SOAP 1.1 server but a SOAP 1.2 client, you need fix this mismatch.
> -------------
> Freeman(Yue) Fang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://fusesource.com | http://www.redhat.com/
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: @Freeman小屋
>
>
>
> On 2013-6-18, at 下午9:25, selvanayagam wrote:
>
>> I have java web service using CXF 2.6.2 with JAX_WS. When trying to consume this web service in .Net C# client we get the below error.
>>
>> Server returned an invalid SOAP Fault. Please see InnerException for more details. ---> System.Xml.XmlException: Start element 'Code' from namespace 'http://www.w3.org/2003/05/soap-envelope' expected. Found element 'faultcode' from namespace.
>>
>> As per the investigation, the .Net client sends the message using SOAP 1.1, whereas the server application uses SOAP 1.2.
>>
>> Can anyone suggest me what would be problem?
>


Re: Invalid SOAP Fault

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

This error means your .net client expect a SOAP 1.2 fault but the CXF server return a SOAP 1.1 fault.

This is caused by you have a SOAP 1.1 server but a SOAP 1.2 client, you need fix this mismatch.
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-6-18, at 下午9:25, selvanayagam wrote:

> 
> I have java web service using CXF 2.6.2 with JAX_WS. When trying to consume this web service in .Net C# client we get the below error.
> 
> Server returned an invalid SOAP Fault. Please see InnerException for more details. ---> System.Xml.XmlException: Start element 'Code' from namespace 'http://www.w3.org/2003/05/soap-envelope' expected. Found element 'faultcode' from namespace.
> 
> As per the investigation, the .Net client sends the message using SOAP 1.1, whereas the server application uses SOAP 1.2.
> 
> Can anyone suggest me what would be problem?