Programming the JWS File 4-21
information about the MTOMXOP feature itself as well as the version of the specification supported by WebLogic JAX-RPC Web services.
4.9.2 Streaming SOAP Attachments
Using the weblogic.jws.StreamAttachments JWS annotation, you can specify that a Web service use a streaming API when reading inbound SOAP messages that
include attachments, rather than the default behavior in which the service reads the entire message into memory. This feature increases the performance of Web services
whose SOAP messages are particular large.
See weblogic.jws.StreamAttachments in the Oracle Fusion Middleware WebLogic Web Services Reference for Oracle WebLogic Server for an example of specifying that
attachments should be streamed.
4.9.3 Using SOAP 1.2
WebLogic Web services use, by default, Version 1.1 of Simple Object Access Protocol SOAP as the message format when transmitting data and invocation calls between
the Web service and its client. WebLogic Web services support both SOAP 1.1 and the newer SOAP 1.2, and you are free to use either version.
To specify that the Web service use Version 1.2 of SOAP, use the class-level weblogic.jws.Binding
annotation in your JWS file and set its single attribute to the value Binding.Type.SOAP12, as shown in the following example relevant
code shown in bold:
package examples.webservices.soap12; import javax.jws.WebMethod;
import javax.jws.WebService; import weblogic.jws.WLHttpTransport;
import weblogic.jws.Binding; WebServicename=SOAP12PortType,
serviceName=SOAP12Service, targetNamespace=http:example.org
WLHttpTransportcontextPath=soap12, serviceUri=SOAP12Service,
portName=SOAP12ServicePort BindingBinding.Type.SOAP12
This JWS file forms the basis of simple Java-class implemented WebLogic Web Service with a single operation: sayHello. The class uses SOAP 1.2
as its binding. public class SOAP12Impl {
WebMethod public String sayHelloString message {
System.out.printlnsayHello: + message; return Here is the message: + message + ;
} }
Other than set this annotation, you do not have to do anything else for the Web service to use SOAP 1.2, including changing client applications that invoke the Web service;
the WebLogic Web services run time takes care of all the rest.
See weblogic.jws.Binding in the Oracle Fusion Middleware WebLogic Web Services Reference for Oracle WebLogic Server for additional information about this annotation.
4-22 Getting Started With JAX-RPC Web Services for Oracle WebLogic Server
4.9.4 Specifying that Operations Run Inside of a Transaction