Hi,
I have this error.
org.apache.axis2.AxisFault: Error in extracting message properties
    at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
    at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
    at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:377)
    at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
    at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
    at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    at
it.poliba.sisinflab.profiler.stub.UserServiceStub.getUser(UserServiceStub.java:734)
    at
it.poliba.sisinflab.profiler.communication.UserSOAP.getUser(UserSOAP.java:322)
    at
it.poliba.sisinflab.profiler.test.CommunicationTest.main(CommunicationTest.java:34)
Caused by: org.apache.rampart.RampartException: Error in extracting message
properties
    at
org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:290)
    at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:58)
    at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
    ... 9 more
Caused by: org.apache.ws.security.WSSecurityException: Error in converting
SOAP Envelope to Document; nested exception is:
    java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl
    at
org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:157)
    at
org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:150)
    ... 11 more
Caused by: java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl
    at
org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:107)
    ... 12 more
My service.xml is:

<serviceGroup>

    <module ref="rampart"/>
    <module ref="addressing"/>
    <service name="UserService" scope="soapsession">
        <Description>
            servizio di login e gestione utenti
        </Description>
        <messageReceivers>
            <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only";
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
            <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out";
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
        </messageReceivers>
        <parameter name="ServiceClass" locked="false">
            it.poliba.sisinflab.profiler.server.UserService
        </parameter>

        <operation name="signup">
            <wsp:Policy wsu:ID="signup"
             xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
"
             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:TransportBinding>
                            <wsp:Policy>
                                <sp:TransportToken>
                                    <wsp:Policy>
                                        <sp:HttpsToken
RequireClientCertificate="false"/>
                                    </wsp:Policy>
                                </sp:TransportToken>
                                <sp:AlgorithmSuite>
                                    <wsp:Policy>
                                        <sp:Basic256/>
                                    </wsp:Policy>
                                </sp:AlgorithmSuite>
                                <sp:Layout>
                                    <wsp:Policy>
                                        <sp:Lax/>
                                    </wsp:Policy>
                                </sp:Layout>
                                <sp:IncludeTimestamp/>
                            </wsp:Policy>
                        </sp:TransportBinding>
                    </wsp:All>
                </wsp:ExactlyOne>
            </wsp:Policy>
        </operation>

        <operation name="login">
            <wsp:Policy wsu:Id="login" xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
                <wsp:ExactlyOne>
                    <wsp:All>
                        <sp:TransportBinding xmlns:sp="
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
                            <wsp:Policy>
                                <sp:TransportToken>
                                    <wsp:Policy>
                                        <sp:HttpsToken
RequireClientCertificate="false"/>
                                    </wsp:Policy>
                                </sp:TransportToken>
                                <sp:AlgorithmSuite>
                                    <wsp:Policy>
                                        <sp:Basic256/>
                                    </wsp:Policy>
                                </sp:AlgorithmSuite>
                                <sp:Layout>
                                    <wsp:Policy>
                                        <sp:Lax/>
                                    </wsp:Policy>
                                </sp:Layout>
                                <sp:IncludeTimestamp/>
                            </wsp:Policy>
                        </sp:TransportBinding>
                        <sp:SignedSupportingTokens 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/AlwaysToRecipient
"/>
                            </wsp:Policy>
                        </sp:SignedSupportingTokens>

                        <ramp:RampartConfig xmlns:ramp="
http://ws.apache.org/rampart/policy";>
                            <ramp:passwordCallbackClass>

it.poliba.sisinflab.profiler.stub.PWCBHandler
                            </ramp:passwordCallbackClass>
                        </ramp:RampartConfig>

                    </wsp:All>
                </wsp:ExactlyOne>
            </wsp:Policy>
        </operation>

        <operation name="getUser">
            <wsp:Policy wsu:id="getuser"
             xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
"
             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:TransportBinding>
                            <wsp:Policy>
                                <sp:TransportToken>
                                    <wsp:Policy>
                                        <sp:HttpsToken
RequireClientCertificate="false"/>
                                    </wsp:Policy>
                                </sp:TransportToken>
                                <sp:AlgorithmSuite>
                                    <wsp:Policy>
                                        <sp:Basic256/>
                                    </wsp:Policy>
                                </sp:AlgorithmSuite>
                                <sp:Layout>
                                    <wsp:Policy>
                                        <sp:Lax/>
                                    </wsp:Policy>
                                </sp:Layout>
                                <sp:IncludeTimestamp/>
                            </wsp:Policy>
                        </sp:TransportBinding>
                    </wsp:All>
                </wsp:ExactlyOne>
            </wsp:Policy>
        </operation>

    </service>
</servicegroup>

I get this error because the stub does not parse the address header
properly.
Thank you.


Mikelantonio

-- 
It's creepy, but here we are, the Pilgrims, the crackpots of our time,
trying to establish our own alternate reality. To build a world out of rocks
and chaos. What it's going to be, I don't know. Even after all that rushing
around, where we've ended up is the middle of nowhere in the middle of the
night. And maybe knowing isn't the point. Where we're standing right now, in
the ruins in the dark, what we build could be anything. [Choke - Chuck
Palahniuk]

Reply via email to