[
https://issues.apache.org/jira/browse/AXIS2-3240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531776
]
Lorenzo commented on AXIS2-3240:
--------------------------------
Another case that probably is linked with this problem that may help:
----------------------------------------------------------------------------------------
SAMPLE CODE:
----------------------------------------------------------------------------------------
MessageContext mc = buildAxisMessage(saajMessage); //Build a MessageContext
to use wih Rampart
System.out.println(XMLUtils.toOM(saajMessage.getSOAPPart().getEnvelope()));
WSDoAllSender wssSender = new WSDoAllSender();
wssSender.processMessage(mc);
org.apache.axis2.jaxws.message.impl.MessageImpl jaxMessage =
(org.apache.axis2.jaxws.message.impl.MessageImpl)
org.apache.axis2.jaxws.message.util.MessageUtils.getMessageFromMessageContext(mc);
System.out.println(mc.getEnvelope());
System.out.println(XMLUtils.toOM(((SOAPMessageImpl)
jaxMessage.getAsSOAPMessage()).getSOAPPart().getEnvelope()));
----------------------------------------------------------------------------------------
OUTPUT:
----------------------------------------------------------------------------------------
Original saajMessage:
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soapenv:Header><eGov_IT:Intestazione
xmlns:eGov_IT="http://www.cnipa.it/schemas/2003/eGovIT/Busta1_0/"
/></soapenv:Header><soapenv:Body><eseguiServizio
xmlns="http://spcoop.it/cart/pdd-test"><Richiesta><persona nome="mario"
cognome="rossi"/></Richiesta></eseguiServizio></soapenv:Body></soapenv:Envelope>
Axis2 secured MessageContext:
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
soapenv:actor="openspcoop"><wsse:BinarySecurityToken
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
wsu:Id="CertId-2429971">MIICgjCCAesCBEYADGgwDQYJKoZIhvcNAQEFBQAwgYcxHDAaBgkqhkiG9w0BCQEWDW1hbmNhQGxpbmsuaXQxCzAJBgNVBAYTAklUMRAwDgYDVQQIEwdUb3NjYW5hMQ0wCwYDVQQHEwRQaXNhMRAwDgYDVQQKEwdMaW5rLml0MRAwDgYDVQQLEwdEZXYgTGFiMRUwEwYDVQQDEwxBbmRyZWEgTWFuY2EwHhcNMDcwMzIwMTYzMTM2WhcNMDgwMzE0MTYzMTM2WjCBhzEcMBoGCSqGSIb3DQEJARYNbWFuY2FAbGluay5pdDELMAkGA1UEBhMCSVQxEDAOBgNVBAgTB1Rvc2NhbmExDTALBgNVBAcTBFBpc2ExEDAOBgNVBAoTB0xpbmsuaXQxEDAOBgNVBAsTB0RldiBMYWIxFTATBgNVBAMTDEFuZHJlYSBNYW5jYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAh2lxg8kprdhSSD4z4nHU732CH9hTGOzaglDRxsn3xRZt9g48ymAV13eUD8xnWZL5o27oymS6JgfHGhcXMVuMiGSSE7ifRO2m6tVPsww4oOo91F+EqZKMPrKwULvjRpPhITjub3LCPGDOw7yRJg66+JfcQILaa7F7ZbSRlI2kweMCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAb12JeeLixsvFOwhthr3IhH2uHMGOXcJeu+2RqKAhRXdbYke/NL2oeoCayF09E+cfvO9VCbW0u+/A2HW1/zvqLS2E9oGGAdFeQQQHl+ICfKGxDGUzRLqTROYYWZLU3JjsiyGFk8ffvsfGK/axOc0AEyk3kevQK/8oDIJgBzT2jDA==</wsse:BinarySecurityToken><ds:Signature
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
Id="Signature-27564214"><ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"
/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<ds:Reference URI="#id-26716207">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<ds:DigestValue>5Um2gV0bscdsTCNwfxT4Vfh116k=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-5651833">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<ds:DigestValue>dAFuwmrHzQkz3NQwtyZiqwQ8/Ek=</ds:DigestValue>
</ds:Reference></ds:SignedInfo><ds:SignatureValue>
VlQEmLp8tc9qg0OFUW8DtKwlJT4Qrerq+nkO6woYAaNzRpT1nyAtjpXDVsoQhWZrXNUUhDVXqMv6
8g8/E+8BGI7Bez2zdDeZ3BolILaAoI5MDMN3bP0r0NOVnteCOlSEJfnEDjxv21vBHtTgiRTmL3gM
Vr/AXUa4xkyyOtwxBvU=
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-19265387">
<wsse:SecurityTokenReference
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="STRId-26659010"><wsse:Reference URI="#CertId-2429971"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
/></wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature><xenc:EncryptedKey Id="EncKeyId-22024493">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference><ds:X509Data>
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=Andrea Manca,OU=Dev Lab,O=Link.it,L=Pisa,C=IT,[EMAIL
PROTECTED]</ds:X509IssuerName>
<ds:X509SerialNumber>1174408419</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data></wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData><xenc:CipherValue>Gv7uKXY6PdNlSO6nZo9JKOFBVogl7oavM3/8wwz1S9f9gSCBjCYPvxiDBtmaeGvcKMPcRE09QwoIBHZDxNElyXJidZsSm1xPpKm1dxbpp7Wh1CC+Q9mmp7YqYyeauO5C1A44Wa4e5IFzrC3y4nnc3r5shIaGc9zLgei1ZswwI84=</xenc:CipherValue></xenc:CipherData>
<xenc:ReferenceList><xenc:DataReference URI="#EncDataId-26716207"
/></xenc:ReferenceList></xenc:EncryptedKey><wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="Timestamp-30467130"><wsu:Created>2007-10-02T12:42:23.732Z</wsu:Created><wsu:Expires>2007-10-02T12:52:23.732Z</wsu:Expires></wsu:Timestamp></wsse:Security><eGov_IT:Intestazione
xmlns:eGov_IT="http://www.cnipa.it/schemas/2003/eGovIT/Busta1_0/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="id-5651833" /></soapenv:Header><soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="id-26716207"><xenc:EncryptedData Id="EncDataId-26716207"
Type="http://www.w3.org/2001/04/xmlenc#Content"><xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc" /><ds:KeyInfo
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:Reference
URI="#EncKeyId-22024493" /></wsse:SecurityTokenReference>
</ds:KeyInfo><xenc:CipherData><xenc:CipherValue>VrvO9CqtpSXw2htcugiNbhkgO0ZZrFMxAv/lgfl+JKvzx9j2//wyqBLa1ZUfRZaMI5HgV11viCkr
HN9YBHI8JrMvovm8qkIZO4QO8Hm2c+rwmUwLB+Q1+3d5FsHPZCCWJRrfu8jVSp+iIQDMkLuqZvdt
N5O+eqnQt9VjNwHyCFPkrPjS07F7An4qha9KkbrfDzJX7O5KIh2eayfiwWAUnbIFBH4W1DdiYeTh
zA3LA6JUspnmJQ9YARhCZLoGOztZaFV8UAAKneZCkMvCgwNn6G01WWojGRSc/dkDY4kfg2BP9Uzd
YLvVmXF3IgWKknQ8g9uoKXR02dqG1LK3/LDCcO9JBGP2i0QwnbFUICwyiibQ8EgE9AJwEMSON0vx
mi+x6RkXueyDu3fbajjVTnqvxs1i39rtOQtT/dlXSh5Yvikxj77EVByLdV6qegJOPkcOm6nDwhvF
u+Rx9IE92CmgZHuMdWMAhJddnIws6O9nkzE=</xenc:CipherValue></xenc:CipherData></xenc:EncryptedData></soapenv:Body></soapenv:Envelope>
saaj Message exracted from AXIS2 secured message
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
soapenv:actor="openspcoop"><wsse:BinarySecurityToken
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
wsu:Id="CertId-2429971">MIICgjCCAesCBEYADGgwDQYJKoZIhvcNAQEFBQAwgYcxHDAaBgkqhkiG9w0BCQEWDW1hbmNhQGxpbmsuaXQxCzAJBgNVBAYTAklUMRAwDgYDVQQIEwdUb3NjYW5hMQ0wCwYDVQQHEwRQaXNhMRAwDgYDVQQKEwdMaW5rLml0MRAwDgYDVQQLEwdEZXYgTGFiMRUwEwYDVQQDEwxBbmRyZWEgTWFuY2EwHhcNMDcwMzIwMTYzMTM2WhcNMDgwMzE0MTYzMTM2WjCBhzEcMBoGCSqGSIb3DQEJARYNbWFuY2FAbGluay5pdDELMAkGA1UEBhMCSVQxEDAOBgNVBAgTB1Rvc2NhbmExDTALBgNVBAcTBFBpc2ExEDAOBgNVBAoTB0xpbmsuaXQxEDAOBgNVBAsTB0RldiBMYWIxFTATBgNVBAMTDEFuZHJlYSBNYW5jYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAh2lxg8kprdhSSD4z4nHU732CH9hTGOzaglDRxsn3xRZt9g48ymAV13eUD8xnWZL5o27oymS6JgfHGhcXMVuMiGSSE7ifRO2m6tVPsww4oOo91F+EqZKMPrKwULvjRpPhITjub3LCPGDOw7yRJg66+JfcQILaa7F7ZbSRlI2kweMCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAb12JeeLixsvFOwhthr3IhH2uHMGOXcJeu+2RqKAhRXdbYke/NL2oeoCayF09E+cfvO9VCbW0u+/A2HW1/zvqLS2E9oGGAdFeQQQHl+ICfKGxDGUzRLqTROYYWZLU3JjsiyGFk8ffvsfGK/axOc0AEyk3kevQK/8oDIJgBzT2jDA==</wsse:BinarySecurityToken></wsse:Security></soapenv:Header></soapenv:Envelope>
I get only first child of each node
<envelope>
<header>
<Security>
<BinarySecurityToken>
all the rest is lost...
> SAAJ : Problems when adding values
> ----------------------------------
>
> Key: AXIS2-3240
> URL: https://issues.apache.org/jira/browse/AXIS2-3240
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.3
> Reporter: Lorenzo
>
> When i edit an element (now adding childs to Header) seems that
> something go wrong when i add values..
> For example:
> -----------------------------------------------
> CODE:
> -----------------------------------------------
> Name name = new PrefixedQName("http://myNS","lName","prefix");
> SOAPFactoryImpl sf = new SOAPFactoryImpl();
> SOAPElementImpl myEle = (SOAPElementImpl) sf.createElement(name1);
> SOAPElementImpl child1 =
> (SOAPElementImpl)myEle.addChildElement("child1");
> SOAPElementImpl child1_1 =
> (SOAPElementImpl)child1.addChildElement("child1_1");
> SOAPElementImpl child2 =
> (SOAPElementImpl) myEle.addChildElement("child2");
> SOAPElementImpl child2_1 =
> (SOAPElementImpl) child2.addChildElement("child2_1");
>
> System.out.println("O -> " + XMLUtils.toOM(myEle));
> child2_1.setValue("AAAA");
> System.out.println("A -> " + XMLUtils.toOM(myEle));
> child1_1.setValue("BBBB");
> System.out.println("B -> " + XMLUtils.toOM(myEle));
>
> myEle.addChildElement("NEW");
> child2.addChildElement("NEW");
> child1.addChildElement("NEW");
> System.out.println("N -> " + XMLUtils.toOM(myEle));
> -----------------------------------------------
> OUTPUT:
> -----------------------------------------------
> 16:06:30,669 INFO [STDOUT] O -> <prefix:lName
> xmlns:prefix="http://myNS"><child1><child1_1 /></child1><child2><child2_1
> /></child2></prefix:lName>
> 16:06:30,672 INFO [STDOUT] A -> <prefix:lName
> xmlns:prefix="http://myNS"><child1><child1_1
> /></child1><child2><child2_1>AAAA</child2_1></child2></prefix:lName>
> 16:06:30,674 INFO [STDOUT] B -> <prefix:lName
> xmlns:prefix="http://myNS"><child1><child1_1>BBBB</child1_1></child1></prefix:lName>
> 16:06:30,677 INFO [STDOUT] N -> <prefix:lName
> xmlns:prefix="http://myNS"><child1><child1_1>BBBB</child1_1></child1></prefix:lName>
> ------------------------------------------------
> If i make:
> Iterator itr = myEle.getChildElements();
> while(itr.hasNext()){
> log.info(XMLUtils.toOM((SOAPElementImpl) itr.next()));
> }
> i can iterate in all childs but they are affected by the same problem...
> Same when i writeTo the SOAPMessage (all new nodes missed eccept the
> first one)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]