You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Keith McClelland <km...@yahoo.com> on 2000/11/02 14:43:20 UTC

Apache SOAP client in IE Browser

Hello,

We are planning a process control system using a
standard browser for the user interaction. To enhance
the functionality of this browser, we plan to send it
an initial page and then keep that page up-to-date
using DHTML. Thus the user will see incremental
changes in the brower window as the process proceeds
but will not be confronted with the full page replots
that a CGI implementation would require. We are
excited about the possibility of using SOAP to
exchange information between the broswer and a web
server connected to the computers on which the process
is occurring.

Our proposed configuration is this:
* Server: Apache with mod-perl using either soap.pm or
soap-lite.pm. Perl fits with our other efforts on this
computer and is a natural for obtaining and processing
the kind of information we need. We have demonstrated
that this side can be done.
* Browser: The DHTML work will be in Javascript. We
anticipate updating the system information around once
a second so will need to do this interaction in a
different thread. Here we believe a Java SOAP applet
is a natural.

My problem is that I haven't succeeded in pasting
together the right sequence of calls etc. to make this
happen. The parameters required for input are
particularly puzzling.

Does somebody have a simple working applet example
(preferably one that connects to an existing web-based
service so that we can work on one side at a time)?

Thanks,
Keith


__________________________________________________
Do You Yahoo!?

Re: Apache SOAP client in IE Browser

Posted by Cory Isaacson <ci...@capita2.com>.
Keith,

Here is a sample, but it looks just like the AddressBook sample code. The
only thing different is the standard Java Applet setup. I am using a Java
Servlet setup on the server side.

Cory

    /* Build the SOAP call.*/
    soapCall = new Call();

    soapCall.setTargetObjectURI("urn:XmldsTestQuery");
    soapCall.setMethodName("runQuery");
    soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);

    /* Invoke the SOAP call.*/
    try
    {
      soapResponse = soapCall.invoke(url, "");
    }
    catch (SOAPException e)
    {
      System.err.println("Caught SOAPException (" +
                         e.getFaultCode() + "): " +
                         e.getMessage());
      return;
    }

    /* Get the SOAP Response.*/
    if (!soapResponse.generatedFault())
    {
      soapReturn = soapResponse.getReturnValue();
      ...process the response
    }
    else
    {
      Fault fault = soapResponse.getFault();

      System.err.println("Generated fault: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    }


----- Original Message -----
From: "Keith McClelland" <km...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Thursday, November 02, 2000 5:43 AM
Subject: Apache SOAP client in IE Browser


> Hello,
>
> We are planning a process control system using a
> standard browser for the user interaction. To enhance
> the functionality of this browser, we plan to send it
> an initial page and then keep that page up-to-date
> using DHTML. Thus the user will see incremental
> changes in the brower window as the process proceeds
> but will not be confronted with the full page replots
> that a CGI implementation would require. We are
> excited about the possibility of using SOAP to
> exchange information between the broswer and a web
> server connected to the computers on which the process
> is occurring.
>
> Our proposed configuration is this:
> * Server: Apache with mod-perl using either soap.pm or
> soap-lite.pm. Perl fits with our other efforts on this
> computer and is a natural for obtaining and processing
> the kind of information we need. We have demonstrated
> that this side can be done.
> * Browser: The DHTML work will be in Javascript. We
> anticipate updating the system information around once
> a second so will need to do this interaction in a
> different thread. Here we believe a Java SOAP applet
> is a natural.
>
> My problem is that I haven't succeeded in pasting
> together the right sequence of calls etc. to make this
> happen. The parameters required for input are
> particularly puzzling.
>
> Does somebody have a simple working applet example
> (preferably one that connects to an existing web-based
> service so that we can work on one side at a time)?
>
> Thanks,
> Keith
>
>
> __________________________________________________
> Do You Yahoo!?
> >From homework help to love advice, Yahoo! Experts has your answer.
> http://experts.yahoo.com/
>


Re: Apache SOAP client in IE Browser

Posted by Cory Isaacson <ci...@capita2.com>.
Keith,

Here is a sample, but it looks just like the AddressBook sample code. The
only thing different is the standard Java Applet setup. I am using a Java
Servlet setup on the server side.

Cory

    /* Build the SOAP call.*/
    soapCall = new Call();

    soapCall.setTargetObjectURI("urn:XmldsTestQuery");
    soapCall.setMethodName("runQuery");
    soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);

    /* Invoke the SOAP call.*/
    try
    {
      soapResponse = soapCall.invoke(url, "");
    }
    catch (SOAPException e)
    {
      System.err.println("Caught SOAPException (" +
                         e.getFaultCode() + "): " +
                         e.getMessage());
      return;
    }

    /* Get the SOAP Response.*/
    if (!soapResponse.generatedFault())
    {
      soapReturn = soapResponse.getReturnValue();
      ...process the response
    }
    else
    {
      Fault fault = soapResponse.getFault();

      System.err.println("Generated fault: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode());
      System.out.println ("  Fault String = " + fault.getFaultString());
    }


----- Original Message -----
From: "Keith McClelland" <km...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Thursday, November 02, 2000 5:43 AM
Subject: Apache SOAP client in IE Browser


> Hello,
>
> We are planning a process control system using a
> standard browser for the user interaction. To enhance
> the functionality of this browser, we plan to send it
> an initial page and then keep that page up-to-date
> using DHTML. Thus the user will see incremental
> changes in the brower window as the process proceeds
> but will not be confronted with the full page replots
> that a CGI implementation would require. We are
> excited about the possibility of using SOAP to
> exchange information between the broswer and a web
> server connected to the computers on which the process
> is occurring.
>
> Our proposed configuration is this:
> * Server: Apache with mod-perl using either soap.pm or
> soap-lite.pm. Perl fits with our other efforts on this
> computer and is a natural for obtaining and processing
> the kind of information we need. We have demonstrated
> that this side can be done.
> * Browser: The DHTML work will be in Javascript. We
> anticipate updating the system information around once
> a second so will need to do this interaction in a
> different thread. Here we believe a Java SOAP applet
> is a natural.
>
> My problem is that I haven't succeeded in pasting
> together the right sequence of calls etc. to make this
> happen. The parameters required for input are
> particularly puzzling.
>
> Does somebody have a simple working applet example
> (preferably one that connects to an existing web-based
> service so that we can work on one side at a time)?
>
> Thanks,
> Keith
>
>
> __________________________________________________
> Do You Yahoo!?
> >From homework help to love advice, Yahoo! Experts has your answer.
> http://experts.yahoo.com/
>