Hi Massimiliano,
                  I don't think it is recommenced to have a policy like
this. You need to have
a security binding assertion in the security policy. That is either

    1.) Symmetric binding assertion or
    2.) Asymmetric binding assertion or
    3.) Transport binding assertion.

Because all the properties like security header layout, algorithms used for
encryption, etc
taken from the binding properties. Even if you just send an username token,
Rampart will
encrypt the user taken token unless a transport binding (ed. HTTPS ) is
used. So it is always
better to have a security binding assertion in the security policy.

I will check again with the WS - Security policy language to make sure
whether this is
a restriction or a recommendation.

Can you post the soap request and response captured from the TCPMon ? It
seems that the
server returns a soap fault with a fault code and an error occurs when
building it.

Thanks,
Nandana

On Jan 8, 2008 2:25 AM, Massimiliano Masi <[EMAIL PROTECTED]>
wrote:

> Hello,
>
> I'm trying to use this policy:
>
> <wsp:Policy
>    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
>    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>   <wsp:ExactlyOne>
>     <wsp:All>
>       <sp:SupportingTokens
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>         <wsp:Policy>
>           <sp:UsernameToken
> sp:IncludeToken="
> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always
> "/>
>         </wsp:Policy>
>       </sp:SupportingTokens>
>
>     </wsp:All>
>   </wsp:ExactlyOne>
> </wsp:Policy>
>
> I just want an UsernameToken. I got this:
>
> 21:51:43,502 ERROR [STDERR]
> org.apache.axiom.om.impl.exception.OMBuilderException: Wrong element
> order encountred at Reason
> 21:51:43,504 ERROR [STDERR]     at
> org.apache.axiom.soap.impl.builder.SOAP12BuilderHelper.handleEvent(
> SOAP12BuilderHelper.java:94)
> 21:51:43,504 ERROR [STDERR]     at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(
> StAXSOAPModelBuilder.java:344)
> 21:51:43,505 ERROR [STDERR]     at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(
> StAXSOAPModelBuilder.java:187)
> 21:51:43,506 ERROR [STDERR]     at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java
> :163)
> 21:51:43,506 ERROR [STDERR]     at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java
> :552)
> 21:51:43,507 ERROR [STDERR]     at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(
> OMElementImpl.java:563)
> 21:51:43,507 ERROR [STDERR]     at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(
> OMElementImpl.java:219)
> 21:51:43,508 ERROR [STDERR]     at
> org.apache.axiom.soap.impl.llom.soap12.SOAP12FaultImpl.getCode(
> SOAP12FaultImpl.java:145)
> 21:51:43,508 ERROR [STDERR]     at
> org.apache.axis2.AxisFault.initializeValues(AxisFault.java:189)
> 21:51:43,510 ERROR [STDERR]     at
> org.apache.axis2.AxisFault.<init>(AxisFault.java:183)
> 21:51:43,511 ERROR [STDERR]     at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
> :486)
> 21:51:43,511 ERROR [STDERR]     at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:343)
> 21:51:43,512 ERROR [STDERR]     at
> org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:389)
> 21:51:43,512 ERROR [STDERR]     at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:211)
> 21:51:43,513 ERROR [STDERR]     at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 21:51:43,513 ERROR [STDERR]     at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
> 21:51:43,513 ERROR [STDERR]     at
> com.spirit.XUA.utils.MySTSClient.requestSecurityToken(MySTSClient.java
> :261)
> 21:51:43,514 ERROR [STDERR]     at
>
> Have you any idea?
>
> Thank you,
>
>         Massimiliano
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>

Reply via email to