On Sat, 2007-09-22 at 20:28 +0100, Andrew Dinn wrote:
> Hi Thomas,
>
> I am aware of the existence of the JaxWS sample programs and how they
> behave. I emailed you in order to elicit i) your interpretation of the
> JaxWS 2.0 spec and ii) an explanation of why your latest JaxWS
> implementation is behaving the way it does with *my* test program. Your
> unit tests do indeed exercise the code which handles client and
> server-side exceptions. However, they do not correspond to the case I am
> faced with and do not resolve the question I am asking. Perhaps you
> would allow me to explain once again what is at stake.
>
> I am currently trying to make the JBossTS XTS implementation operate
> over your JBossWS native soap stack rather than employ Kevin Connor's
> home-grown soap stack. I am hoping to be able to use JaxWS for this
> purpose, generating the server and client code from the WSDL. I face an
> interesting challenge because, for example, the WSCOOR 1.0 WSDL employs
> several pairs of related *one-way* methods with no fault handling
> defined i.e. the pairs of WSDL operations specify an <input/> message
> but no <output/> and no <fault/> message. In order to interoperate with
> other implementations I must conform to the WSDL defined by the WSCOOR
> protocol. I am not at liberty to add my own fault messages to the WSDL.
> Nor am I at liberty to add extra operations in order to notify faults.
>
> When I generate the interface and server stub code the corresponding web
> methods are tagged with an @OneWay annotation. My question regarding the
> spec is very simple: what is meant to happen if the implementation of
> such a one way method throws a SoapFaultException, a ProtocolException
> or some other Exception? Is the JaxWS implementation supposed to throw a
> corresponding exception in the client context? The sections of the spec
> I cited in my original post do not make the answer clear.
No, it can not, it violates the WS-I BP 1.0 which JAX-WS conforms to:
http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement1...
"R2714 - For one-way operations, an INSTANCE MUST NOT return a HTTP
response that contains a SOAP envelope. Specifically, the HTTP response
entity-body must be empty."
That said, you can still present a different WSDL to a consumer than the
semantic one in operation. Just removing @OneWay should do the trick If
a XTS endpoint returns SOAP responses, then it really is a two-way endpoint.
-Jason