Package javax.xml.rpc.namespace

Examples of javax.xml.rpc.namespace.QName


     * @param javaType class or type
     * @return xmlType qname or null
     */
    public QName getTypeQName(Class javaType) {
        //log.debug("getTypeQName javaType =" + javaType);
        QName xmlType = null;
        Pair pair = (Pair) class2Pair.get(javaType);
        if (pair == null && delegate != null) {
            xmlType = delegate.getTypeQName(javaType);
        } else if (pair != null) {
            xmlType = pair.xmlType;
View Full Code Here


        Class javaType = null;
        TypeMapping tm = getTypeMapping();
        if (tm != null) {
            javaType = tm.getClassForQName(xmlType);
        }
        addParameter(new QName("", paramName), xmlType, javaType, parameterMode);
    }
View Full Code Here

     *                              false, then addParameter will throw
     *                              JAXRPCException.
     */
    public void addParameter(String paramName, QName xmlType,
                             Class javaType, ParameterMode parameterMode) {
        addParameter(new QName("", paramName), xmlType, javaType, parameterMode);
    }
View Full Code Here

     *
     * @param  paramName  name of the parameter to return
     * @return XMLType    XMLType of paramName, or null if not found.
     */
    public QName getParameterTypeByName(String paramName) {
        QName paramQName = new QName("", paramName);

        return getParameterTypeByQName(paramQName);
    }
View Full Code Here

    /**
     * This is a convenience method.  If the user doesn't care about the QName of the operation, the
     * user can call this method, which converts a String operation name to a QName.
     */
    public void setOperationName(String opName) {
        operationName = new QName(opName);
    }
View Full Code Here

     * @param javaType the class of the javaType
     */
    public void setLanguageSpecificType(Class javaType)
    {
        String type = javaType.getName();
        typeQName = new QName(WSDDConstants.WSDD_JAVA, type);
    }
View Full Code Here

                    list = sBody.getEncodingStyles();
                    if ( list != null && list.size() > 0 )
                        this.setEncodingStyle( (String) list.get(0) );
                    String ns = sBody.getNamespaceURI();
                    if (ns != null && !ns.equals(""))
                      setOperationName( new QName( ns, opName ) );
                    break ;
                }
            }
        }

        // Get the parameters
        ////////////////////////////////////////////////////////////////////
        List    paramOrder = op.getParameterOrdering();
        Input   input      = op.getInput();
        javax.wsdl.Message message    = null ;
        List    parts      = null ;

        this.removeAllParameters();
        if ( input   != null ) message = input.getMessage();
        if ( message != null ) parts   = message.getOrderedParts( paramOrder );
        if ( parts != null ) {
            for ( int i = 0 ; i < parts.size() ; i++ ) {
                Part    part = (Part) parts.get(i);
                if ( part == null ) continue ;

                String           name  = part.getName();
                javax.wsdl.QName type  = part.getTypeName();

                if ( type == null ) {
                    type = part.getElementName();
                    if ( type != null )
                      type = new javax.wsdl.QName("java","org.w3c.dom.Element");
                    else
                      throw new JAXRPCException(
                                  JavaUtils.getMessage("typeNotSet00", name) );
                }

                QName qname = new QName(type.getNamespaceURI(),
                        type.getLocalPart());
                ParameterMode mode = ParameterMode.IN;
                this.addParameter( name, qname, mode );
            }
        }


        // Get the return type
        ////////////////////////////////////////////////////////////////////
        Output   output  = op.getOutput();
        message = null ;

        if ( output  != null ) message = output.getMessage();
        if ( message != null ) parts   = message.getOrderedParts(null);

        this.setReturnType( null ); //Make sure we're restarting from fresh.
//      if (null != paramTypes) // attachments may have no parameters.
        if (operation != null && operation.getNumParams() > 0) // attachments may have no parameters.
          this.setReturnType( XMLType.AXIS_VOID );
        if ( parts != null ) {
            for( int i = 0 ;i < parts.size() ; i++ ) {
                Part part  = (Part) parts.get( i );

                if (paramOrder != null && paramOrder.contains(part.getName()))
                        continue ;

                javax.wsdl.QName type  = part.getTypeName();
                if ( type == null ) {
                    type = part.getElementName();
                    if ( type != null )
                      type = new javax.wsdl.QName("java","org.w3c.dom.Element");
                    else
                      throw new JAXRPCException(
                            JavaUtils.getMessage("typeNotSet00", "<return>") );
                }
                QName qname = new QName(type.getNamespaceURI(),
                        type.getLocalPart());
                this.setReturnType( qname );
                break ;
            }
        }
View Full Code Here

     * @param javaType is the name of the class(For arrays this
     * could be the form my.Foo[] or could be in the form [Lmy.Foo;
     */
    public void setLanguageSpecificType(String javaType)
    {
        typeQName = new QName(WSDDConstants.WSDD_JAVA, javaType);
    }
View Full Code Here

     * @throws java.rmi.RemoteException - if there is any error in the remote method invocation or if the Call
     * object is not configured properly.
     */
    public Object invoke(QName operationName, Object[] params)
      throws java.rmi.RemoteException {
        QName origOpName = this.operationName;
        this.operationName = operationName;
        try {
            return this.invoke(params);
        }
        catch (java.rmi.RemoteException re) {
View Full Code Here

        for ( i = 0 ; i < parameters.size() ; i++ ) {
            ParameterDesc param = (ParameterDesc)parameters.get(i);
            if (param.getMode() == ParameterDesc.OUT)
                continue ;

            QName paramQName = param.getQName();
            RPCParam p = new RPCParam(paramQName.getNamespaceURI(),
                                      paramQName.getLocalPart(),
                                      params[j++] );
            // Attach the ParameterDescription to the RPCParam
            // so that the serializer can use the (javaType, xmlType)
            // information.
            p.setParamDesc(param);
View Full Code Here

TOP

Related Classes of javax.xml.rpc.namespace.QName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.