[ 
https://issues.apache.org/jira/browse/TUSCANY-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645823#action_12645823
 ] 

Ralph Mietzner commented on TUSCANY-2645:
-----------------------------------------

I have the same issue. It also applies to the test-case itest-bpel-helloworld-ws

The problem seems to be that the "marshall" method in the Class 
BPELExtensionHandler.java in tuscany-interface-wsdl-xml uses the toString() 
method of the QName of the partnerLinkType name. The toString() method then 
serializes the partnerLinkType as shown above.

Other issues with this method:
The role elements are missing the / at the end of the tag.

The portTypes are also serialized using the "toString()" method.

A quick hack to solve this would be to replace the method content with 
something like:

                writer.println("<" + "plnk" + ":" + theType.getLocalPart() + " 
name=\""
                                + thePLinkType.getName() + "\" " + 
"xmlns:plnk=\""
                                + theType.getNamespaceURI() + "\">");
                for (int i = 0; i < 2; i++) {
                        if (thePLinkType.getRoleName(i) != null) {
                                writer.println("<" + "plnk" + ":role" + " 
name=\""
                                                + thePLinkType.getRoleName(i) + 
"\" portType=\""
                                                + 
thePLinkType.getRolePortType(i).getPrefix() + ":"
                                                + 
thePLinkType.getRolePortType(i).getLocalPart()
                                                + "\"/>");
                        } // end if
                } // end for

This seems to work for me. (As I said this is a quick hack that I did to verify 
if it was really a problem in this class)

> Problems with XMLOutput/InputFactory and Namespace prefixes
> -----------------------------------------------------------
>
>                 Key: TUSCANY-2645
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2645
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.3
>            Reporter: Tobias Arnold
>             Fix For: Java-SCA-Next
>
>
> For example this part of a wsdl file:
> <plnk:partnerLinkType name="HelloPartnerLinkType">
> is trasformed to
> <{http://schemas.xmlsoap.org/ws/2004/03/partner-link/}partnerLinkType 
> name="HelloPartnerLinkType">
> which is malformed.
> The problem occurs for example if you try to use the web service of the 
> helloworld-bepl-example.
> I have the same problem when I try to write an sca composite file via the 
> XMLOutputFactory. So I think it's a general Problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to