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

Simon Nash commented on TUSCANY-3778:
-------------------------------------

The 1.x fix isn't perfect either.  It doesn't generate a wrapper in the wrong 
namespace, but it uses the wrong namespace when looking up the fault message in 
the WSDL definition.  The problem is in the following code sequence:

1    Message faultMsg = definition.getMessage(faultName);
2    if (faultMsg == null) {
3        faultMsg = definition.createMessage();
4        faultMsg.setQName(new QName(namespaceURI, faultName.getLocalPart()));

The getMessage() call in line 1 uses a QName in the Java package namespace, but 
the setQName() call in line 4 uses a QName in the WSDL target namespace.  This 
should be changed so that the namespace in line 1 is consistent in line 4.


> WSDLGen problem with byte[] and Exceptions in alternative namespaces
> --------------------------------------------------------------------
>
>                 Key: TUSCANY-3778
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3778
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension
>    Affects Versions: Java-SCA-1.6.1
>         Environment: All
>            Reporter: Simon Laws
>            Assignee: Simon Nash
>             Fix For: Java-SCA-1.x
>
>
> I've just extended the HelloWorldService interface in the itest/wsdlgen with 
> two new remote methods to demonstrate two issues.
> 1/ byte[] getGreetingsByteArray(byte[] input);
> Leads to Tuscany generated types as follows:
>                       <xs:element name="getGreetingsByteArray">
>                               <xs:complexType>
>                                       <xs:sequence>
>                                               <xs:element minOccurs="0" 
> name="arg0" nillable="true"
>                                                       type="xs:byte" />
>                                       </xs:sequence>
>                               </xs:complexType>
>                       </xs:element>
> While JAXWS wsgen produces
>   <xs:complexType name="getGreetingsByteArray">
>     <xs:sequence>
>       <xs:element name="arg0" type="xs:base64Binary" nillable="true" 
> minOccurs="0"/>
>     </xs:sequence>
>   </xs:complexType>
> 2/ String getGreetingsException(String input) throws HelloWorldException;
> When HelloWorldException is in a different package when compared to the 
> service interface the wrong reference is generated in the WSDL 
>               <wsdl:operation name="getGreetingsException">
>                       <wsdl:input message="getGreetingsException">
>                       </wsdl:input>
>                       <wsdl:output message="getGreetingsExceptionResponse">
>                       </wsdl:output>
>                       <wsdl:fault name="HelloWorldException" 
> message="ns4:HelloWorldException">
>                       </wsdl:fault>
>               </wsdl:operation>
> The ns4 here is correct for the actual type but the "HelloWorldException" 
> message is declared in the WSDL so is in the WSDL target namespace and not in 
> the types target namespace. 
> Interestingly JAXWS wsgen seems to generate the exception type into the same 
> namespace as all of the other types even though it's in a separate package. 

-- 
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