[jboss-svn-commits] JBL Code SVN: r20522 - labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jun 16 06:48:07 EDT 2008
Author: adinn
Date: 2008-06-16 06:48:07 -0400 (Mon, 16 Jun 2008)
New Revision: 20522
Modified:
labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/AddressingHelper.java
Log:
applied endpoint reference refparams copy workaround to all endpoints supplied as argument to initializeAsDestination - this gets round an issue in JBossWS (WS 2166) when the refparams are inserted into an outgoing soap message
Modified: labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/AddressingHelper.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/AddressingHelper.java 2008-06-16 10:47:15 UTC (rev 20521)
+++ labs/jbosstm/trunk/XTS/WS-C/dev/src11/com/arjuna/webservices11/wsaddr/AddressingHelper.java 2008-06-16 10:48:07 UTC (rev 20522)
@@ -32,10 +32,20 @@
// this allows the builder class to be redefined via a property
AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
final AddressingProperties responseProperties = builder.newAddressingProperties();
+ // ok just calling initializeAsDestination directly fails when the FaultTo/ReplyTo/From
+ // contains reference parameter elements. these get installed into the target element extensions
+ // list for insertion into the outgoing message. however, the insertion fails.
+ // JBossWS decides they can be inserted as is without copying because they are SOAP
+ // elements but this ignores the fact that they have a DOM node attached. when the
+ // appendElement is called it barfs because the target and source belong to different
+ // documents. we patch this by copying the FaultTo or ReplyTo or from here if need be.
EndpointReference epref = addressingProperties.getReplyTo();
if (isNoneAddress(epref)) {
epref = addressingProperties.getFrom();
}
+ if (!isNoneAddress(epref)) {
+ epref = patchEndpointReference(epref);
+ }
responseProperties.initializeAsDestination(epref);
responseProperties.setMessageID(makeURI(builder, messageID)) ;
@@ -60,10 +70,20 @@
// this allows the builder class to be redefined via a property
AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
final AddressingProperties responseProperties = builder.newAddressingProperties();
+ // ok just calling initializeAsDestination directly fails when the FaultTo/ReplyTo/From
+ // contains reference parameter elements. these get installed into the target element extensions
+ // list for insertion into the outgoing message. however, the insertion fails.
+ // JBossWS decides they can be inserted as is without copying because they are SOAP
+ // elements but this ignores the fact that they have a DOM node attached. when the
+ // appendElement is called it barfs because the target and source belong to different
+ // documents. we patch this by copying the FaultTo or ReplyTo or from here if need be.
EndpointReference epref = addressingProperties.getReplyTo();
if (isNoneAddress(epref)) {
epref = addressingProperties.getFrom();
}
+ if (!isNoneAddress(epref)) {
+ epref = patchEndpointReference(epref);
+ }
responseProperties.initializeAsDestination(epref);
responseProperties.setMessageID(makeURI(builder, messageID)) ;
@@ -230,10 +250,20 @@
// this allows the builder class to be redefined via a property
AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
final AddressingProperties requestProperties = builder.newAddressingProperties();
+ // ok just calling initializeAsDestination directly fails when the FaultTo/ReplyTo/From
+ // contains reference parameter elements. these get installed into the target element extensions
+ // list for insertion into the outgoing message. however, the insertion fails.
+ // JBossWS decides they can be inserted as is without copying because they are SOAP
+ // elements but this ignores the fact that they have a DOM node attached. when the
+ // appendElement is called it barfs because the target and source belong to different
+ // documents. we patch this by copying the FaultTo or ReplyTo or from here if need be.
EndpointReference epref = addressingProperties.getReplyTo();
if (isNoneAddress(epref)) {
epref = addressingProperties.getFrom();
}
+ if (!isNoneAddress(epref)) {
+ epref = patchEndpointReference(epref);
+ }
requestProperties.initializeAsDestination(epref);
if (messageID != null)
{
More information about the jboss-svn-commits
mailing list