<%
//invoke the web service method and display the results
try
{
    Response soapresponse = m_callRemoteMethod.invoke( m_urlEndpoint, "" );
    if( !soapresponse.generatedFault() )
    {
        Parameter result = soapresponse.getReturnValue();
        out.println( result.getValue() );
    }
    else
    {
        Fault fault = soapresponse.getFault(); //error occurred
        out.println(fault.getFaultCode() + ":"+
        fault.getFaultString() );
    }
}
catch( SOAPException exceptionSoap )
{
    out.println( exceptionSoap.getFaultCode() + ":" +
    exceptionSoap.getMessage() );
}
%>

Example 4: Instantiating Parameter objects.

Back to Article