You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jochen Zink <jo...@web.de> on 2007/03/22 15:59:06 UTC
[Axis2][Rampart] Different soap data with Ramaprt
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
RE: [Axis2][Rampart] Different soap data with Ramaprt
Posted by Vibhor_Sharma <vs...@gryphonnetworks.com>.
Great so even you are facing the same problem
I guess this is a common problem
If some body knows what the issue is it will be helpful.
Thanks
Vibhor
-----Original Message-----
From: Jochen Zink [mailto:jochenlist@web.de]
Sent: Thursday, March 22, 2007 10:59 AM
To: axis-user@ws.apache.org
Subject: [Axis2][Rampart] Different soap data with Ramaprt
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-wssec
urity-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.serviceim
pl.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.serviceim
pl.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</op
timizeParts>
</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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2][Rampart] Different soap data with Ramaprt
Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,
Can you please create a JIRA issue [1] on this and help us recreate
the issue. Please attach your service/client info to the issue.
Thanks,
Ruchith
[1] https://issues.apache.org/jira/browse/RAMPART
On 3/22/07, Jochen Zink <jo...@web.de> wrote:
> 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
>
>
--
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