// This class was generated by the JAXRPC SI, do not edit.
// Contents subject to change without notice.
// JAX-RPC Standard Implementation (1.1, build EA-R39)

package com.agiledeveloper.ws;

import com.sun.xml.rpc.server.http.MessageContextProperties;
import com.sun.xml.rpc.streaming.*;
import com.sun.xml.rpc.encoding.*;
import com.sun.xml.rpc.encoding.soap.SOAPConstants;
import com.sun.xml.rpc.encoding.soap.SOAP12Constants;
import com.sun.xml.rpc.encoding.literal.*;
import com.sun.xml.rpc.soap.streaming.*;
import com.sun.xml.rpc.soap.message.*;
import com.sun.xml.rpc.soap.SOAPVersion;
import com.sun.xml.rpc.soap.SOAPEncodingConstants;
import com.sun.xml.rpc.wsdl.document.schema.SchemaConstants;
import javax.xml.namespace.QName;
import java.rmi.RemoteException;
import java.util.Iterator;
import java.lang.reflect.*;
import java.lang.Class;
import com.sun.xml.rpc.client.SenderException;
import com.sun.xml.rpc.client.*;
import com.sun.xml.rpc.client.http.*;
import javax.xml.rpc.handler.*;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.soap.SOAPFaultException;

public class InformationProviderIF_Stub
    extends com.sun.xml.rpc.client.StubBase
    implements com.agiledeveloper.ws.InformationProviderIF {
    
    
    /*
     *  public constructor
     */
    public InformationProviderIF_Stub(HandlerChain handlerChain) {
        super(handlerChain);
        _setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost:8080/Info/InformationProvider");
    }
    
    
    /*
     *  implementation of getFullName
     */
    public java.lang.String getFullName(java.lang.String string_1)
        throws java.rmi.RemoteException {
        
        try {
            
            StreamingSenderState _state = _start(_handlerChain);
            
            InternalSOAPMessage _request = _state.getRequest();
            _request.setOperationCode(getFullName_OPCODE);
            com.agiledeveloper.ws.InformationProviderIF_getFullName_RequestStruct _myInformationProviderIF_getFullName_RequestStruct =
                new com.agiledeveloper.ws.InformationProviderIF_getFullName_RequestStruct();
            
            _myInformationProviderIF_getFullName_RequestStruct.setString_1(string_1);
            
            SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_getFullName_getFullName_QNAME);
            _bodyBlock.setValue(_myInformationProviderIF_getFullName_RequestStruct);
            _bodyBlock.setSerializer(ns1_myInformationProviderIF_getFullName_RequestStruct_SOAPSerializer);
            _request.setBody(_bodyBlock);
            
            _state.getMessageContext().setProperty(HttpClientTransport.HTTP_SOAPACTION_PROPERTY, "");
            
            _send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
            
            com.agiledeveloper.ws.InformationProviderIF_getFullName_ResponseStruct _myInformationProviderIF_getFullName_ResponseStruct = null;
            Object _responseObj = _state.getResponse().getBody().getValue();
            if (_responseObj instanceof SOAPDeserializationState) {
                _myInformationProviderIF_getFullName_ResponseStruct =
                    (com.agiledeveloper.ws.InformationProviderIF_getFullName_ResponseStruct)((SOAPDeserializationState)_responseObj).getInstance();
            } else {
                _myInformationProviderIF_getFullName_ResponseStruct =
                    (com.agiledeveloper.ws.InformationProviderIF_getFullName_ResponseStruct)_responseObj;
            }
            
            return _myInformationProviderIF_getFullName_ResponseStruct.getResult();
        } catch (RemoteException e) {
            // let this one through unchanged
            throw e;
        } catch (JAXRPCException e) {
            throw new RemoteException(e.getMessage(), e);
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException)e;
            } else {
                throw new RemoteException(e.getMessage(), e);
            }
        }
    }
    
    /*
     *  implementation of getRecord
     */
    public java.lang.String getRecord(java.lang.String string_1)
        throws java.rmi.RemoteException {
        
        try {
            
            StreamingSenderState _state = _start(_handlerChain);
            
            InternalSOAPMessage _request = _state.getRequest();
            _request.setOperationCode(getRecord_OPCODE);
            com.agiledeveloper.ws.InformationProviderIF_getRecord_RequestStruct _myInformationProviderIF_getRecord_RequestStruct =
                new com.agiledeveloper.ws.InformationProviderIF_getRecord_RequestStruct();
            
            _myInformationProviderIF_getRecord_RequestStruct.setString_1(string_1);
            
            SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_getRecord_getRecord_QNAME);
            _bodyBlock.setValue(_myInformationProviderIF_getRecord_RequestStruct);
            _bodyBlock.setSerializer(ns1_myInformationProviderIF_getRecord_RequestStruct_SOAPSerializer);
            _request.setBody(_bodyBlock);
            
            _state.getMessageContext().setProperty(HttpClientTransport.HTTP_SOAPACTION_PROPERTY, "");
            
            _send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
            
            com.agiledeveloper.ws.InformationProviderIF_getRecord_ResponseStruct _myInformationProviderIF_getRecord_ResponseStruct = null;
            Object _responseObj = _state.getResponse().getBody().getValue();
            if (_responseObj instanceof SOAPDeserializationState) {
                _myInformationProviderIF_getRecord_ResponseStruct =
                    (com.agiledeveloper.ws.InformationProviderIF_getRecord_ResponseStruct)((SOAPDeserializationState)_responseObj).getInstance();
            } else {
                _myInformationProviderIF_getRecord_ResponseStruct =
                    (com.agiledeveloper.ws.InformationProviderIF_getRecord_ResponseStruct)_responseObj;
            }
            
            return _myInformationProviderIF_getRecord_ResponseStruct.getResult();
        } catch (RemoteException e) {
            // let this one through unchanged
            throw e;
        } catch (JAXRPCException e) {
            throw new RemoteException(e.getMessage(), e);
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException)e;
            } else {
                throw new RemoteException(e.getMessage(), e);
            }
        }
    }
    
    
    /*
     *  this method deserializes the request/response structure in the body
     */
    protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState  state) throws Exception {
        int opcode = state.getRequest().getOperationCode();
        switch (opcode) {
            case getFullName_OPCODE:
                _deserialize_getFullName(bodyReader, deserializationContext, state);
                break;
            case getRecord_OPCODE:
                _deserialize_getRecord(bodyReader, deserializationContext, state);
                break;
            default:
                throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
        }
    }
    
    
    
    /*
     * This method deserializes the body of the getFullName operation.
     */
    private void _deserialize_getFullName(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
        Object myInformationProviderIF_getFullName_ResponseStructObj =
            ns1_myInformationProviderIF_getFullName_ResponseStruct_SOAPSerializer.deserialize(ns1_getFullName_getFullNameResponse_QNAME,
                bodyReader, deserializationContext);
        
        SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_getFullName_getFullNameResponse_QNAME);
        bodyBlock.setValue(myInformationProviderIF_getFullName_ResponseStructObj);
        state.getResponse().setBody(bodyBlock);
    }
    
    /*
     * This method deserializes the body of the getRecord operation.
     */
    private void _deserialize_getRecord(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
        Object myInformationProviderIF_getRecord_ResponseStructObj =
            ns1_myInformationProviderIF_getRecord_ResponseStruct_SOAPSerializer.deserialize(ns1_getRecord_getRecordResponse_QNAME,
                bodyReader, deserializationContext);
        
        SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_getRecord_getRecordResponse_QNAME);
        bodyBlock.setValue(myInformationProviderIF_getRecord_ResponseStructObj);
        state.getResponse().setBody(bodyBlock);
    }
    
    
    
    
    public String _getDefaultEnvelopeEncodingStyle() {
        return null;
    }
    
    public String _getImplicitEnvelopeEncodingStyle() {
        return "";
    }
    
    public String _getEncodingStyle() {
        return SOAPNamespaceConstants.ENCODING;
    }
    
    public void _setEncodingStyle(String encodingStyle) {
        throw new UnsupportedOperationException("cannot set encoding style");
    }
    
    
    
    
    
    /*
     * This method returns an array containing (prefix, nsURI) pairs.
     */
    protected String[] _getNamespaceDeclarations() {
        return myNamespace_declarations;
    }
    
    /*
     * This method returns an array containing the names of the headers we understand.
     */
    public QName[] _getUnderstoodHeaders() {
        return understoodHeaderNames;
    }
    
    public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
        super._initialize(registry);
        ns1_myInformationProviderIF_getRecord_RequestStruct_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPConstants.NS_SOAP_ENCODING, com.agiledeveloper.ws.InformationProviderIF_getRecord_RequestStruct.class, ns1_getRecord_TYPE_QNAME);
        ns1_myInformationProviderIF_getFullName_ResponseStruct_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPConstants.NS_SOAP_ENCODING, com.agiledeveloper.ws.InformationProviderIF_getFullName_ResponseStruct.class, ns1_getFullNameResponse_TYPE_QNAME);
        ns1_myInformationProviderIF_getFullName_RequestStruct_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPConstants.NS_SOAP_ENCODING, com.agiledeveloper.ws.InformationProviderIF_getFullName_RequestStruct.class, ns1_getFullName_TYPE_QNAME);
        ns1_myInformationProviderIF_getRecord_ResponseStruct_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPConstants.NS_SOAP_ENCODING, com.agiledeveloper.ws.InformationProviderIF_getRecord_ResponseStruct.class, ns1_getRecordResponse_TYPE_QNAME);
    }
    
    private static final QName _portName = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "InformationProviderIFPort");
    private static final int getFullName_OPCODE = 0;
    private static final int getRecord_OPCODE = 1;
    private static final QName ns1_getFullName_getFullName_QNAME = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "getFullName");
    private static final QName ns1_getFullName_TYPE_QNAME = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "getFullName");
    private CombinedSerializer ns1_myInformationProviderIF_getFullName_RequestStruct_SOAPSerializer;
    private static final QName ns1_getFullName_getFullNameResponse_QNAME = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "getFullNameResponse");
    private static final QName ns1_getFullNameResponse_TYPE_QNAME = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "getFullNameResponse");
    private CombinedSerializer ns1_myInformationProviderIF_getFullName_ResponseStruct_SOAPSerializer;
    private static final QName ns1_getRecord_getRecord_QNAME = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "getRecord");
    private static final QName ns1_getRecord_TYPE_QNAME = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "getRecord");
    private CombinedSerializer ns1_myInformationProviderIF_getRecord_RequestStruct_SOAPSerializer;
    private static final QName ns1_getRecord_getRecordResponse_QNAME = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "getRecordResponse");
    private static final QName ns1_getRecordResponse_TYPE_QNAME = new QName("http://www.agiledeveloper.com/wsdl/InformationProvider", "getRecordResponse");
    private CombinedSerializer ns1_myInformationProviderIF_getRecord_ResponseStruct_SOAPSerializer;
    private static final String[] myNamespace_declarations =
                                        new String[] {
                                            "ns0", "http://www.agiledeveloper.com/wsdl/InformationProvider"
                                        };
    
    private static final QName[] understoodHeaderNames = new QName[] {  };
}
