Bug 780584 (SOA-3024)

Summary: Backport fix for org.w3c.dom.DOMException when creating dispatch with EPR
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Kyle Lape <kyle.lape>
Component: JBossWSAssignee: Kyle Lape <kyle.lape>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0.2   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-3024
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-01 15:17:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kyle Lape 2011-04-11 21:11:45 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000006Jpiy&sfdc.override=1
project_key: SOA

0:40:43,972 INFO [STDOUT] WS ADDR=<?xml version="1.0"
encoding="UTF-8" standalone="yes"?><EndpointReference
xmlns="http://www.w3.org/2005/08/addressing"><Address>http://localhost:8080/Quickstart_bpel_simple_invoke/HelloWorldWS</Address><Metadata><wsam:ServiceName
EndpointName="HelloWorldPort" xmlns="http://simple_invoke/helloworld"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">HelloWorldWSService</wsam:ServiceName></Metadata></EndpointReference>
10:40:44,153 ERROR [HandlerChainExecutor] Exception during handler
processing
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a
different document than the one that created it.
at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown
Source)
at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
at org.jboss.ws.core.soap.NodeImpl.appendChild(NodeImpl.java:481)
at
org.jboss.ws.core.soap.SOAPHeaderImpl.appendChild(SOAPHeaderImpl.java:198)
at
org.jboss.ws.core.soap.SOAPElementImpl.addChildElement(SOAPElementImpl.java:264)
at
org.jboss.ws.core.soap.SOAPHeaderImpl.addChildElement(SOAPHeaderImpl.java:70)
at
org.jboss.ws.core.soap.SOAPElementImpl.addChildElement(SOAPElementImpl.java:233)
at
org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl.writeHeaders(SOAPAddressingPropertiesImpl.java:267)
at
org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler.handleOutbound(WSAddressingClientHandler.java:139)
at
org.jboss.wsf.common.handler.GenericHandler.handleMessage(GenericHandler.java:53)
at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:328)
at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:146)
at
org.jboss.ws.core.jaxws.client.DispatchImpl.callRequestHandlerChain(DispatchImpl.java:640)
at
org.jboss.ws.core.jaxws.client.DispatchImpl.invokeInternalSOAP(DispatchImpl.java:256)
at
org.jboss.ws.core.jaxws.client.DispatchImpl.invokeInternal(DispatchImpl.java:180)
at
org.jboss.ws.core.jaxws.client.DispatchImpl.invoke(DispatchImpl.java:147)
at
org.jboss.soa.bpel.runtime.ws.WebServiceClient$TwoWayCallable$1.call(WebServiceClient.java:355)
at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:289)
at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:246)
at
org.jboss.soa.bpel.runtime.ws.WebServiceClient$TwoWayCallable.call(WebServiceClient.java:231)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


Only thing I am doing is:

org.apache.ode.bpel.iapi.EndpointReference
odeepr=mex.getEndpointReference();
javax.xml.ws.EndpointReference epr=null;

if (odeepr != null) {
if (odeepr instanceof org.apache.ode.bpel.epr.URLEndpoint) {
org.apache.ode.bpel.epr.URLEndpoint
url=(org.apache.ode.bpel.epr.URLEndpoint)odeepr;

javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder builder=
new javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder();

epr = builder.address(url.getUrl())
.serviceName(serviceName)
.endpointName(port)
.build();

System.out.println("WS ADDR="+epr);

Creating the EPR from the ODE endpoint reference, and then

if (epr != null) {
dispatcher = service.createDispatch(
epr,
SOAPMessage.class,
Service.Mode.MESSAGE,
new javax.xml.ws.soap.AddressingFeature()
);

Comment 1 Kyle Lape 2011-04-11 21:11:46 UTC
Link: Added: This issue Cloned from JBPAPP-6285


Comment 2 Kyle Lape 2011-04-11 21:19:50 UTC
Docs QE Status: Removed: NEW 


Comment 3 Kyle Lape 2011-04-11 21:25:46 UTC
Link: Added: This issue incorporates JBPAPP-6285


Comment 4 Kyle Lape 2011-04-14 19:15:11 UTC
Link: Added: This issue Cloned to SOA-3027


Comment 5 Kyle Lape 2011-06-01 15:17:51 UTC
The EAP backport of this fix is sufficient.