cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-885) You cannot have some methods WRAPPED and others BARE in the same service
Date Mon, 25 Feb 2008 18:08:53 GMT

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

Daniel Kulp resolved CXF-885.
-----------------------------

    Resolution: Fixed


Resolving this issue.  I've added a test case with 4 methods (2 bare, 2 wrapped) and all four
seem to work.  This MAY have been fixed in 2.0.4, but it's definitely working on 2.1.

> You cannot have some methods WRAPPED and others BARE in the same service
> ------------------------------------------------------------------------
>
>                 Key: CXF-885
>                 URL: https://issues.apache.org/jira/browse/CXF-885
>             Project: CXF
>          Issue Type: Bug
>          Components: Soap Binding
>    Affects Versions: 2.1
>         Environment: Linux, SunJDK1.6.0_01
>            Reporter: Chris McClelland
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.1
>
>
> If I deploy a service like this:
> @WebService(targetNamespace="http://foo.com")
> public class Test {
> 	@WebMethod(operationName="Simple")
> 	@WebResult(name="SimpleResponse", targetNamespace=NS_URI)
> 	@SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
> 	public String simple(@WebParam(name="Simple") String req)
> 	{
> 		return "Hello " + req;
> 	}
> 	@WebMethod(operationName="Hello")
> 	@WebResult(name="Result")
> 	@SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
> 	public String hello(
> 		@WebParam(name="A") String a,
> 		@WebParam(name="B") String b)
> 	{
> 		return "Hello " + a + " and " + b;
> 	}
> }
> And then call the hello() method like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <req:Hello xmlns:req="http://foo.com">
>       <A>Dan</A>
>       <B>Chris</B>
>     </req:Hello>
>   </soap:Body>
> </soap:Envelope>
> ...I get this (incorrect) response:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <Result>Hello Dan and Chris</Result>
>   </soap:Body>
> </soap:Envelope>
> It's incorrect because the WSDL promises that the response will be an unqualified 'Result'
element locally-valid within an {http://foo.com}:HelloResponse element.
> Now if I switch the simple() method to WRAPPED, and try calling hello() again, I get
the correct response:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <ns1:HelloResponse xmlns:ns1="http://foo.com">
>       <Result>Hello Dan and Chris</Result>
>     </ns1:HelloResponse>
>   </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.


Mime
View raw message