org.apache.axis.client.Call.getTypeMapping()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(13.4k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中org.apache.axis.client.Call.getTypeMapping()方法的一些代码示例,展示了Call.getTypeMapping()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Call.getTypeMapping()方法的具体详情如下:
包路径:org.apache.axis.client.Call
类名称:Call
方法名:getTypeMapping

Call.getTypeMapping介绍

暂无

代码示例

代码示例来源:origin: com.google.api-ads/adwords-axis

/** Returns all of the service type mappings required to serialize/deserialize Axis objects. */
 static List<TypeMapping> getServiceTypeMappings() {
  // Build the list of type mappings based on BatchJobOpsService for this version of the API.
  ImmutableList.Builder<TypeMapping> mappings = ImmutableList.builder();

  try {
   mappings.add(
     new BatchJobOpsServiceSoapBindingStub() {
      @Override
      public Call _createCall() throws ServiceException {
       try {
        return super.createCall();
       } catch (RemoteException e) {
        throw new RuntimeException(e);
       }
      }
     }._createCall().getTypeMapping());
  } catch (Exception e) {
   throw new RuntimeException("Failed to initialize service type mappings", e);
  }

  return mappings.build();
 }
}

代码示例来源:origin: googleads/googleads-java-lib

/** Returns all of the service type mappings required to serialize/deserialize Axis objects. */
 static List<TypeMapping> getServiceTypeMappings() {
  // Build the list of type mappings based on BatchJobOpsService for this version of the API.
  ImmutableList.Builder<TypeMapping> mappings = ImmutableList.builder();

  try {
   mappings.add(
     new BatchJobOpsServiceSoapBindingStub() {
      @Override
      public Call _createCall() throws ServiceException {
       try {
        return super.createCall();
       } catch (RemoteException e) {
        throw new RuntimeException(e);
       }
      }
     }._createCall().getTypeMapping());
  } catch (Exception e) {
   throw new RuntimeException("Failed to initialize service type mappings", e);
  }

  return mappings.build();
 }
}

代码示例来源:origin: com.google.api-ads/adwords-axis

/** Returns all of the service type mappings required to serialize/deserialize Axis objects. */
 static List<TypeMapping> getServiceTypeMappings() {
  // Build the list of type mappings based on BatchJobOpsService for this version of the API.
  ImmutableList.Builder<TypeMapping> mappings = ImmutableList.builder();

  try {
   mappings.add(
     new BatchJobOpsServiceSoapBindingStub() {
      @Override
      public Call _createCall() throws ServiceException {
       try {
        return super.createCall();
       } catch (RemoteException e) {
        throw new RuntimeException(e);
       }
      }
     }._createCall().getTypeMapping());
  } catch (Exception e) {
   throw new RuntimeException("Failed to initialize service type mappings", e);
  }

  return mappings.build();
 }
}

代码示例来源:origin: googleads/googleads-java-lib

/** Returns all of the service type mappings required to serialize/deserialize Axis objects. */
 static List<TypeMapping> getServiceTypeMappings() {
  // Build the list of type mappings based on BatchJobOpsService for this version of the API.
  ImmutableList.Builder<TypeMapping> mappings = ImmutableList.builder();

  try {
   mappings.add(
     new BatchJobOpsServiceSoapBindingStub() {
      @Override
      public Call _createCall() throws ServiceException {
       try {
        return super.createCall();
       } catch (RemoteException e) {
        throw new RuntimeException(e);
       }
      }
     }._createCall().getTypeMapping());
  } catch (Exception e) {
   throw new RuntimeException("Failed to initialize service type mappings", e);
  }

  return mappings.build();
 }
}

代码示例来源:origin: googleads/googleads-java-lib

