You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by David Q Levitt <dq...@us.ibm.com> on 2002/11/21 21:54:09 UTC

how to get response after SOAPHTTPConnection.send() ?




2 questions:

1.  How do I get the response from the web service after executing
SOAPHTTPConnection.send()?

2.  I'm expecting the web service response to contain a DOM Element.   When
I was calling the web service via a Call I had set this up by:
soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML).   How do I do
the equivalent of that if I'm using
SOAPHTTPConnection.send() instead of Call.invoke() ??

Thanks for your help.

- Dave Levitt



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: how to get response after SOAPHTTPConnection.send() ?

Posted by Scott Nichol <sn...@scottnichol.com>.
In particular, this version
(http://cvs.apache.org/viewcvs.cgi/xml-soap/java/src/org/apache/soap/rpc
/Call.java?rev=1.18&content-type=text/vnd.viewcvs-markup) has the method
you want.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Thursday, November 21, 2002 4:43 PM
Subject: Re: how to get response after SOAPHTTPConnection.send() ?


> > 1.  How do I get the response from the web service after executing
> > SOAPHTTPConnection.send()?
>
> The best guide for use of this method is Call#invoke.  If you don't
have
> source, you can view the 2.3.1 version from CVS at
>
http://cvs.apache.org/viewcvs.cgi/xml-soap/java/src/org/apache/soap/rpc/
> Call.java?rev=1.14&content-type=text/vnd.viewcvs-markup.
>
> > 2.  I'm expecting the web service response to contain a DOM Element.
> When
> > I was calling the web service via a Call I had set this up by:
> > soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML).   How do
I
> do
> > the equivalent of that if I'm using
> > SOAPHTTPConnection.send() instead of Call.invoke() ??
>
> Among other things, Call#invoke creates the SOAP envelope from things
> like the parameters and encoding you specified.  When you create the
> envelope to send with SOAPHTTPConnection#send, you will need to
specify
> the encodingStyle attribute on the envelope or body element.
>
> Anyway, I take it you are trying to work around the ability to set
HTTP
> headers in 2.3.1.  If so, why not just subclass Call and add the
> overloaded invoke method that has been added subsequent to 2.3.1?  The
> source for that method is available to you: just check CVS.
>
> Scott Nichol
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: how to get response after SOAPHTTPConnection.send() ?

Posted by Scott Nichol <sn...@scottnichol.com>.
In particular, this version
(http://cvs.apache.org/viewcvs.cgi/xml-soap/java/src/org/apache/soap/rpc
/Call.java?rev=1.18&content-type=text/vnd.viewcvs-markup) has the method
you want.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Thursday, November 21, 2002 4:43 PM
Subject: Re: how to get response after SOAPHTTPConnection.send() ?


> > 1.  How do I get the response from the web service after executing
> > SOAPHTTPConnection.send()?
>
> The best guide for use of this method is Call#invoke.  If you don't
have
> source, you can view the 2.3.1 version from CVS at
>
http://cvs.apache.org/viewcvs.cgi/xml-soap/java/src/org/apache/soap/rpc/
> Call.java?rev=1.14&content-type=text/vnd.viewcvs-markup.
>
> > 2.  I'm expecting the web service response to contain a DOM Element.
> When
> > I was calling the web service via a Call I had set this up by:
> > soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML).   How do
I
> do
> > the equivalent of that if I'm using
> > SOAPHTTPConnection.send() instead of Call.invoke() ??
>
> Among other things, Call#invoke creates the SOAP envelope from things
> like the parameters and encoding you specified.  When you create the
> envelope to send with SOAPHTTPConnection#send, you will need to
specify
> the encodingStyle attribute on the envelope or body element.
>
> Anyway, I take it you are trying to work around the ability to set
HTTP
> headers in 2.3.1.  If so, why not just subclass Call and add the
> overloaded invoke method that has been added subsequent to 2.3.1?  The
> source for that method is available to you: just check CVS.
>
> Scott Nichol
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: how to get response after SOAPHTTPConnection.send() ?

Posted by Scott Nichol <sn...@scottnichol.com>.
> 1.  How do I get the response from the web service after executing
> SOAPHTTPConnection.send()?

The best guide for use of this method is Call#invoke.  If you don't have
source, you can view the 2.3.1 version from CVS at
http://cvs.apache.org/viewcvs.cgi/xml-soap/java/src/org/apache/soap/rpc/
Call.java?rev=1.14&content-type=text/vnd.viewcvs-markup.

