com.sun.tools.internal.ws.wsdl.document.Message Java Examples

The following examples show how to use com.sun.tools.internal.ws.wsdl.document.Message. 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: WSDLModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @param param
 * @param wrapperStyle TODO
 */
private void setCustomizedParameterName(TWSDLExtensible extension, Message msg, MessagePart part, Parameter param, boolean wrapperStyle) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(extension, JAXWSBinding.class);
    if (jaxwsBinding == null) {
        return;
    }
    String paramName = part.getName();
    QName elementName = part.getDescriptor();
    if (wrapperStyle) {
        elementName = param.getType().getName();
    }
    String customName = jaxwsBinding.getParameterName(msg.getName(), paramName, elementName, wrapperStyle);
    if (customName != null && !customName.equals("")) {
        param.setCustomName(customName);
    }
}
 
Example #2
Source File: WSDLModeler.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected boolean setMessagePartsBinding(StyleAndUse styleAndUse) {
    SOAPBody inBody = getSOAPRequestBody();
    Message inMessage = getInputMessage();
    if (!setMessagePartsBinding(inBody, inMessage, styleAndUse, true)) {
        return false;
    }

    if (isRequestResponse()) {
        SOAPBody outBody = getSOAPResponseBody();
        Message outMessage = getOutputMessage();
        if (!setMessagePartsBinding(outBody, outMessage, styleAndUse, false)) {
            return false;
        }
    }
    return true;
}
 
Example #3
Source File: WSDLModeler.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @param param
 * @param wrapperStyle TODO
 */
private void setCustomizedParameterName(TWSDLExtensible extension, Message msg, MessagePart part, Parameter param, boolean wrapperStyle) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(extension, JAXWSBinding.class);
    if (jaxwsBinding == null) {
        return;
    }
    String paramName = part.getName();
    QName elementName = part.getDescriptor();
    if (wrapperStyle) {
        elementName = param.getType().getName();
    }
    String customName = jaxwsBinding.getParameterName(msg.getName(), paramName, elementName, wrapperStyle);
    if (customName != null && !customName.equals("")) {
        param.setCustomName(customName);
    }
}
 
Example #4
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private Message getHeaderMessage(MessagePart part, TWSDLExtensible ext) {
    Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator();
    while (headers.hasNext()) {
        SOAPHeader header = headers.next();
        if (!header.isLiteral()) {
            continue;
        }
        com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(), document);
        if (headerMessage == null) {
            continue;
        }

        MessagePart headerPart = headerMessage.getPart(header.getPart());
        if (headerPart == part) {
            return headerMessage;
        }
    }
    return null;
}
 
Example #5
Source File: WSDLModeler.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @param param
 * @param wrapperStyle TODO
 */
private void setCustomizedParameterName(TWSDLExtensible extension, Message msg, MessagePart part, Parameter param, boolean wrapperStyle) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(extension, JAXWSBinding.class);
    if (jaxwsBinding == null) {
        return;
    }
    String paramName = part.getName();
    QName elementName = part.getDescriptor();
    if (wrapperStyle) {
        elementName = param.getType().getName();
    }
    String customName = jaxwsBinding.getParameterName(msg.getName(), paramName, elementName, wrapperStyle);
    if (customName != null && !customName.equals("")) {
        param.setCustomName(customName);
    }
}
 
Example #6
Source File: WSDLModeler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected boolean isSingleInOutPart(Set inputParameterNames,
                                    MessagePart outputPart) {
    // As of now, we dont have support for in/out in doc-lit. So return false.
    SOAPOperation soapOperation =
            (SOAPOperation) getExtensionOfType(info.bindingOperation,
                    SOAPOperation.class);
    if ((soapOperation != null) && (soapOperation.isDocument() || info.soapBinding.isDocument())) {
        Iterator iter = getInputMessage().parts();
        while (iter.hasNext()) {
            MessagePart part = (MessagePart) iter.next();
            if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) {
                return true;
            }
        }
    } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) {
        com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
        if (inputParameterNames.contains(outputPart.getName())) {
            if (inputMessage.getPart(outputPart.getName()).getDescriptor().equals(outputPart.getDescriptor())) {
                return true;
            }
        }
    }
    return false;
}
 
