Simon Laws wrote:

Hi Bentley

Some comments/questions below

Regards

Simon

On Nov 21, 2007 7:04 PM, Bentley Johnson <[EMAIL PROTECTED]> wrote:


It seems that both the default SCA binding for Remotable Interfaces and
the
basic WS binding are being restricted to the services following the
wrapper


It certainly use doc/lit/wrapped by default and WSDL generated by Tuscany
Java2WSDL will use this style.  The SCA WebService spec says that, when the
web services binding points to separately authored WSDL files, it allows
anything that is valid in the WSDL binding. I can't guarantee that this
actually works at the moment as I would need to try it but the
specifications intention is that it is supported.


style. This is being set within the
org.apache.tuscany.sca.binding.ws.axis2.Java2WSDLHelper class in the
createWSDLInterfaceContract method. From my understanding, this implies
that
all methods in the service must have a return type that is not void and
that


You should be able to have a void return type. There is an itest that shows
an example (
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/itest/ws-void-args-return/
)


overloaded methods are not allowed.


 Do you mean WSDL operations with the same name but with different
parameters?


Is there a way to set it to not use the wrapper style or is it just the
standard that is used by the SCA binding and must be followed?


I think the intention is that any web services communications that go on
under Tuscany's control, e.g. where the remote version of the SCA binding is
in use, choose the doc/lit/wrapped style and stick with that. If alternative
styles are required then this would be configured using a
separately/manually authored WSDL to describe what style is required.  I
would imagine this would very likely to be the case if SCA is configured to
talk to web services that are provided by other, non-SCA, systems. Here you
would expect to be able to get the WSDL from the service provided. Do you
have a scenario that requires the use of something other than the
doc/lit/wrapped style in the case that one SCA component is talking to
another SCA component with the same domain?

I checked the SCA specs to see what they say about this.  The Web Service
binding spec says that generated Java interfaces are document/literal.
The Java Annotations and APIs spec says that Java interfaces are mapped
to WSDL using JAX-WS rules.  The JAX-WS spec says that Java to WSDL
mappings can be document literal, document bare, or RPC.  Putting all
these together, the valid options for an SCA implementation mapping Java
to WSDL over the Web Service binding are document literal and document bare.

The document bare mapping of JAX-WS has the following limitations:
  In order to qualify for use of bare mapping mode a Java method must
  fulfill all of the following criteria:
  1. It must have at most one in or in/out non-header parameter.
  2. If it has a return type other than void it must have no in/out or
     out non-header parameters.
  3. If it has a return type of void it must have at most one in/out or
     out non-header parameter.

Tuscany currently only supports document literal for the automatic
Java to WSDL mapping.  Since document bare mapping has more limitations
than document literal mapping, I'm not sure why it would make sense to
add this as an option.  If there is a use case that requires document
bare as an automatic mapping, Tuscany could support the
javax.jws.SOAPBinding annotation to allow this to be specified.

Regarding method overloading, the JAX-WS spec requires implementations
to support the use of the javax.jws.WebMethod annotation to
disambiguate overloaded Java method names when mapped to WSDL.
I am not sure whether Tuscany currently supports this annotation
for the automatic Java to WSDL mapping.  If it doesn't, this support
should be added.

  Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to