style
Style.DOCUMENT (default)
Style.RPC
Specifies the style of the SOAP message. If RPC style is specified, each message part within the SOAP body is a parameter or return value and appears inside a wrapper element within the soap:body element. The message parts within the wrapper
element correspond to operation parameters and must appear in the same order as the parameters in the operation. If DOCUMENT style is specified, the contents of the SOAP body must be a valid XML document, but its form is not as tightly constrained.
use
Use.LITERAL (default)
Use.ENCODED
Specifies how the data of the SOAP message is streamed.
parameterStyle
ParameterStyle.BARE
ParameterStyle.WRAPPED
(default)
Specifies how the method parameters, which correspond to message parts in a WSDL contract, are placed into the SOAP message body. If BARE is specified, each parameter is placed into the message body as a child element of the message root. If
WRAPPED is specified, all of the input parameters are wrapped into a single element on a request message and all of the output parameters are wrapped into a single element in the response message.
import javax.jws.*;
import javax.xml.ws.*;
import javax.jws.soap.*;
import javax.jws.soap.SOAPBinding.*;
import javax.jws.WebParam.*;
@WebService(targetNamespace="http://demo.fusesource.com",
name="quoteReporter")
@SOAPBinding(style=Style.RPC, use=Use.LITERAL)
public interface quoteReporter
{
@WebMethod(operationName="getStockQuote")
@RequestWrapper(targetNamespace="http://demo.fusesource.com/types",
className="java.lang.String")
@ResponseWrapper(targetNamespace="http://demo.fusesource.com/types",
className="org.eric.demo.Quote")
@WebResult(targetNamespace="http://demo.fusesource.com/types",
name="updatedQuote")
public Quote getQuote(
@WebParam(targetNamespace="http://demo.fusesource.com/types",
name="stockTicker",
mode=Mode.IN)
String ticker
);
}
Style.DOCUMENT (default)
Style.RPC
Specifies the style of the SOAP message. If RPC style is specified, each message part within the SOAP body is a parameter or return value and appears inside a wrapper element within the soap:body element. The message parts within the wrapper
element correspond to operation parameters and must appear in the same order as the parameters in the operation. If DOCUMENT style is specified, the contents of the SOAP body must be a valid XML document, but its form is not as tightly constrained.
use
Use.LITERAL (default)
Use.ENCODED
Specifies how the data of the SOAP message is streamed.
parameterStyle
ParameterStyle.BARE
ParameterStyle.WRAPPED
(default)
Specifies how the method parameters, which correspond to message parts in a WSDL contract, are placed into the SOAP message body. If BARE is specified, each parameter is placed into the message body as a child element of the message root. If
WRAPPED is specified, all of the input parameters are wrapped into a single element on a request message and all of the output parameters are wrapped into a single element in the response message.
- Use.ENCODED is not currently supported.
- If you set the style to RPC you must use the WRAPPED parameter style.
import javax.jws.*;
import javax.xml.ws.*;
import javax.jws.soap.*;
import javax.jws.soap.SOAPBinding.*;
import javax.jws.WebParam.*;
@WebService(targetNamespace="http://demo.fusesource.com",
name="quoteReporter")
@SOAPBinding(style=Style.RPC, use=Use.LITERAL)
public interface quoteReporter
{
@WebMethod(operationName="getStockQuote")
@RequestWrapper(targetNamespace="http://demo.fusesource.com/types",
className="java.lang.String")
@ResponseWrapper(targetNamespace="http://demo.fusesource.com/types",
className="org.eric.demo.Quote")
@WebResult(targetNamespace="http://demo.fusesource.com/types",
name="updatedQuote")
public Quote getQuote(
@WebParam(targetNamespace="http://demo.fusesource.com/types",
name="stockTicker",
mode=Mode.IN)
String ticker
);
}
Comments
Post a Comment