axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruchith Fernando" <ruchith.ferna...@gmail.com>
Subject Re: Axis2: Security phase (Rampart) alters response
Date Thu, 08 Feb 2007 08:47:04 GMT
Hi,

Can you please create a JIRA issue and add the WSDL. I'll try to
reproduce the issue.

Axis2: Security phase (Rampart) alters response

Thanks,
Ruchith

On 2/8/07, riis@multi-support.com <riis@multi-support.com> wrote:
>
> Hi,
>
> I have registered a strange behaviour with Axis2 1.1.1 and rampart 1.1. It
> seams like rampart alters the soap body response.
>
> Below are two soap response messages, taken with soapUI. One with Rampart
> enabled and one without. As you can see the elements in
> RetrieveFolderURIResponse isn't the same.
>
> Response without Rampart
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <ns2:RetrieveFolderURIResponse xmlns:ns2="
> http://www.multi-support.com/URIService/types">
>          <myUrl>www.mrtg.org</myUrl>
>          <uri>www.google.com</uri>
>          <some>mytest</some>
>       </ns2:RetrieveFolderURIResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> Response with rampart enabled
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <ns2:RetrieveFolderURIResponse xmlns:ns2="
> http://www.multi-support.com/URIService/types">
>          <myUrl>www.mrtg.org</myUrl>
>          <ns1:URI xmlns:ns1="http://www.multi-support.com/xsd/matypes
> ">www.google.com</ns1:URI>
>          <ns2:MyTest>mytest</ns2:MyTest>
>       </ns2:RetrieveFolderURIResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
>
> If we look at the definition in the wsdl, it looks like element types from
> RetrieveFolderURIResponse is used as element name
> in the response when rampart is enabled. But only for types referring to
> simple and complex types.
>
> Rampart enabled
> ......
>       <ns2:RetrieveFolderURIResponse xmlns:ns2="
> http://www.multi-support.com/URIService/types">
>          <myUrl>www.mrtg.org</myUrl>
>          <ns1:URI xmlns:ns1="http://www.multi-support.com/xsd/matypes
> ">www.google.com</ns1:URI>
>          <ns2:MyTest>mytest</ns2:MyTest>
>       </ns2:RetrieveFolderURIResponse>
>
>       <xsd:sequence>
>             <xsd:element name="myUrl" type="xsd:string" />
>             <xsd:element name="uri" type="mat:URI"/>
>             <xsd:element name="some" type="ma:MyTest"/>
>       </xsd:sequence>
> ......
>
>
> Snippet from URIService.wsdl
> <wsdl:definitions name="URIService"
>       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>       targetNamespace="http://www.multi-support.com/URIService/"
>       xmlns:ma="http://www.multi-support.com/URIService/types"
>       xmlns:mau="http://www.multi-support.com/URIService/"
>       xmlns:mat="http://www.multi-support.com/xsd/matypes"
>       xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> <xsd:import
>       namespace="http://www.multi-support.com/xsd/matypes"
>       schemaLocation="maTypes.xsd" />
>
> <xsd:simpleType name="MyTest">
>       <xsd:restriction base="xsd:string"></xsd:restriction>
> </xsd:simpleType>
>
> <xsd:element name="RetrieveFolderURIResponse">
>       <xsd:complexType>
>             <xsd:sequence>
>                   <xsd:element name="myUrl" type="xsd:string" />
>                   <xsd:element name="uri" type="mat:URI"/>
>                   <xsd:element name="some" type="ma:MyTest"/>
>             </xsd:sequence>
>       </xsd:complexType>
> </xsd:element>
>
> Snippet from maTypes.xsd
> <xsd:simpleType name="URI">
>       <xsd:restriction base="xsd:string"></xsd:restriction>
> </xsd:simpleType>
>
>
> Rampart is only enabled for inflow security.
>
> Snippet from Services.xml
> <module ref="rampart" />
> <parameter name="InflowSecurity">
>       <action>
>             <items>UsernameToken</items>
>             <passwordCallbackClass>com.multisupport.maservices.PWCBHandler
> </passwordCallbackClass>
>       </action>
> </parameter>
>
>
> I have enabled the SOAPMonitor and if the soapmonitorPhase is placed before
> the Security phase, then the response looks right
> whether or not Rampart is enabled. But if I place the soapmonitorPhase
> after the Security phase, then the monitor reflects the result
> actually returned.
>
> Axis2.xml
> <phaseOrder type="OutFlow">
>       <phase name="OperationOutPhase"/>
>       <phase name="soapmonitorPhase"/>
>         <!--system predefined phase-->
>         <!--these phase will run irrespective of the service-->
>         <phase name="PolicyDetermination"/>
>         <phase name="MessageOut"/>
>         <phase name="Security"/>
> </phaseOrder>
>
>
> Regards
> Multi-Support A/S
>
> Torben Riis
> --------------------------------------------------------------------
> Phone +45 96 600 600, Fax +45 96 600 601
> E-mail: riis@multi-support.com
> http://www.multi-support.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
www.ruchith.org
www.wso2.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message