First, let me try re-phrasing what you've said to see if I understand

1. An Apache SOAP service is deployed on machine A.
2. An HTML page is on machine B.
3. The HTML page has a form that will invoke a servlet on machine ? when
submitted.
4. The servlet will invoke the SOAP service on machine A.
5. The servlet will use the SOAP service response to construct HTML to
return to the browser.

If I have correctly described the scenario you desire, your servlet should
simply create a SOAP Call just like your Hello sample and the other samples
with Apache SOAP.  For example, if your HTML page does a POST to the
servlet, your servlet code would look like:

    public void doPost(...) {
        // create SOAP call
        String arg1 = some-form-parameter-from-the-http-request;
        ...
        Call call = new Call();
        call.setTargetObjectURI("urn:MyService");
        call.setMethodName("MyMethod");
        call.setEncodingStyleURI(encodingStyleURI);
        Vector params = new Vector();
        params.addElement(new Parameter("arg1", String.class, arg1, null));
        ...
        call.setParams(params);
        Response resp;
        try {
          resp = call.invoke(url, "");
        } catch (...) {
           ...
        }

        // create HTML from resp
    }

Scott Nichol

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 11, 2002 10:31 AM
Subject: Re: BadTargetObjectURI problem:: Please guide me !!!


>
> Hello Scott...
>
> I want to add a SOAP ENVELOPE in my java servlet  such that It should be
> able to detect
> the webservice and give me the response.
>
> Let me make it more clear.
> 1. I want to depoly a service first of all on say MACHINE A.
> 2. Then On MACHINE B, I want to run a simple html page which will invoke
my
> servlet (passing all the parameters        needed)
>    This servlet will contain an embedded SOAP envelope which will send the
> request to a remote machine depending on the URL of MACHINE A   where in
> service is deployed.
> 3. Then I want MACHINE A to send back the response of the request made by
> MACHINE B.
> 4. Finally MACHINE B will display the result.
>
> It can be visuallised as a simple RPC call in which instead of using JAVA
> RMI or JAVA sockets
> I want to use SOAP.
>
> Guide me more on this
> --------------------------------------------------------------------------
------------------------------------
>
> Nishant Awasthi
> Corporate Systems Database Intern
> Progressive Insurance
> Phone: 440-603-4055 (Work)
> Cell: 330-328-0243 (Cell)
>
>
>
>
>                     Scott Nichol
>                     <snicholnews@scottn        To:
[EMAIL PROTECTED]
>                     ichol.com>                 cc:     (bcc: Nishant
Awasthi)
>                                                Subject:     Re:
BadTargetObjectURI problem::
>                     07/11/2002 10:00 AM        Please guide me !!!
>                     Please respond to
>                     soap-dev
>
>
>
>
>
>
>
> > Good News !!! Everything is working fine now....
> > I have just ran my first SOAP application successfully....and its all
> > because of you.
> > You have given me hope by making consistent replies to my emails....
>
> I'm glad to hear you have a stable system to work with.
>
> > My next step will be to use SOAP in my servlet call. Do you know any
link
> > where I can find
> > some tutorial on this..
>
> I'm afraid I don't know what you mean by this.  Can you elaborate?
>
> Scott Nichol
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to