[ 
https://issues.apache.org/jira/browse/CXF-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517735
 ] 

Daniel Kulp commented on CXF-884:
---------------------------------


This falls into a "Won't Fix" and "Working as designed" categories (although I 
happen to agree with you).

If you look at the wsdl that is generated from that class, the schema is 
elementFormDefault="unqualified".   This is exactly what the JAX-WS reference 
implementation does and due to the way the JAX-WS TCK works, it's nothing we 
can do anything about.   We have to do it the same way.

Basically, the targetNamespace attribute dictates what namespace the stuff is 
generated into when generating the WSDL/Schemas.   It doesn't dictate anything 
about whether it's qualified or unqualified.  We probably could add a 
property/flag or something to force it into a "qualified" schema.



> Services using built-in types don't honour the @WebParam and @WebResult 
> annotations' targetNamespace properties
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-884
>                 URL: https://issues.apache.org/jira/browse/CXF-884
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: Linux, SunJDK 1.6.0_01
>            Reporter: Chris McClelland
>            Priority: Minor
>             Fix For: 2.1
>
>
> You'd expect to be able to call a service with an SEI like this:
> @WebService
> public interface HelloWorld {
>   @WebResult(targetNamespace="http://foo.com";, name="Result")
>   String sayHi(
>     @WebParam(targetNamespace="http://foo.com";, name="A")
>     String text);
> }
> with a message like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soap:Body>
>     <sayHi xmlns="http://foo.com";>
>       <A>Dan</A>
>     </sayHi>
>   </soap:Body>
> </soap:Envelope>
> ...and get a result like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soap:Body>
>     <sayHiResponse xmlns="http://foo.com";>
>       <Result>Hello Dan</Result>
>     </sayHiResponse>
>   </soap:Body>
> </soap:Envelope>
> But unfortunately one has to call it like this ('sayHi' is in the 
> http://foo.com namespace, but 'A' is in the default namespace):
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soap:Body>
>     <ns1:sayHi xmlns:ns1="http://foo.com";>
>       <A>Dan</A>
>     </ns1:sayHi>
>   </soap:Body>
> </soap:Envelope>
> And the response comes back like this ('sayHi' is in the http://foo.com 
> namespace, but 'Result' is in the default namespace):
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soap:Body>
>     <ns2:sayHiResponse xmlns:ns2="http://foo.com";>
>       <Result>Hello Dan</Result>
>     </ns2:sayHiResponse>
>   </soap:Body>
> </soap:Envelope>

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