You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2017/03/30 19:58:42 UTC

[jira] [Resolved] (CXF-6608) java2ws -t (target namespace) option generates invalid WSDL

     [ https://issues.apache.org/jira/browse/CXF-6608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-6608.
------------------------------
       Resolution: Not A Problem
    Fix Version/s: Invalid

Working propertly.  -t specifies the targetNamespace for the wsdl based elements.  The databinding controls the namespace and such of the types.   There currently is not a command line flag to set that as it should likely be controlled via jaxb annotations on the types or via the package-info.java annotations. 

> java2ws -t (target namespace) option generates invalid WSDL
> -----------------------------------------------------------
>
>                 Key: CXF-6608
>                 URL: https://issues.apache.org/jira/browse/CXF-6608
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 3.1.2
>            Reporter: Tadayoshi Sato
>             Fix For: Invalid
>
>         Attachments: java2ws.zip
>
>
> This command:
> {code}
> java2ws -wsdl -t urn:com.example:ws:1.0 com.example.ws.ExampleService
> {code}
> generates WSDL that contains two different namespaces for the {{tns}} ({{"urn:com.example:ws:1.0"}}) and the schema types ({{"http://ws.example.com/"}}) as follows:
> {code:xml}
> <wsdl:definitions name="ExampleService" targetNamespace="urn:com.example:ws:1.0"
>   xmlns:ns1="http://ws.example.com/" xmlns:tns="urn:com.example:ws:1.0" ...>
>   <wsdl:types>
>     <xs:schema xmlns="http://ws.example.com/" ... targetNamespace="http://ws.example.com/">
>       <xs:element name="op1" type="op1" />
>       ...
>     </xs:schema>
>   </wsdl:types>
>   <wsdl:message name="op1">
>     <wsdl:part name="parameters" element="ns1:op1">
>     </wsdl:part>
>   </wsdl:message>
>   ...
>   <wsdl:portType name="ExampleServicePortType">
>     <wsdl:operation name="op1">
>       <wsdl:input name="op1" message="ns1:op1">
>       </wsdl:input>
>       <wsdl:output name="op1Response" message="ns1:op1Response">
>       </wsdl:output>
>     </wsdl:operation>
>     ...
>   </wsdl:portType>
>   ...
> {code}
> Therefore, importing the WSDL to Eclipse shows WSDL validation errors.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)