Example #7
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected boolean isSingleInOutPart(Set inputParameterNames,
                                    MessagePart outputPart) {
    // As of now, we dont have support for in/out in doc-lit. So return false.
    SOAPOperation soapOperation =
            (SOAPOperation) getExtensionOfType(info.bindingOperation,
                    SOAPOperation.class);
    if ((soapOperation != null) && (soapOperation.isDocument() || info.soapBinding.isDocument())) {
        Iterator iter = getInputMessage().parts();
        while (iter.hasNext()) {
            MessagePart part = (MessagePart) iter.next();
            if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) {
                return true;
            }
        }
    } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) {
        com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
        if (inputParameterNames.contains(outputPart.getName())) {
            if (inputMessage.getPart(outputPart.getName()).getDescriptor().equals(outputPart.getDescriptor())) {
                return true;
            }
        }
    }
    return false;
}
 
Example #8
Source File: WSDLModeler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private Message getHeaderMessage(MessagePart part, TWSDLExtensible ext) {
    Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator();
    while (headers.hasNext()) {
        SOAPHeader header = headers.next();
        if (!header.isLiteral()) {
            continue;
        }
        com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(), document);
        if (headerMessage == null) {
            continue;
        }

        MessagePart headerPart = headerMessage.getPart(header.getPart());
        if (headerPart == part) {
            return headerMessage;
        }
    }
    return null;
}
 
Example #9
Source File: WSDLModeler.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private List<MessagePart> getBodyParts(SOAPBody body, Message message) {
    String bodyParts = body.getParts();
    if (bodyParts != null) {
        List<MessagePart> partsList = new ArrayList<MessagePart>();
        StringTokenizer in = new StringTokenizer(bodyParts.trim(), " ");
        while (in.hasMoreTokens()) {
            String part = in.nextToken();
            MessagePart mPart = message.getPart(part);
            if (null == mPart) {
                error(message, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(part, message.getName()));
            }
            mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
            partsList.add(mPart);
        }
        return partsList;
    }
    return null;
}
 
Example #10
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @param param
 * @param wrapperStyle TODO
 */
private void setCustomizedParameterName(TWSDLExtensible extension, Message msg, MessagePart part, Parameter param, boolean wrapperStyle) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(extension, JAXWSBinding.class);
    if (jaxwsBinding == null) {
        return;
    }
    String paramName = part.getName();
    QName elementName = part.getDescriptor();
    if (wrapperStyle) {
        elementName = param.getType().getName();
    }
    String customName = jaxwsBinding.getParameterName(msg.getName(), paramName, elementName, wrapperStyle);
    if (customName != null && !customName.equals("")) {
        param.setCustomName(customName);
    }
}
 
Example #11
Source File: WSDLModeler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @param param
 * @param wrapperStyle TODO
 */
private void setCustomizedParameterName(TWSDLExtensible extension, Message msg, MessagePart part, Parameter param, boolean wrapperStyle) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(extension, JAXWSBinding.class);
    if (jaxwsBinding == null) {
        return;
    }
    String paramName = part.getName();
    QName elementName = part.getDescriptor();
    if (wrapperStyle) {
        elementName = param.getType().getName();
    }
    String customName = jaxwsBinding.getParameterName(msg.getName(), paramName, elementName, wrapperStyle);
    if (customName != null && !customName.equals("")) {
        param.setCustomName(customName);
    }
}
 
Example #12
Source File: WSDLModeler.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private Message getHeaderMessage(MessagePart part, TWSDLExtensible ext) {
    Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator();
    while (headers.hasNext()) {
        SOAPHeader header = headers.next();
        if (!header.isLiteral()) {
            continue;
        }
        com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(), document);
        if (headerMessage == null) {
            continue;
        }

        MessagePart headerPart = headerMessage.getPart(header.getPart());
        if (headerPart == part) {
            return headerMessage;
        }
    }
    return null;
}
 
