You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Chris McClelland (JIRA)" <ji...@apache.org> on 2007/08/05 00:27:53 UTC

[jira] Created: (CXF-884) Services using built-in types don't honour the @WebParam and @WebResult annotations' targetNamespace properties

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.


[jira] Updated: (CXF-884) Services using built-in types don't honour the @WebParam and @WebResult annotations' targetNamespace properties

Posted by "Chris McClelland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris McClelland updated CXF-884:
---------------------------------

      Priority: Trivial  (was: Minor)
    Issue Type: Wish  (was: Bug)

Lowered priority; changed to 'wish'.

> 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: Wish
>    Affects Versions: 2.1
>         Environment: Linux, SunJDK 1.6.0_01
>            Reporter: Chris McClelland
>            Priority: Trivial
>             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.


[jira] Commented: (CXF-884) Services using built-in types don't honour the @WebParam and @WebResult annotations' targetNamespace properties

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Resolved: (CXF-884) Services using built-in types don't honour the @WebParam and @WebResult annotations' targetNamespace properties

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-884.
-----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.1)
                   2.0.4
         Assignee: Daniel Kulp


In 2.0.4, we now can honor the information in the package-info.java as to whether the schema should be qualified or not.



> 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: Wish
>    Affects Versions: 2.1
>         Environment: Linux, SunJDK 1.6.0_01
>            Reporter: Chris McClelland
>            Assignee: Daniel Kulp
>            Priority: Trivial
>             Fix For: 2.0.4
>
>
> 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.


[jira] Commented: (CXF-884) Services using built-in types don't honour the @WebParam and @WebResult annotations' targetNamespace properties

Posted by "Chris McClelland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517736 ] 

Chris McClelland commented on CXF-884:
--------------------------------------

Doh. You're right. A config setting would be nice though.


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