[jboss-jira] [JBoss JIRA] Closed: (BPEL-191) automatic node creation does not preserve source prefix
Alejandro Guizar (JIRA)
jira-events at lists.jboss.org
Sun Jul 1 12:30:11 EDT 2007
[ http://jira.jboss.com/jira/browse/BPEL-191?page=all ]
Alejandro Guizar closed BPEL-191.
---------------------------------
> automatic node creation does not preserve source prefix
> -------------------------------------------------------
>
> Key: BPEL-191
> URL: http://jira.jboss.com/jira/browse/BPEL-191
> Project: JBoss jBPM BPEL
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Engine
> Affects Versions: jBPM BPEL 1.1 beta 1
> Reporter: Alejandro Guizar
> Assigned To: Alejandro Guizar
> Fix For: jBPM BPEL 1.1 beta 2
>
>
> When assigning a value to a nonexistent location, e.g.
> <assign name="AssignOutPut" xmlns:client="http://example.com/SyncSample">
> <copy>
> <from variable="InvokeBalance_queryBalance_OutputVariable" part="balance"/>
> <to variable="outputVariable" part="payload1" query="/payload1/client:result"/>
> </copy>
> </assign>
> the engine does not preserve the prefix that appears in the process definition ("client" in the above example). In fact, it does not set a prefix at all. This is not a problem per se, but may have negative consequences as described below.
> When copying an element from a variable to a SOAP envelope, if the element has a namespace but not a prefix, XmlUtil looks for the declaration of that namespace in the SOAP envelope. In extreme cases, the declaration could be placed in an ancestor of the target element, and the declared prefix be in use by another namespace in the target element.
> The following is a possible value of the payload1 part after the assignment:
> <result xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns1='urn:samples:account' xmlns='http://example.com/SyncSample' />
> The default namespace declaration results from failing to preserve the prefix. When the above element is copied to a soap envelope that already contains a declaration for the 'http://example.com/SyncSample' namespace, the declared prefix 'ns1' will be used. However, our element uses that prefix for a different namespace!! See the result below:
> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
> <env:Header/>
> <env:Body>
> <ns1:processResponse xmlns:ns1='http://example.com/SyncSample'>
> <payload1>
> <ns1:result xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns1='urn:samples:account'>50.0</ns1:result>
> </payload1>
> </ns1:processResponse>
> </env:Body>
> </env:Envelope>
> When read, the 'result' element is in the 'urn:samples:account' namespace, which leads the reader to misinterpret the result.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list