本文整理汇总了Java中com.sun.xml.internal.ws.model.ParameterImpl类的典型用法代码示例。如果您正苦于以下问题:Java ParameterImpl类的具体用法?Java ParameterImpl怎么用?Java ParameterImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParameterImpl类属于com.sun.xml.internal.ws.model包,在下文中一共展示了ParameterImpl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createAttachmentBuilder
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Creates an AttachmentBuilder based on the parameter type
*
* @param param
* runtime Parameter that abstracts the annotated java parameter
* @param setter
* specifies how the obtained value is set into the argument. Takes
* care of Holder arguments.
*/
public static ResponseBuilder createAttachmentBuilder(ParameterImpl param, ValueSetter setter) {
Class type = (Class)param.getTypeInfo().type;
if (DataHandler.class.isAssignableFrom(type)) {
return new DataHandlerBuilder(param, setter);
} else if (byte[].class==type) {
return new ByteArrayBuilder(param, setter);
} else if(Source.class.isAssignableFrom(type)) {
return new SourceBuilder(param, setter);
} else if(Image.class.isAssignableFrom(type)) {
return new ImageBuilder(param, setter);
} else if(InputStream.class==type) {
return new InputStreamBuilder(param, setter);
} else if(isXMLMimeType(param.getBinding().getMimeType())) {
return new JAXBBuilder(param, setter);
} else if(String.class.isAssignableFrom(type)) {
return new StringBuilder(param, setter);
} else {
throw new UnsupportedOperationException("Unexpected Attachment type ="+type);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:ResponseBuilder.java
示例2: generateRpcParameterOrder
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Generates the parameterOrder for a PortType operation
* @param operation the operation to generate the parameterOrder for
* @param method the {@link JavaMethod} to generate the parameterOrder from
*/
protected void generateRpcParameterOrder(Operation operation, JavaMethodImpl method) {
String partName;
StringBuilder paramOrder = new StringBuilder();
Set<String> partNames = new HashSet<String>();
List<ParameterImpl> sortedParams = sortMethodParameters(method);
int i = 0;
for (ParameterImpl parameter : sortedParams) {
if (parameter.getIndex() >= 0) {
partName = parameter.getPartName();
if (!partNames.contains(partName)) {
if (i++ > 0)
paramOrder.append(' ');
paramOrder.append(partName);
partNames.add(partName);
}
}
}
if (i > 1) {
operation.parameterOrder(paramOrder.toString());
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:WSDLGenerator.java
示例3: DocLit
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Creates a {@link BodyBuilder} from a {@link WrapperParameter}.
*/
DocLit(WrapperParameter wp, SOAPVersion soapVersion, ValueGetterFactory getter) {
super(wp, soapVersion, getter);
bindingContext = wp.getOwner().getBindingContext();
wrapper = (Class)wp.getXMLBridge().getTypeInfo().type;
dynamicWrapper = WrapperComposite.class.equals(wrapper);
parameterBridges = new XMLBridge[children.size()];
accessors = new PropertyAccessor[children.size()];
for( int i=0; i<accessors.length; i++ ) {
ParameterImpl p = children.get(i);
QName name = p.getName();
if (dynamicWrapper) {
parameterBridges[i] = children.get(i).getInlinedRepeatedElementBridge();
if (parameterBridges[i] == null) parameterBridges[i] = children.get(i).getXMLBridge();
} else {
try {
accessors[i] = p.getOwner().getBindingContext().getElementPropertyAccessor(
wrapper, name.getNamespaceURI(), name.getLocalPart() );
} catch (JAXBException e) {
throw new WebServiceException( // TODO: i18n
wrapper+" do not have a property of the name "+name,e);
}
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:BodyBuilder.java
示例4: createAttachmentBuilder
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Creates an AttachmentBuilder based on the parameter type
*
* @param param
* runtime Parameter that abstracts the annotated java parameter
* @param setter
* specifies how the obtained value is set into the argument. Takes
* care of Holder arguments.
*/
public static EndpointArgumentsBuilder createAttachmentBuilder(ParameterImpl param, EndpointValueSetter setter) {
Class type = (Class)param.getTypeInfo().type;
if (DataHandler.class.isAssignableFrom(type)) {
return new DataHandlerBuilder(param, setter);
} else if (byte[].class==type) {
return new ByteArrayBuilder(param, setter);
} else if(Source.class.isAssignableFrom(type)) {
return new SourceBuilder(param, setter);
} else if(Image.class.isAssignableFrom(type)) {
return new ImageBuilder(param, setter);
} else if(InputStream.class==type) {
return new InputStreamBuilder(param, setter);
} else if(isXMLMimeType(param.getBinding().getMimeType())) {
return new JAXBBuilder(param, setter);
} else if(String.class.isAssignableFrom(type)) {
return new StringBuilder(param, setter);
} else {
throw new UnsupportedOperationException("Unknown Type="+type+" Attachment is not mapped.");
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:EndpointArgumentsBuilder.java
示例5: bodyParamNS
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
protected String bodyParamNS(ParameterImpl p) {
String nsToImport = null;
TypeInfo typeInfo = p.getItemType();
if (typeInfo == null) typeInfo = p.getTypeInfo();
QName type = model.getBindingContext().getTypeName(typeInfo);
if (type != null) {
nsToImport = type.getNamespaceURI();
} else {
if (typeInfo.type instanceof Class) {
try {
QName elemRef = model.getBindingContext().getElementName((Class)typeInfo.type);
if (elemRef != null) nsToImport = elemRef.getNamespaceURI();
} catch (JAXBException je) {
throw new WebServiceException(je.getMessage(), je);
}
}
}
return nsToImport;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:ServiceArtifactSchemaGenerator.java
示例6: splitParameters
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
protected void splitParameters(List<ParameterImpl> bodyParams, List<ParameterImpl> headerParams, List<ParameterImpl> params) {
for (ParameterImpl parameter : params) {
if (isBodyParameter(parameter)) {
bodyParams.add(parameter);
} else {
headerParams.add(parameter);
}
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:WSDLGenerator.java
示例7: generateSOAPHeaders
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
protected void generateSOAPHeaders(TypedXmlWriter writer, List<ParameterImpl> parameters, QName message) {
for (ParameterImpl headerParam : parameters) {
Header header = writer._element(Header.class);
header.message(message);
header.part(headerParam.getPartName());
header.use(LITERAL);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:WSDLGenerator.java
示例8: AttachmentFiller
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
protected AttachmentFiller(ParameterImpl param, ValueGetter getter) {
super(param.getIndex());
this.param = param;
this.getter = getter;
mimeType = param.getBinding().getMimeType();
try {
contentIdPart = URLEncoder.encode(param.getPartName(), "UTF-8")+'=';
} catch (UnsupportedEncodingException e) {
throw new WebServiceException(e);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:MessageFiller.java
示例9: createAttachmentFiller
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Creates an MessageFiller based on the parameter type
*
* @param param
* runtime Parameter that abstracts the annotated java parameter
* @param getter
* Gets a value from an object that represents a parameter passed
* as a method argument.
*/
public static MessageFiller createAttachmentFiller(ParameterImpl param, ValueGetter getter) {
Class type = (Class)param.getTypeInfo().type;
if (DataHandler.class.isAssignableFrom(type) || Source.class.isAssignableFrom(type)) {
return new DataHandlerFiller(param, getter);
} else if (byte[].class==type) {
return new ByteArrayFiller(param, getter);
} else if(isXMLMimeType(param.getBinding().getMimeType())) {
return new JAXBFiller(param, getter);
} else {
return new DataHandlerFiller(param, getter);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:MessageFiller.java
示例10: Wrapped
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
protected Wrapped(WrapperParameter wp, SOAPVersion soapVersion, ValueGetterFactory getter) {
super(wp.getXMLBridge(), soapVersion);
children = wp.getWrapperChildren();
indices = new int[children.size()];
getters = new ValueGetter[children.size()];
for( int i=0; i<indices.length; i++ ) {
ParameterImpl p = children.get(i);
indices[i] = p.getIndex();
getters[i] = getter.get(p);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:BodyBuilder.java
示例11: Wrapped
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
protected Wrapped(WrapperParameter wp, SOAPVersion soapVersion) {
super(wp.getXMLBridge(), soapVersion);
children = wp.getWrapperChildren();
indices = new int[children.size()];
getters = new ValueGetter[children.size()];
for( int i=0; i<indices.length; i++ ) {
ParameterImpl p = children.get(i);
indices[i] = p.getIndex();
getters[i] = ValueGetter.get(p);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:EndpointResponseMessageBuilder.java
示例12: Header
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
public Header(SOAPVersion soapVersion, ParameterImpl param, EndpointValueSetter setter) {
this(
soapVersion,
param.getTypeInfo().tagName,
param.getXMLBridge(),
setter);
assert param.getOutBinding()== ParameterBinding.HEADER;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:EndpointArgumentsBuilder.java
示例13: isWrapperStyle
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Determines if the <CODE>method</CODE> is wrapper style
* @param method The {@link JavaMethod} to check if it is wrapper style
* @return true if the method is wrapper style, otherwise, false.
*/
protected boolean isWrapperStyle(JavaMethodImpl method) {
if (method.getRequestParameters().size() > 0) {
ParameterImpl param = method.getRequestParameters().iterator().next();
return param.isWrapperStyle();
}
return false;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:WSDLGenerator.java
示例14: addChild
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
protected void addChild(ExplicitGroup sq, ParameterImpl param) {
TypeInfo typeInfo = param.getItemType();
boolean repeatedElement = false;
if (typeInfo == null) {
typeInfo = param.getTypeInfo();
} else {
if (typeInfo.getWrapperType() != null) typeInfo = param.getTypeInfo();
else repeatedElement = true;
}
Occurs child = addChild(sq, param.getName(), typeInfo);
if (repeatedElement && child != null) {
child.maxOccurs("unbounded");
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:ServiceArtifactSchemaGenerator.java
示例15: getSync
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Returns a {@link ValueSetter} suitable for the given {@link Parameter}.
*/
static ValueSetter getSync(ParameterImpl p) {
int idx = p.getIndex();
if(idx==-1)
return RETURN_VALUE;
if(idx<POOL.length)
return POOL[idx];
else
return new Param(idx);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:ValueSetter.java
示例16: generateSOAP12Headers
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
protected void generateSOAP12Headers(TypedXmlWriter writer, List<ParameterImpl> parameters, QName message) {
for (ParameterImpl headerParam : parameters) {
com.sun.xml.internal.ws.wsdl.writer.document.soap12.Header header = writer._element(com.sun.xml.internal.ws.wsdl.writer.document.soap12.Header.class);
header.message(message);
header.part(headerParam.getPartName());
header.use(LITERAL);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:WSDLGenerator.java
示例17: DocLit
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Creates a {@link EndpointResponseMessageBuilder} from a {@link WrapperParameter}.
*/
public DocLit(WrapperParameter wp, SOAPVersion soapVersion) {
super(wp, soapVersion);
bindingContext = wp.getOwner().getBindingContext();
wrapper = (Class)wp.getXMLBridge().getTypeInfo().type;
dynamicWrapper = WrapperComposite.class.equals(wrapper);
children = wp.getWrapperChildren();
parameterBridges = new XMLBridge[children.size()];
accessors = new PropertyAccessor[children.size()];
for( int i=0; i<accessors.length; i++ ) {
ParameterImpl p = children.get(i);
QName name = p.getName();
if (dynamicWrapper) {
parameterBridges[i] = children.get(i).getInlinedRepeatedElementBridge();
if (parameterBridges[i] == null) parameterBridges[i] = children.get(i).getXMLBridge();
} else {
try {
accessors[i] = (dynamicWrapper) ? null :
p.getOwner().getBindingContext().getElementPropertyAccessor(
wrapper, name.getNamespaceURI(), name.getLocalPart() );
} catch (JAXBException e) {
throw new WebServiceException( // TODO: i18n
wrapper+" do not have a property of the name "+name,e);
}
}
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:EndpointResponseMessageBuilder.java
示例18: get
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
/**
* Returns a {@link EndpointValueSetter} suitable for the given {@link Parameter}.
*/
public static EndpointValueSetter get(ParameterImpl p) {
int idx = p.getIndex();
if (p.isIN()) {
if (idx<POOL.length) {
return POOL[idx];
} else {
return new Param(idx);
}
} else {
return new HolderParam(idx);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:EndpointValueSetter.java
示例19: DataHandlerBuilder
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
DataHandlerBuilder(ParameterImpl param, EndpointValueSetter setter) {
super(param, setter);
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:EndpointArgumentsBuilder.java
示例20: StubHandler
import com.sun.xml.internal.ws.model.ParameterImpl; //导入依赖的package包/类
public StubHandler(JavaMethodImpl method, MessageContextFactory mcf) {
//keep all the CheckedException model for the detail qname
this.checkedExceptions = new HashMap<QName, CheckedExceptionImpl>();
for(CheckedExceptionImpl ce : method.getCheckedExceptions()){
checkedExceptions.put(ce.getBond().getTypeInfo().tagName, ce);
}
//If a non-"" soapAction is specified, wsa:action the SOAPAction
String soapActionFromBinding = method.getBinding().getSOAPAction();
if(method.getInputAction() != null && soapActionFromBinding != null && !soapActionFromBinding.equals("") ) {
this.soapAction = method.getInputAction();
} else {
this.soapAction = soapActionFromBinding;
}
this.javaMethod = method;
packetFactory = mcf;
soapVersion = javaMethod.getBinding().getSOAPVersion();
{// prepare objects for creating messages
List<ParameterImpl> rp = method.getRequestParameters();
BodyBuilder bodyBuilder = null;
List<MessageFiller> fillers = new ArrayList<MessageFiller>();
for (ParameterImpl param : rp) {
ValueGetter getter = getValueGetterFactory().get(param);
switch(param.getInBinding().kind) {
case BODY:
if(param.isWrapperStyle()) {
if(param.getParent().getBinding().isRpcLit())
bodyBuilder = new BodyBuilder.RpcLit((WrapperParameter)param, soapVersion, getValueGetterFactory());
else
bodyBuilder = new BodyBuilder.DocLit((WrapperParameter)param, soapVersion, getValueGetterFactory());
} else {
bodyBuilder = new BodyBuilder.Bare(param, soapVersion, getter);
}
break;
case HEADER:
fillers.add(new MessageFiller.Header(
param.getIndex(),
param.getXMLBridge(),
getter ));
break;
case ATTACHMENT:
fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter));
break;
case UNBOUND:
break;
default:
throw new AssertionError(); // impossible
}
}
if(bodyBuilder==null) {
// no parameter binds to body. we create an empty message
switch(soapVersion) {
case SOAP_11:
bodyBuilder = BodyBuilder.EMPTY_SOAP11;
break;
case SOAP_12:
bodyBuilder = BodyBuilder.EMPTY_SOAP12;
break;
default:
throw new AssertionError();
}
}
this.bodyBuilder = bodyBuilder;
this.inFillers = fillers.toArray(new MessageFiller[fillers.size()]);
}
this.isOneWay = method.getMEP().isOneWay();
responseBuilder = buildResponseBuilder(method, ValueSetterFactory.SYNC);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:76,代码来源:StubHandler.java
注:本文中的com.sun.xml.internal.ws.model.ParameterImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论