本文整理汇总了Java中com.sun.xml.internal.ws.spi.db.WrapperComposite类的典型用法代码示例。如果您正苦于以下问题:Java WrapperComposite类的具体用法?Java WrapperComposite怎么用?Java WrapperComposite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WrapperComposite类属于com.sun.xml.internal.ws.spi.db包,在下文中一共展示了WrapperComposite类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildWrapperComposite
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
/**
* Packs a bunch of arguments into a {@link WrapperComposite}.
*/
protected WrapperComposite buildWrapperComposite(Object[] methodArgs) {
WrapperComposite cs = new WrapperComposite();
cs.bridges = parameterBridges;
cs.values = new Object[parameterBridges.length];
// fill in wrapped parameters from methodArgs
for( int i=indices.length-1; i>=0; i-- ) {
Object arg = getters[i].get(methodArgs[indices[i]]);
if(arg==null) {
throw new WebServiceException("Method Parameter: "+
children.get(i).getName()+" cannot be null. This is BP 1.1 R2211 violation.");
}
cs.values[i] = arg;
}
return cs;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:BodyBuilder.java
示例2: DocLit
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的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
示例3: buildWrapperComposite
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
/**
* Packs a bunch of arguments intoa {@link WrapperComposite}.
*/
WrapperComposite buildWrapperComposite(Object[] methodArgs, Object returnValue) {
WrapperComposite cs = new WrapperComposite();
cs.bridges = parameterBridges;
cs.values = new Object[parameterBridges.length];
// fill in wrapped parameters from methodArgs
for( int i=indices.length-1; i>=0; i-- ) {
Object v;
if (indices[i] == -1) {
v = getters[i].get(returnValue);
} else {
v = getters[i].get(methodArgs[indices[i]]);
}
if(v==null) {
throw new WebServiceException("Method Parameter: "+
children.get(i).getName() +" cannot be null. This is BP 1.1 R2211 violation.");
}
cs.values[i] = v;
}
return cs;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:EndpointResponseMessageBuilder.java
示例4: fillTypes
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
@Override
void fillTypes(List<TypeInfo> types) {
super.fillTypes(types);
if(WrapperComposite.class.equals(getTypeInfo().type)) {
for (ParameterImpl p : wrapperChildren) p.fillTypes(types);
}
// if(getParent().getBinding().isRpcLit()) {
// // for rpc/lit, we need to individually marshal/unmarshal wrapped values,
// // so their TypeReference needs to be collected
//// assert getTypeReference().type==CompositeStructure.class;
// for (ParameterImpl p : wrapperChildren)
// p.fillTypes(types);
// }
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WrapperParameter.java
示例5: getRequestWrapperClass
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
private Class getRequestWrapperClass(String className, Method method, QName reqElemName) {
ClassLoader loader = (classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader;
try {
return loader.loadClass(className);
} catch (ClassNotFoundException e) {
if (noWrapperGen()) return WrapperComposite.class;
logger.fine("Dynamically creating request wrapper Class " + className);
return WrapperBeanGenerator.createRequestWrapperBean(className, method, reqElemName, loader);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:RuntimeModeler.java
示例6: getResponseWrapperClass
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
private Class getResponseWrapperClass(String className, Method method, QName resElemName) {
ClassLoader loader = (classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader;
try {
return loader.loadClass(className);
} catch (ClassNotFoundException e) {
if (noWrapperGen()) return WrapperComposite.class;
logger.fine("Dynamically creating response wrapper bean Class " + className);
return WrapperBeanGenerator.createResponseWrapperBean(className, method, resElemName, loader);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:RuntimeModeler.java
示例7: getItemType
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
public TypeInfo getItemType() {
if (itemTypeInfo != null) return itemTypeInfo;
//RpcLit cannot inline repeated element in wrapper
if (parent.getBinding().isRpcLit() || wrapper == null) return null;
//InlinedRepeatedElementBridge is only used for dynamic wrapper (no wrapper class)
if (!WrapperComposite.class.equals(wrapper.getTypeInfo().type)) return null;
if (!getBinding().isBody()) return null;
itemTypeInfo = typeInfo.getItemType();
return itemTypeInfo;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:ParameterImpl.java
示例8: DocLit
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的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:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:EndpointResponseMessageBuilder.java
示例9: newContext
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
@Override
public BindingContext newContext(BindingInfo bi) {
Class[] classes = bi.contentClasses().toArray(new Class[bi.contentClasses().size()]);
for (int i = 0; i < classes.length; i++) {
if (WrapperComposite.class.equals(classes[i])) {
classes[i] = CompositeStructure.class;
}
}
Map<TypeInfo, TypeReference> typeInfoMappings = typeInfoMappings(bi.typeInfos());
Map<Class, Class> subclassReplacements = bi.subclassReplacements();
String defaultNamespaceRemap = bi.getDefaultNamespace();
Boolean c14nSupport = (Boolean) bi.properties().get("c14nSupport");
RuntimeAnnotationReader ar = (RuntimeAnnotationReader) bi.properties().get("com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader");
JAXBContextFactory jaxbContextFactory = (JAXBContextFactory) bi.properties().get(JAXBContextFactory.class.getName());
try {
JAXBRIContext context = (jaxbContextFactory != null)
? jaxbContextFactory.createJAXBContext(
bi.getSEIModel(),
toList(classes),
toList(typeInfoMappings.values()))
: ContextFactory.createContext(
classes, typeInfoMappings.values(),
subclassReplacements, defaultNamespaceRemap,
(c14nSupport != null) ? c14nSupport : false,
ar, false, false, false);
return new JAXBRIContextWrapper(context, typeInfoMappings);
} catch (Exception e) {
throw new DatabindingException(e);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:JAXBRIContextFactory.java
示例10: typeInfoMappings
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
private Map<TypeInfo, TypeReference> typeInfoMappings(Collection<TypeInfo> typeInfos) {
Map<TypeInfo, TypeReference> map = new java.util.HashMap<TypeInfo, TypeReference>();
for (TypeInfo ti : typeInfos) {
Type type = WrapperComposite.class.equals(ti.type) ? CompositeStructure.class : ti.type;
TypeReference tr = new TypeReference(ti.tagName, type, ti.annotations);
map.put(ti, tr);
}
return map;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:JAXBRIContextFactory.java
示例11: createBridge
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
@Override
public XMLBridge createBridge(TypeInfo ti) {
TypeReference tr = typeRefs.get(ti);
com.sun.xml.internal.bind.api.Bridge b = context.createBridge(tr);
return WrapperComposite.class.equals(ti.type)
? new WrapperBridge(this, b)
: new BridgeWrapper(this, b);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:JAXBRIContextWrapper.java
示例12: convert
import com.sun.xml.internal.ws.spi.db.WrapperComposite; //导入依赖的package包/类
static CompositeStructure convert(Object o) {
WrapperComposite w = (WrapperComposite) o;
CompositeStructure cs = new CompositeStructure();
cs.values = w.values;
cs.bridges = new Bridge[w.bridges.length];
for (int i = 0; i < cs.bridges.length; i++) {
cs.bridges[i] = ((BridgeWrapper) w.bridges[i]).getBridge();
}
return cs;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:WrapperBridge.java
注:本文中的com.sun.xml.internal.ws.spi.db.WrapperComposite类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论