Example #13
Source File: WSDLModeler.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
protected boolean isSingleInOutPart(Set inputParameterNames,
                                    MessagePart outputPart) {
    // As of now, we dont have support for in/out in doc-lit. So return false.
    SOAPOperation soapOperation =
            (SOAPOperation) getExtensionOfType(info.bindingOperation,
                    SOAPOperation.class);
    if ((soapOperation != null) && (soapOperation.isDocument() || info.soapBinding.isDocument())) {
        Iterator iter = getInputMessage().parts();
        while (iter.hasNext()) {
            MessagePart part = (MessagePart) iter.next();
            if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) {
                return true;
            }
        }
    } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) {
        com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
        if (inputParameterNames.contains(outputPart.getName())) {
            if (inputMessage.getPart(outputPart.getName()).getDescriptor().equals(outputPart.getDescriptor())) {
                return true;
            }
        }
    }
    return false;
}
 
Example #14
Source File: WSDLModeler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected boolean setMessagePartsBinding(StyleAndUse styleAndUse) {
    SOAPBody inBody = getSOAPRequestBody();
    Message inMessage = getInputMessage();
    if (!setMessagePartsBinding(inBody, inMessage, styleAndUse, true)) {
        return false;
    }

    if (isRequestResponse()) {
        SOAPBody outBody = getSOAPResponseBody();
        Message outMessage = getOutputMessage();
        if (!setMessagePartsBinding(outBody, outMessage, styleAndUse, false)) {
            return false;
        }
    }
    return true;
}
 
Example #15
Source File: WSDLModeler.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected boolean isSingleInOutPart(Set inputParameterNames,
                                    MessagePart outputPart) {
    // As of now, we dont have support for in/out in doc-lit. So return false.
    SOAPOperation soapOperation =
            (SOAPOperation) getExtensionOfType(info.bindingOperation,
                    SOAPOperation.class);
    if ((soapOperation != null) && (soapOperation.isDocument() || info.soapBinding.isDocument())) {
        Iterator iter = getInputMessage().parts();
        while (iter.hasNext()) {
            MessagePart part = (MessagePart) iter.next();
            if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) {
                return true;
            }
        }
    } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) {
        com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
        if (inputParameterNames.contains(outputPart.getName())) {
            if (inputMessage.getPart(outputPart.getName()).getDescriptor().equals(outputPart.getDescriptor())) {
                return true;
            }
        }
    }
    return false;
}
 
Example #16
Source File: WSDLModeler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private Message getHeaderMessage(MessagePart part, TWSDLExtensible ext) {
    Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator();
    while (headers.hasNext()) {
        SOAPHeader header = headers.next();
        if (!header.isLiteral()) {
            continue;
        }
        com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(), document);
        if (headerMessage == null) {
            continue;
        }

        MessagePart headerPart = headerMessage.getPart(header.getPart());
        if (headerPart == part) {
            return headerMessage;
        }
    }
    return null;
}
 
Example #17
Source File: WSDLModeler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @param param
 * @param wrapperStyle TODO
 */
private void setCustomizedParameterName(TWSDLExtensible extension, Message msg, MessagePart part, Parameter param, boolean wrapperStyle) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(extension, JAXWSBinding.class);
    if (jaxwsBinding == null) {
        return;
    }
    String paramName = part.getName();
    QName elementName = part.getDescriptor();
    if (wrapperStyle) {
        elementName = param.getType().getName();
    }
    String customName = jaxwsBinding.getParameterName(msg.getName(), paramName, elementName, wrapperStyle);
    if (customName != null && !customName.equals("")) {
        param.setCustomName(customName);
    }
}
 
Example #18
Source File: WSDLModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected boolean isSingleInOutPart(Set inputParameterNames,
                                    MessagePart outputPart) {
    // As of now, we dont have support for in/out in doc-lit. So return false.
    SOAPOperation soapOperation =
            (SOAPOperation) getExtensionOfType(info.bindingOperation,
                    SOAPOperation.class);
    if ((soapOperation != null) && (soapOperation.isDocument() || info.soapBinding.isDocument())) {
        Iterator iter = getInputMessage().parts();
        while (iter.hasNext()) {
            MessagePart part = (MessagePart) iter.next();
            if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) {
                return true;
            }
        }
    } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) {
        com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
        if (inputParameterNames.contains(outputPart.getName())) {
            if (inputMessage.getPart(outputPart.getName()).getDescriptor().equals(outputPart.getDescriptor())) {
                return true;
            }
        }
    }
    return false;
}
 