> 2.  I'm expecting the web service response to contain a DOM Element.
When
> I was calling the web service via a Call I had set this up by:
> soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML).   How do I
do
> the equivalent of that if I'm using
> SOAPHTTPConnection.send() instead of Call.invoke() ??

Among other things, Call#invoke creates the SOAP envelope from things
like the parameters and encoding you specified.  When you create the
envelope to send with SOAPHTTPConnection#send, you will need to specify
the encodingStyle attribute on the envelope or body element.

Anyway, I take it you are trying to work around the ability to set HTTP
headers in 2.3.1.  If so, why not just subclass Call and add the
overloaded invoke method that has been added subsequent to 2.3.1?  The
source for that method is available to you: just check CVS.

Scott Nichol


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: how to get response after SOAPHTTPConnection.send() ?

Posted by Scott Nichol <sn...@scottnichol.com>.
> 1.  How do I get the response from the web service after executing
> SOAPHTTPConnection.send()?

The best guide for use of this method is Call#invoke.  If you don't have
source, you can view the 2.3.1 version from CVS at
http://cvs.apache.org/viewcvs.cgi/xml-soap/java/src/org/apache/soap/rpc/
Call.java?rev=1.14&content-type=text/vnd.viewcvs-markup.

> 2.  I'm expecting the web service response to contain a DOM Element.
When
> I was calling the web service via a Call I had set this up by:
> soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML).   How do I
do
> the equivalent of that if I'm using
> SOAPHTTPConnection.send() instead of Call.invoke() ??

Among other things, Call#invoke creates the SOAP envelope from things
like the parameters and encoding you specified.  When you create the
envelope to send with SOAPHTTPConnection#send, you will need to specify
the encodingStyle attribute on the envelope or body element.

Anyway, I take it you are trying to work around the ability to set HTTP
headers in 2.3.1.  If so, why not just subclass Call and add the
overloaded invoke method that has been added subsequent to 2.3.1?  The
source for that method is available to you: just check CVS.

Scott Nichol


RE: how to get response after SOAPHTTPConnection.send() ?

Posted by Dave Searle <da...@davesearle.co.uk>.
URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
SOAPHTTPConnection shc = new SOAPHTTPConnection ();
shc.setMaintainSession (true);
		
Call myCall = new Call();
myCall.setSOAPTransport(shc);
myCall.setTargetObjectURI("urn:SimpleStorage");
myCall.setMethodName("whatever");
myCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    
Response resp = myCall.invoke(url, "" );

-----Original Message-----
From: David Q Levitt [mailto:dqlevitt@us.ibm.com] 
Sent: 21 November 2002 20:54
To: soap-user@xml.apache.org
Subject: how to get response after SOAPHTTPConnection.send() ?






2 questions:

1.  How do I get the response from the web service after executing
SOAPHTTPConnection.send()?

2.  I'm expecting the web service response to contain a DOM Element.
When
I was calling the web service via a Call I had set this up by:
soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML).   How do I
do
the equivalent of that if I'm using
SOAPHTTPConnection.send() instead of Call.invoke() ??

Thanks for your help.

- Dave Levitt



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


RE: how to get response after SOAPHTTPConnection.send() ?

Posted by Dave Searle <da...@davesearle.co.uk>.
URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
SOAPHTTPConnection shc = new SOAPHTTPConnection ();
shc.setMaintainSession (true);
		
Call myCall = new Call();
myCall.setSOAPTransport(shc);
myCall.setTargetObjectURI("urn:SimpleStorage");
myCall.setMethodName("whatever");
myCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    
Response resp = myCall.invoke(url, "" );

-----Original Message-----
From: David Q Levitt [mailto:dqlevitt@us.ibm.com] 
Sent: 21 November 2002 20:54
To: soap-user@xml.apache.org
Subject: how to get response after SOAPHTTPConnection.send() ?






2 questions:

1.  How do I get the response from the web service after executing
SOAPHTTPConnection.send()?

2.  I'm expecting the web service response to contain a DOM Element.
When
I was calling the web service via a Call I had set this up by:
soapCall.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML).   How do I
do
the equivalent of that if I'm using
SOAPHTTPConnection.send() instead of Call.invoke() ??

Thanks for your help.

- Dave Levitt



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>