You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by sridhar patnayak <pa...@gmail.com> on 2010/02/24 11:24:43 UTC

org.apache.axis2.engine.AxisEngine - Missing wsse:Security header in request

HI,
Could you please help me in solving the issue.
The issue is:
The Exception occured at the service is not transmit to the client Instead
of It transmitting as Missing wsse:Security header in request.

I  am using rampart version1.4 and axis2.1.4.Before using the rampart The
Exceptions at the service are reflected at the client as it is.
For Your reference I am attaching the policy.xml file

Thanks & Regards,
Sridhar

Re: org.apache.axis2.engine.AxisEngine - Missing wsse:Security header in request

Posted by Jaime Hablutzel Egoavil <ha...@gmail.com>.
if the client is receiving

Missing wsse:Security header in request

he isn't sending something like this in the request:

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">

<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">



<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
soapenv:mustUnderstand="true">



<wsu:Timestamp xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>

     <wsu:Created>2009-09-17T13:17:57.158Z</wsu:Created>

     <wsu:Expires>2009-09-18T13:30:57.158Z</wsu:Expires>

</wsu:Timestamp>



<wsse:UsernameToken xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>

<wsse:Username>user</wsse:Username>

<wsse:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText
">password</wsse:Password>

</wsse:UsernameToken>



</wsse:Security>



</soapenv:Header>



<soapenv:Body>

<ns1:getPatientDetails xmlns:ns1="http://ws.hndac.gob.pe">

<ns1:identificador>121212</ns1:identificador>

</ns1:getPatientDetails>

</soapenv:Body>

</soapenv:Envelope>


I would recommend you to use SoapUI to send SOAP requests to your server.

One more thing, what is the code for your client?

For implementing an axis2 with rampart client you have to do something like
this:


        ConfigurationContext ctx = ConfigurationContextFactory

.createConfigurationContextFromFileSystem(null);  // with rampart.mar and
addressing.mar in your classpath, othewise you should do something like

//         ConfigurationContext ctx = ConfigurationContextFactory

.createConfigurationContextFromFileSystem("path/to/your/module");


                    simpleStub = new EmrWsStub(ctx,
                            "
http://172.17.0.6:8080/emrws/services/emrWs.emrWsHttpSoap12Endpoint/");


                    ServiceClient sc = simpleStub._getServiceClient();
                    sc.engageModule("rampart");

                    Options options = sc.getOptions();
                    options.setUserName("username");
                    options.setPassword("password");
                } catch (AxisFault e) {
                    throw new RuntimeException();
                }

On Wed, Feb 24, 2010 at 5:24 AM, sridhar patnayak <pa...@gmail.com>wrote:

> HI,
> Could you please help me in solving the issue.
> The issue is:
> The Exception occured at the service is not transmit to the client Instead
> of It transmitting as Missing wsse:Security header in request.
>
> I  am using rampart version1.4 and axis2.1.4.Before using the rampart The
> Exceptions at the service are reflected at the client as it is.
> For Your reference I am attaching the policy.xml file
>
> Thanks & Regards,
> Sridhar
>



-- 
Jaime Hablutzel

(tildes omitidas intencionalmente)