Example #19
Source File: WSDLModeler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected boolean isSingleInOutPart(Set inputParameterNames,
                                    MessagePart outputPart) {
    // As of now, we dont have support for in/out in doc-lit. So return false.
    SOAPOperation soapOperation =
            (SOAPOperation) getExtensionOfType(info.bindingOperation,
                    SOAPOperation.class);
    if ((soapOperation != null) && (soapOperation.isDocument() || info.soapBinding.isDocument())) {
        Iterator iter = getInputMessage().parts();
        while (iter.hasNext()) {
            MessagePart part = (MessagePart) iter.next();
            if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) {
                return true;
            }
        }
    } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) {
        com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
        if (inputParameterNames.contains(outputPart.getName())) {
            if (inputMessage.getPart(outputPart.getName()).getDescriptor().equals(outputPart.getDescriptor())) {
                return true;
            }
        }
    }
    return false;
}
 
Example #20
Source File: WSDLModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private List<MessagePart> getBodyParts(SOAPBody body, Message message) {
    String bodyParts = body.getParts();
    if (bodyParts != null) {
        List<MessagePart> partsList = new ArrayList<MessagePart>();
        StringTokenizer in = new StringTokenizer(bodyParts.trim(), " ");
        while (in.hasMoreTokens()) {
            String part = in.nextToken();
            MessagePart mPart = message.getPart(part);
            if (null == mPart) {
                error(message, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(part, message.getName()));
            }
            mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
            partsList.add(mPart);
        }
        return partsList;
    }
    return null;
}
 
Example #21
Source File: WSDLModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected boolean setMessagePartsBinding(StyleAndUse styleAndUse) {
    SOAPBody inBody = getSOAPRequestBody();
    Message inMessage = getInputMessage();
    if (!setMessagePartsBinding(inBody, inMessage, styleAndUse, true)) {
        return false;
    }

    if (isRequestResponse()) {
        SOAPBody outBody = getSOAPResponseBody();
        Message outMessage = getOutputMessage();
        if (!setMessagePartsBinding(outBody, outMessage, styleAndUse, false)) {
            return false;
        }
    }
    return true;
}
 
Example #22
Source File: WSDLModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected boolean setMessagePartsBinding(StyleAndUse styleAndUse) {
    SOAPBody inBody = getSOAPRequestBody();
    Message inMessage = getInputMessage();
    if (!setMessagePartsBinding(inBody, inMessage, styleAndUse, true)) {
        return false;
    }

    if (isRequestResponse()) {
        SOAPBody outBody = getSOAPResponseBody();
        Message outMessage = getOutputMessage();
        if (!setMessagePartsBinding(outBody, outMessage, styleAndUse, false)) {
            return false;
        }
    }
    return true;
}
 
Example #23
Source File: WSDLModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private List<MessagePart> getBodyParts(SOAPBody body, Message message) {
    String bodyParts = body.getParts();
    if (bodyParts != null) {
        List<MessagePart> partsList = new ArrayList<MessagePart>();
        StringTokenizer in = new StringTokenizer(bodyParts.trim(), " ");
        while (in.hasMoreTokens()) {
            String part = in.nextToken();
            MessagePart mPart = message.getPart(part);
            if (null == mPart) {
                error(message, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(part, message.getName()));
            }
            mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
            partsList.add(mPart);
        }
        return partsList;
    }
    return null;
}
 
Example #24
Source File: WSDLModeler.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private List<MessagePart> getBodyParts(SOAPBody body, Message message) {
    String bodyParts = body.getParts();
    if (bodyParts != null) {
        List<MessagePart> partsList = new ArrayList<MessagePart>();
        StringTokenizer in = new StringTokenizer(bodyParts.trim(), " ");
        while (in.hasMoreTokens()) {
            String part = in.nextToken();
            MessagePart mPart = message.getPart(part);
            if (null == mPart) {
                error(message, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(part, message.getName()));
            }
            mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
            partsList.add(mPart);
        }
        return partsList;
    }
    return null;
}
 
