Package org.apache.soap.rpc

Examples of org.apache.soap.rpc.Call


    }

    public Call getCall() {
        Trc.entry(this);
        if ( call == null ) {
           call = new Call();
           call.setSOAPMappingRegistry(
               new WSIFSOAPMappingRegistry(createSOAPMappingRegistry( call )));
           prepareTypeMappings();
        }
        Trc.exit(call);
View Full Code Here


        throws WSIFException {
        Trc.entry(this, input, output, fault);
        if (!prepared)
            prepare(input, output);

        Call call = portInstance.getCall();

        call.setEncodingStyleURI(getInputEncodingStyle());

        SOAPTransport st = getTransport();
        if (st != null) {
            call.setSOAPTransport(st);
            if (st instanceof SOAPJMSConnection) {
              SOAPJMSConnection sjt = (SOAPJMSConnection) st;
              sjt.setSyncTimeout(WSIFProperties.getSyncTimeout());
              sjt.setAsyncTimeout(WSIFProperties.getAsyncTimeout());
            }
        }

        call.setTargetObjectURI(getInputNamespace());
        call.setMethodName(getName());

    if (inJmsPropVals != null && !inJmsPropVals.isEmpty()) {
      checkForTimeoutProperties(st, inJmsPropVals);
            ((SOAPJMSConnection) st).setJmsProperties(inJmsPropVals);
    }

        Vector params = new Vector();
        Object partInst;
        for (int i = 0; i < names.length; ++i) {
            try {
                partInst = input.getObjectPart(names[i]);
            } catch (WSIFException ex) {
                Trc.exception(ex);
                partInst = null;
            }
            Object value = partInst;
            // some runtime param validity check

            if (value != null
                && !types[i].isPrimitive()
                && !(types[i].isAssignableFrom(value.getClass()))) {
                throw new WSIFException(
                    "value "
                        + value
                        + " has unexpected type "
                        + value.getClass()
                        + " instead of "
                        + types[i]);
            }

      if (inJmsProps.containsKey(names[i]) && st != null) {
        String name = (String) (inJmsProps.get(names[i]));
        if (!timeoutProperty(st, name, value)) {
                   ((SOAPJMSConnection) st).setJmsProperty(
              name,
              value);
        }
      } else {
                Parameter param =
                    new Parameter(
                        names[i],
                        types[i],
                        value,
                        inputEncodingStyle);
                params.addElement(param);
            }
        }

        call.setParams(params);

        setTransportContext(st);

        setCallContext(call);

        // invoke the operation through ApacheSOAP
        Response resp;
        boolean respOK = true;
        URL locationUri = portInstance.getEndPoint();
        if ( locationUri != null && !isHostInNonProxyProperty( locationUri ) ) {
           setSOAPProxy( st );
        }

        Trc.event(
            this,
            "Invoking operation ",
            getName(),
            " on ",
            locationUri,
            " call object ",
            call);

        try {
            resp = call.invoke(locationUri, getSoapActionURI());
        } catch (SOAPException e) {
            Trc.exception(e);

            // Log message
            MessageLogger.log("WSIF.0005E", "ApacheSOAP", getName());
View Full Code Here

            throw new WSIFException("response not a javax.jms.TextMessage");
        }

        HashMap mapOfUserTypes = new HashMap();
        SOAPMappingRegistry smr =
            WSIFPort_ApacheSOAP.createSOAPMappingRegistry(new Call());
         
        // clear port to ensure setupTypeMappings does something
        setDynamicWSIFPort( null );

        setupTypeMappings(mapOfUserTypes, smr);
View Full Code Here

    mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC,
                        new QName("urn:ProxyService", "GetAdminTopicRequest"),
                                  GetAdminTopicRequest.class, beanSer,
                                  beanSer);

    sendCall = new Call();
    sendCall.setSOAPMappingRegistry(mappingReg);
    sendCall.setTargetObjectURI("urn:ProxyService");
    sendCall.setMethodName("send");
    sendCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

    mappingReg = new SOAPMappingRegistry();
    mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC,
                        new QName("urn:ProxyService", "AbstractJmsReply"),
                                  AbstractJmsReply.class, beanSer, beanSer);
    mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC,
                        new QName("urn:ProxyService", "CnxConnectReply"),
                                  CnxConnectReply.class, beanSer, beanSer);
    mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC,
                        new QName("urn:ProxyService", "ServerReply"),
                                  ServerReply.class, beanSer, beanSer);
    mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC,
                        new QName("urn:ProxyService", "SessCreateTDReply"),
                                  SessCreateDestReply.class, beanSer, beanSer);
    mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC,
                        new QName("urn:ProxyService", "CnxCloseReply"),
                                  CnxCloseReply.class, beanSer, beanSer);
    mappingReg.mapTypes(Constants.NS_URI_SOAP_ENC,
                        new QName("urn:ProxyService", "GetAdminTopicReply"),
                                  GetAdminTopicReply.class, beanSer, beanSer);

    receiveCall = new Call();
    receiveCall.setSOAPMappingRegistry(mappingReg);
    receiveCall.setTargetObjectURI("urn:ProxyService");
    receiveCall.setMethodName("getReply");
    receiveCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
  }
View Full Code Here

                           + "/soap/servlet/rpcrouter");
    }
    catch (MalformedURLException exc) {}

    // Building the Call object for checking the user's identification:
    Call checkCall = new Call();
    checkCall.setTargetObjectURI("urn:ProxyService");
    checkCall.setMethodName("setConnection");
    checkCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

    Vector params = new Vector();
    Hashtable h;
    try {
      h = identity.soapCode();
    } catch (IOException e) {
      throw new JMSException("EXCEPTION:: connect identity.soapCode(): " + e.getMessage());
    }
    params.add(new Parameter("identityMap", Hashtable.class, h, null));
    params.addElement(new Parameter("timeout",
                                    Integer.class,
                                    new Integer(factParams.cnxPendingTimer),
                                    null));

    checkCall.setParams(params);

    while (true) {
      tryAgain = false;
      attemptsC++;
      error = null;

      try {
        resp = checkCall.invoke(serviceUrl,"");

        // SOAP sends a fault back: the service is possibly not started or
        // not running.
        if (resp.generatedFault ()) {
          error = resp.getFault().getFaultString();
View Full Code Here

    private Vector parameters;
       
    // declare methods
    /** Default constructor required to support Serialization. */
    public SoapAccessBean() {
        request = new Call();
    }
View Full Code Here

    * @param method type: java.lang.String -
    * desc: service method
    */
    public SoapAccessBean(String targetURI, String method) {
        // create call object
        request = new Call();
        // set targetObjectURI, method, and encoding style
        request.setTargetObjectURI(targetURI);
        request.setMethodName(method);
        request.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
        // create Vector to store service parameters
View Full Code Here

    private boolean loggingEnabled;
       
    // declare methods
    /** Default constructor required to support Serialization. */
    public SoapAccessBean() {
        request = new Call();
        setLogging(false);
                
    }
View Full Code Here

    * @param method type: java.lang.String -
    * desc: service method
    */
    public SoapAccessBean(String targetURI, String method) {
        // create call object
        request = new Call();
        // set targetObjectURI, method, and encoding style
        request.setTargetObjectURI(targetURI);
        request.setMethodName(method);
        request.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
        // create Vector to store service parameters
View Full Code Here

TOP

Related Classes of org.apache.soap.rpc.Call

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.