Java Code Examples for com.sun.xml.internal.ws.model.ParameterImpl#getIndex()

The following examples show how to use com.sun.xml.internal.ws.model.ParameterImpl#getIndex() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BodyBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 2
Source File: EndpointResponseMessageBuilder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 3
Source File: ValueSetter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example 4
Source File: BodyBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 5
Source File: EndpointValueSetter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
    }
}
 
Example 6
Source File: BodyBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 7
Source File: MessageFiller.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 8
Source File: EndpointResponseMessageBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 9
Source File: EndpointValueSetter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
    }
}
 
Example 10
Source File: BodyBuilder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 11
Source File: ValueSetter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example 12
Source File: MessageFiller.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 13
Source File: MessageFiller.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 14
Source File: BodyBuilder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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);
    }
}
 
Example 15
Source File: WSDLGenerator.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
     * 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 generateDocumentParameterOrder(Operation operation, JavaMethodImpl method) {
        String partName;
        StringBuilder paramOrder = new StringBuilder();
        Set<String> partNames = new HashSet<String>();
        List<ParameterImpl> sortedParams = sortMethodParameters(method);
//        boolean isWrapperStyle = isWrapperStyle(method);
        int i = 0;
        for (ParameterImpl parameter : sortedParams) {
//            System.out.println("param: "+parameter.getIndex()+" name: "+parameter.getName().getLocalPart());
            if (parameter.getIndex() < 0)
                continue;

            // This should be safe change. if it affects compatibility,
            // remove the following single statement and uncomment the code in block below.
            partName = parameter.getPartName();
            /*
            if (isWrapperStyle && isBodyParameter(parameter)) {
               System.out.println("isWrapper and is body");
                if (method.getRequestParameters().contains(parameter))
                    partName = PARAMETERS;
                else {
                    //Rama: don't understand this logic "Response" below,

                    // really make sure this is a wrapper style wsdl we are creating
                    partName = RESPONSE;
                }
            } else {
               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());
        }
    }
 
Example 16
Source File: ValueGetterFactory.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
ValueGetter get(ParameterImpl p) {
    return (p.getMode()== WebParam.Mode.IN || p.getIndex() == -1)
            ? ValueGetter.PLAIN : ValueGetter.HOLDER;
}
 
Example 17
Source File: BodyBuilder.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link BodyBuilder} from a bare parameter.
 */
Bare(ParameterImpl p, SOAPVersion soapVersion, ValueGetter getter) {
    super(p.getXMLBridge(), soapVersion);
    this.methodPos = p.getIndex();
    this.getter = getter;
}
 
Example 18
Source File: WSDLGenerator.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
     * 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 generateDocumentParameterOrder(Operation operation, JavaMethodImpl method) {
        String partName;
        StringBuilder paramOrder = new StringBuilder();
        Set<String> partNames = new HashSet<String>();
        List<ParameterImpl> sortedParams = sortMethodParameters(method);
//        boolean isWrapperStyle = isWrapperStyle(method);
        int i = 0;
        for (ParameterImpl parameter : sortedParams) {
//            System.out.println("param: "+parameter.getIndex()+" name: "+parameter.getName().getLocalPart());
            if (parameter.getIndex() < 0)
                continue;

            // This should be safe change. if it affects compatibility,
            // remove the following single statement and uncomment the code in block below.
            partName = parameter.getPartName();
            /*
            if (isWrapperStyle && isBodyParameter(parameter)) {
               System.out.println("isWrapper and is body");
                if (method.getRequestParameters().contains(parameter))
                    partName = PARAMETERS;
                else {
                    //Rama: don't understand this logic "Response" below,

                    // really make sure this is a wrapper style wsdl we are creating
                    partName = RESPONSE;
                }
            } else {
               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());
        }
    }
 
Example 19
Source File: EndpointResponseMessageBuilder.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link EndpointResponseMessageBuilder} from a bare parameter.
 */
public Bare(ParameterImpl p, SOAPVersion soapVersion) {
    super(p.getXMLBridge(), soapVersion);
    this.methodPos = p.getIndex();
    this.getter = ValueGetter.get(p);
}
 
Example 20
Source File: BodyBuilder.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link BodyBuilder} from a bare parameter.
 */
Bare(ParameterImpl p, SOAPVersion soapVersion, ValueGetter getter) {
    super(p.getXMLBridge(), soapVersion);
    this.methodPos = p.getIndex();
    this.getter = getter;
}