axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Zink <jochenl...@web.de>
Subject [Axis2][Rampart] Different soap data with Ramaprt
Date Thu, 22 Mar 2007 14:59:06 GMT
Hello,

I have a little Webservice, which receives a File with MTOM form a Client. The Service works
fine. Now, I want to secure the soap messages with rampart. I got an Exception on Server side,
while axis parses the soap message.

This is the Exception:
org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected subelement data



Therefore I debugged the parsing sequence. First without rampart, and second with rampart.



Here is the relevant SOAP-Message Part WITHOUT Rampart
<ns1:transferDocument xmlns:ns1="http://comchannel.comserver.edocbox.nepatec.de/xsd">
    <ns1:document>
        <ns1:type>
            <ns1:displayName>Portable Document Format</ns1:displayName>
            <ns1:type>1</ns1:type>
            <ns1:fileExtension>pdf</ns1:fileExtension>
            <ns1:datatypeVersion>3.0</ns1:datatypeVersion>
        </ns1:type>
        <ns1:data> <!-- some base64 stuff-->
         ....


Everything looks good, the service receives the file correctly. No exception is thrown.

Now the relevant SOAP-Message Part WITH Rampart 
<ns1:transferDocument xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:ns1="http://comchannel.comserver.edocbox.nepatec.de/xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">

    <document xmlns="http://comchannel.comserver.edocbox.nepatec.de/xsd">
         <type>
           <displayName>Portable Document Format</displayName>
           <type>1</type>
           <fileExtension>pdf</fileExtension>
           <datatypeVersion>3.0</datatypeVersion>
        </type>
        <data>
         <base64Binary xmlns="http://www.w3.org/2001/XMLSchema"><!--- same bas64
stuff as above -->




As you can see, the messages are different. And the message with rampart is not correct and
the service fails.

Has someone any idea what I do wrong?


Thanks for every reply!


Here are the service.xml from the service:
<service name="DocumentTransferService" scope="soapsession">

		<module ref="addressing" />
		<module ref="rampart" />

		<parameter name="enableMTOM" locked="false">true</parameter>

		<parameter name="InflowSecurity">
			<action>
				<items>Timestamp Signature Encrypt</items>
				<passwordCallbackClass>de.nepatec.edocbox.comserver.comchannel.serviceimpl.PWCBHandler</passwordCallbackClass>
				<signaturePropFile>service.properties</signaturePropFile>			
			</action>
		</parameter>
	    
		<parameter name="OutflowSecurity">
			<action>
				<items>Timestamp Signature Encrypt</items>
				<user>service</user>
				<passwordCallbackClass>de.nepatec.edocbox.comserver.comchannel.serviceimpl.PWCBHandler</passwordCallbackClass>
				<signaturePropFile>service.properties</signaturePropFile>
				<signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
				<encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
				<encryptionUser>useReqSigCert</encryptionUser>
			</action>
		</parameter>
... // MessageReceivers and so on



And the axis2.xml from the clients context:

<!--Signature and Encryption : Using the request's certificate-->

	<module ref="rampart" />
	
    <parameter name="OutflowSecurity">
      <action>
        <items>Timestamp Signature Encrypt</items>
        <user>client</user>
        <passwordCallbackClass>de.nepatec.edocbox.comserver.client.PWCBHandler</passwordCallbackClass>
        <signaturePropFile>client.properties</signaturePropFile>
        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
        <encryptionUser>service</encryptionUser>
		 <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
      </action>
    </parameter>

    <parameter name="InflowSecurity">
      <action>
        <items>Timestamp Signature Encrypt</items>
        <passwordCallbackClass>de.nepatec.edocbox.comserver.client.PWCBHandler</passwordCallbackClass>
        <signaturePropFile>client.properties</signaturePropFile>
        
      </action>
    </parameter>

    <!-- ================================================= -->
    <!-- Parameters -->
    <!-- ================================================= -->
    <parameter name="enableMTOM" locked="false">true</parameter>

... // normal stuff
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


---------------------------------------------------------------------
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