Is there any way to stop the sign method of XMLSignature adding namespace information to every element? When I use it the argument list in my SOAP message becomes 7 times larger because namespace information is added to every element. For long element lists this is causing an OutOfMemory error because the SOAP message is too large. For example:
Before calling sign: <soapenv:Body SOAP-SEC:id="Body"> <ns1:WSMethod1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="https://machine.domain:9443/MyApp/services/MyService"> <ns1:arg0 xsi:type="xsd:string">text1</ns1:arg0> <ns1:arg1 xsi:type="xsd:string">text2</ns1:arg1> <ns1:arg2 xsi:type="xsd:string">text3</ns1:arg2> After calling sign: <soapenv:Body SOAP-SEC:id="Body" xmlns="" xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:WSMethod1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="" xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" xmlns:ns1="https://machine.domain:9443/MyApp/services/MyService" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns1:arg0 xmlns="" xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" xmlns:ns1="https://machine.domain:9443/MyApp/services/MyService" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">text1</ns1:arg0> <ns1:arg1 xmlns="" xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" xmlns:ns1="https://machine.domain:9443/MyApp/services/MyService" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">text2</ns1:arg1> <ns1:arg2 xmlns="" xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" xmlns:ns1="https://machine.domain:9443/MyApp/services/MyService" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">text3</ns1:arg2> Is it possible to stop this from happening? Please let me know if this is not normal behaviour for XMLSignature.sign(), maybe I'm doing something wrong. Ideally this namespace information would just go in the WSMethod1 element and the subelements would inherit it. A similar question was asked here http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] org&msgId=764054 but there were no replies. Any help would be appreciated. Thanks, Jasmin