FileDocCategorySizeDatePackage
Hello_PortTypeProxy.javaAPI DocExample1958Tue Oct 09 11:03:40 BST 2001com.ecerami.wsdl.ibm

Hello_PortTypeProxy

public class Hello_PortTypeProxy extends Object

Fields Summary
private Call
call
private URL
url
private String
SOAPActionURI
private SOAPMappingRegistry
smr
Constructors Summary
public Hello_PortTypeProxy()


     
  
    call.setTargetObjectURI("urn:examples:helloservice");
    call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
    this.url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
    this.SOAPActionURI = "sayHello";
  
Methods Summary
public synchronized java.net.URLgetEndPoint()

    return url;
  
public synchronized java.lang.StringsayHello(java.lang.String firstName)

    if (url == null)
    {
      throw new SOAPException(Constants.FAULT_CODE_CLIENT,
      "A URL must be specified via " +
      "Hello_PortTypeProxy.setEndPoint(URL).");
    }

    call.setMethodName("sayHello");
    Vector params = new Vector();
    Parameter firstNameParam = new Parameter("firstName",
      java.lang.String.class, firstName, null);
    params.addElement(firstNameParam);
    call.setParams(params);
    Response resp = call.invoke(url, SOAPActionURI);

    // Check the response.
    if (resp.generatedFault())
    {
      Fault fault = resp.getFault();

      throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
    }
    else
    {
      Parameter retValue = resp.getReturnValue();
      return (java.lang.String)retValue.getValue();
    }
  
public synchronized voidsetEndPoint(java.net.URL url)

    this.url = url;