/** Returns all of the service type mappings required to serialize/deserialize Axis objects. */
 static List<TypeMapping> getServiceTypeMappings() {
  // Build the list of type mappings based on BatchJobOpsService for this version of the API.
  ImmutableList.Builder<TypeMapping> mappings = ImmutableList.builder();

  try {
   mappings.add(
     new BatchJobOpsServiceSoapBindingStub() {
      @Override
      public Call _createCall() throws ServiceException {
       try {
        return super.createCall();
       } catch (RemoteException e) {
        throw new RuntimeException(e);
       }
      }
     }._createCall().getTypeMapping());
  } catch (Exception e) {
   throw new RuntimeException("Failed to initialize service type mappings", e);
  }

  return mappings.build();
 }
}

代码示例来源:origin: axis/axis

/**
 * Adds the specified parameter to the list of parameters for the
 * operation associated with this Call object.
 *
 * @param paramName      Name that will be used for the parameter in the XML
 * @param xmlType      XMLType of the parameter
 * @param parameterMode  one of IN, OUT or INOUT
 */
public void addParameter(String paramName, QName xmlType,
    ParameterMode parameterMode) {
  Class javaType = null;
  TypeMapping tm = getTypeMapping();
  if (tm != null) {
    javaType = tm.getClassForQName(xmlType);
  }
  addParameter(new QName("", paramName), xmlType,
         javaType, parameterMode);
}

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

/**
 * Adds the specified parameter to the list of parameters for the
 * operation associated with this Call object.
 *
 * @param paramName      Name that will be used for the parameter in the XML
 * @param xmlType      XMLType of the parameter
 * @param parameterMode  one of IN, OUT or INOUT
 */