Example #25
Source File: WSDLModeler.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private Message getHeaderMessage(MessagePart part, TWSDLExtensible ext) {
    Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator();
    while (headers.hasNext()) {
        SOAPHeader header = headers.next();
        if (!header.isLiteral()) {
            continue;
        }
        com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(), document);
        if (headerMessage == null) {
            continue;
        }

        MessagePart headerPart = headerMessage.getPart(header.getPart());
        if (headerPart == part) {
            return headerMessage;
        }
    }
    return null;
}
 
Example #26
Source File: WSDLModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected boolean isSingleInOutPart(Set inputParameterNames,
                                    MessagePart outputPart) {
    // As of now, we dont have support for in/out in doc-lit. So return false.
    SOAPOperation soapOperation =
            (SOAPOperation) getExtensionOfType(info.bindingOperation,
                    SOAPOperation.class);
    if ((soapOperation != null) && (soapOperation.isDocument() || info.soapBinding.isDocument())) {
        Iterator iter = getInputMessage().parts();
        while (iter.hasNext()) {
            MessagePart part = (MessagePart) iter.next();
            if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) {
                return true;
            }
        }
    } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) {
        com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
        if (inputParameterNames.contains(outputPart.getName())) {
            if (inputMessage.getPart(outputPart.getName()).getDescriptor().equals(outputPart.getDescriptor())) {
                return true;
            }
        }
    }
    return false;
}
 
Example #27
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected boolean setMessagePartsBinding(StyleAndUse styleAndUse) {
    SOAPBody inBody = getSOAPRequestBody();
    Message inMessage = getInputMessage();
    if (!setMessagePartsBinding(inBody, inMessage, styleAndUse, true)) {
        return false;
    }

    if (isRequestResponse()) {
        SOAPBody outBody = getSOAPResponseBody();
        Message outMessage = getOutputMessage();
        if (!setMessagePartsBinding(outBody, outMessage, styleAndUse, false)) {
            return false;
        }
    }
    return true;
}
 
Example #28
Source File: ModelerUtils.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}
 
Example #29
Source File: WSDLModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private List<MessagePart> getHeaderParts(BindingOperation bindingOperation, boolean isInput) {
    TWSDLExtensible ext;
    if (isInput) {
        ext = bindingOperation.getInput();
    } else {
        ext = bindingOperation.getOutput();
    }

    List<MessagePart> parts = new ArrayList<MessagePart>();
    Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator();
    while (headers.hasNext()) {
        SOAPHeader header = headers.next();
        if (!header.isLiteral()) {
            error(header, ModelerMessages.WSDLMODELER_INVALID_HEADER_NOT_LITERAL(header.getPart(), bindingOperation.getName()));
        }

        if (header.getNamespace() != null) {
            warning(header, ModelerMessages.WSDLMODELER_WARNING_R_2716_R_2726("soapbind:header", bindingOperation.getName()));
        }
        com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(),document);
        if (headerMessage == null) {
            error(header, ModelerMessages.WSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(header.getMessage(), bindingOperation.getName()));
        }

        MessagePart part = headerMessage.getPart(header.getPart());
        if (part == null) {
            error(header, ModelerMessages.WSDLMODELER_INVALID_HEADER_NOT_FOUND(header.getPart(), bindingOperation.getName()));
        }
        if (part.getDescriptorKind() != SchemaKinds.XSD_ELEMENT) {
            if (options.isExtensionMode()) {
                warning(part, ModelerMessages.WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(part.getName(), bindingOperation.getName()));
            } else {
                error(part, ModelerMessages.WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(part.getName(), bindingOperation.getName()));
            }
        }
        part.setBindingExtensibilityElementKind(MessagePart.SOAP_HEADER_BINDING);
        parts.add(part);
    }
    return parts;
}
 
Example #30
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected java.util.List<String> getAsynParameterOrder() {
    //for async operation ignore the parameterOrder
    java.util.List<String> parameterList = new ArrayList<String>();
    Message inputMessage = getInputMessage();
    List<MessagePart> inputParts = inputMessage.getParts();
    for (MessagePart part : inputParts) {
        parameterList.add(part.getName());
    }
    return parameterList;
}