public void addParameter(String paramName, QName xmlType,
    ParameterMode parameterMode) {
  Class javaType = null;
  TypeMapping tm = getTypeMapping();
  if (tm != null) {
    javaType = tm.getClassForQName(xmlType);
  }
  addParameter(new QName("", paramName), xmlType,
         javaType, parameterMode);
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Adds the specified parameter to the list of parameters for the
 * operation associated with this Call object.
 *
 * @param paramName      Name that will be used for the parameter in the XML
 * @param xmlType      XMLType of the parameter
 * @param parameterMode  one of IN, OUT or INOUT
 */
public void addParameter(String paramName, QName xmlType,
    ParameterMode parameterMode) {
  Class javaType = null;
  TypeMapping tm = getTypeMapping();
  if (tm != null) {
    javaType = tm.getClassForQName(xmlType);
  }
  addParameter(new QName("", paramName), xmlType,
         javaType, parameterMode);
}

代码示例来源:origin: axis/axis

/**
 * Adds the specified parameter to the list of parameters for the
 * operation associated with this Call object.
 *
 * Note: Not part of JAX-RPC specification.
 *
 * @param paramName Name that will be used for the parameter in the XML
 * @param xmlType XMLType of the parameter
 * @param parameterMode one of IN, OUT or INOUT
 */
public void addParameter(QName paramName, QName xmlType,
    ParameterMode parameterMode) {
  Class javaType = null;
  TypeMapping tm = getTypeMapping();
  if (tm != null) {
    javaType = tm.getClassForQName(xmlType);
  }
  addParameter(paramName, xmlType, javaType, parameterMode);
}

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

/**
 * Adds the specified parameter to the list of parameters for the
 * operation associated with this Call object.
 *
 * Note: Not part of JAX-RPC specification.
 *
 * @param paramName Name that will be used for the parameter in the XML
 * @param xmlType XMLType of the parameter
 * @param parameterMode one of IN, OUT or INOUT
 */
public void addParameter(QName paramName, QName xmlType,
    ParameterMode parameterMode) {
  Class javaType = null;
  TypeMapping tm = getTypeMapping();
  if (tm != null) {
    javaType = tm.getClassForQName(xmlType);
  }
  addParameter(paramName, xmlType, javaType, parameterMode);
}

代码示例来源:origin: axis/axis

/**
 * Register type mapping information for serialization/deserialization
 *
 * Note: Not part of JAX-RPC specification.
 *
 * @param javaType is  the Java class of the data type.
 * @param xmlType the xsi:type QName of the associated XML type.
 * @param sf/df are the factories (or the Class objects of the factory).
 * @param force Indicates whether to add the information if already registered.
 */
public void registerTypeMapping(Class javaType, QName xmlType,
                SerializerFactory sf,
                DeserializerFactory df,
                boolean force) {
  TypeMapping tm = getTypeMapping();
  if (!force && tm.isRegistered(javaType, xmlType)) {
    return;
  }
  // Register the information
  tm.register(javaType, xmlType, sf, df);
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Adds the specified parameter to the list of parameters for the
 * operation associated with this Call object.
 *
 * Note: Not part of JAX-RPC specification.
 *
 * @param paramName Name that will be used for the parameter in the XML
 * @param xmlType XMLType of the parameter
 * @param parameterMode one of IN, OUT or INOUT
 */
public void addParameter(QName paramName, QName xmlType,
    ParameterMode parameterMode) {
  Class javaType = null;
  TypeMapping tm = getTypeMapping();
  if (tm != null) {
    javaType = tm.getClassForQName(xmlType);
  }
  addParameter(paramName, xmlType, javaType, parameterMode);
}

代码示例来源:origin: axis/axis

/**
 * Adds a parameter type as a soap:header.
 *
 * @param paramName     - Name of the parameter
 * @param xmlType       - XML datatype of the parameter
 * @param parameterMode - Mode of the parameter-whether IN, OUT or INOUT
 * @param headerMode    - Mode of the header. Even if this is an INOUT
 *                      parameter, it need not be in the header in both
 *                      directions.
 * @throws JAXRPCException - if isParameterAndReturnSpecRequired returns
 *                         false, then addParameter MAY throw
 *                         JAXRPCException....actually Axis allows
 *                         modification in such cases
 */
public void addParameterAsHeader(QName paramName, QName xmlType,
                 ParameterMode parameterMode,
                 ParameterMode headerMode) {
  Class javaType = null;
  TypeMapping tm = getTypeMapping();
  if (tm != null) {
    javaType = tm.getClassForQName(xmlType);
  }
  addParameterAsHeader(paramName, xmlType, javaType,
      parameterMode, headerMode);
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Register type mapping information for serialization/deserialization
 *
 * Note: Not part of JAX-RPC specification.
 *
 * @param javaType is  the Java class of the data type.
 * @param xmlType the xsi:type QName of the associated XML type.
 * @param sf/df are the factories (or the Class objects of the factory).
 * @param force Indicates whether to add the information if already registered.
 */
public void registerTypeMapping(Class javaType, QName xmlType,
                SerializerFactory sf,
                DeserializerFactory df,
                boolean force) {
  TypeMapping tm = getTypeMapping();
  if (!force && tm.isRegistered(javaType, xmlType)) {
    return;
  }
  // Register the information
  tm.register(javaType, xmlType, sf, df);
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Adds a parameter type as a soap:header.
 *
 * @param paramName     - Name of the parameter
 * @param xmlType       - XML datatype of the parameter
 * @param parameterMode - Mode of the parameter-whether IN, OUT or INOUT
 * @param headerMode    - Mode of the header. Even if this is an INOUT
 *                      parameter, it need not be in the header in both
 *                      directions.
 * @throws JAXRPCException - if isParameterAndReturnSpecRequired returns
 *                         false, then addParameter MAY throw
 *                         JAXRPCException....actually Axis allows
 *                         modification in such cases
 */
public void addParameterAsHeader(QName paramName, QName xmlType,
                 ParameterMode parameterMode,
                 ParameterMode headerMode) {
  Class javaType = null;
  TypeMapping tm = getTypeMapping();
  if (tm != null) {
    javaType = tm.getClassForQName(xmlType);
  }
  addParameterAsHeader(paramName, xmlType, javaType,
      parameterMode, headerMode);
}

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

/**
 * Register type mapping information for serialization/deserialization
 *
 * Note: Not part of JAX-RPC specification.
 *
 * @param javaType is  the Java class of the data type.
 * @param xmlType the xsi:type QName of the associated XML type.
 * @param sf/df are the factories (or the Class objects of the factory).
 * @param force Indicates whether to add the information if already registered.
 */
public void registerTypeMapping(Class javaType, QName xmlType,
                SerializerFactory sf,
                DeserializerFactory df,
                boolean force) {
  TypeMapping tm = getTypeMapping();
  if (!force && tm.isRegistered(javaType, xmlType)) {
    return;
  }
  // Register the information
  tm.register(javaType, xmlType, sf, df);
}

代码示例来源:origin: axis/axis

/**
 * Sets the return type of the operation associated with this Call object.
 *
 * @param type QName of the return value type.
 */
public void setReturnType(QName type) {
  if (operationSetManually) {
    throw new RuntimeException(
        Messages.getMessage("operationAlreadySet"));
  }
  if (operation == null)
    operation = new OperationDesc();
  // In order to allow any Call to be re-used, Axis
  // chooses to allow setReturnType to be changed when
  // parmAndRetReq==false.  This does not conflict with
  // JSR 101 which indicates an exception MAY be thrown.
  //if (parmAndRetReq) {
  operation.setReturnType(type);
  TypeMapping tm = getTypeMapping();
  operation.setReturnClass(tm.getClassForQName(type));
  parmAndRetReq = true;
  //}
  //else {
  //throw new JAXRPCException(Messages.getMessage("noParmAndRetReq"));
  //}
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Sets the return type of the operation associated with this Call object.
 *
 * @param type QName of the return value type.
 */
public void setReturnType(QName type) {
  if (operationSetManually) {
    throw new RuntimeException(
        Messages.getMessage("operationAlreadySet"));
  }
  if (operation == null)
    operation = new OperationDesc();
  // In order to allow any Call to be re-used, Axis
  // chooses to allow setReturnType to be changed when
  // parmAndRetReq==false.  This does not conflict with
  // JSR 101 which indicates an exception MAY be thrown.
  //if (parmAndRetReq) {
  operation.setReturnType(type);
  TypeMapping tm = getTypeMapping();
  operation.setReturnClass(tm.getClassForQName(type));
  parmAndRetReq = true;
  //}
  //else {
  //throw new JAXRPCException(Messages.getMessage("noParmAndRetReq"));
  //}
}

代码示例来源:origin: axis/axis

/**
 * Sets the desired return Java Class.  This is a convenience method
 * which will cause the Call to automatically convert return values
 * into a desired class if possible.  For instance, we return object
 * arrays by default now for SOAP arrays - you could specify:
 *
 * setReturnClass(Vector.class)
 *
 * and you'd get a Vector back from invoke() instead of having to do
 * the conversion yourself.
 *
 * Note: Not part of JAX-RPC specification.  To be JAX-RPC compliant,
 *       use setReturnType(QName, Class).
 *
 * @param cls the desired return class.
 */
public void setReturnClass(Class cls) {
  if (operationSetManually) {
    throw new RuntimeException(
        Messages.getMessage("operationAlreadySet"));
  }
  if (operation == null)
    operation = new OperationDesc();
  operation.setReturnClass(cls);
  TypeMapping tm = getTypeMapping();
  operation.setReturnType(tm.getTypeQName(cls));
  parmAndRetReq = true;
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Sets the desired return Java Class.  This is a convenience method
 * which will cause the Call to automatically convert return values
 * into a desired class if possible.  For instance, we return object
 * arrays by default now for SOAP arrays - you could specify:
 *
 * setReturnClass(Vector.class)
 *
 * and you'd get a Vector back from invoke() instead of having to do
 * the conversion yourself.
 *
 * Note: Not part of JAX-RPC specification.  To be JAX-RPC compliant,
 *       use setReturnType(QName, Class).
 *
 * @param cls the desired return class.
 */
public void setReturnClass(Class cls) {
  if (operationSetManually) {
    throw new RuntimeException(
        Messages.getMessage("operationAlreadySet"));
  }
  if (operation == null)
    operation = new OperationDesc();
  operation.setReturnClass(cls);
  TypeMapping tm = getTypeMapping();
  operation.setReturnType(tm.getTypeQName(cls));
  parmAndRetReq = true;
}

相关文章