Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > how to format GET for a SOAP request

Reply
Thread Tools

how to format GET for a SOAP request

 
 
JRough
Guest
Posts: n/a
 
      12-13-2008
'm just playing with this bible Web Service to figure out how to make
SOAP requests. I think it should be a simple GET.. but I don't know
how to properly format the GET request. I just want to request the
string "Jesus" and see what comes back from the request. I don't know
if I should type the whole GET... into the browser or what? I typed
this:
GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?BibleWords=Jesus
HTTP/
1.1 and didn't get anything.
Then I tried this:
http://www.webservicex.net/BibleWebs...eWordsbyKeyWor...
and I got this error:
System.InvalidOperationException: GetBibleWordsbyKeyWord=Jesus Web
Service method name is not valid.
at System.Web.Services.Protocols.HttpServerProtocol.I nitialize()
at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type
type, HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing)

So what is the correct method I'm looking for?

Do I have to type in the URL www.webservicex.net before or after the
GET?
I got this web service here;
--------- http://www.webservicex.net/BibleWebservice.asmx
------------
The following is a sample HTTP GET request and response. The
placeholders shown need to be replaced with actual values.

GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?BibleWords=string
HTTP/1.1
Host: www.webservicex.net

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.webserviceX.NET">string</string>

Thanks for any suggestions,
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      12-13-2008
JRough wrote:
> 'm just playing with this bible Web Service to figure out how to make
> SOAP requests. I think it should be a simple GET.. but I don't know
> how to properly format the GET request. I just want to request the
> string "Jesus" and see what comes back from the request. I don't know
> if I should type the whole GET... into the browser or what? I typed
> this:
> GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?BibleWords=Jesus
> HTTP/
> 1.1 and didn't get anything.


I get a lengthy XML document for
http://www.webservicex.net/BibleWebs...bleWords=Moses
where however the real XML data is escaped.

As for a SOAP request, no, SOAP is not possible with a GET request and a
query string in the URL, to make a SOAP request you need to make a HTTP
POST request with a proper SOAP message in the request body and the
request header
SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"

All that is documented nicely on
http://www.webservicex.net/BibleWebs...WordsbyKeyWord


Note that platforms like the .NET framework allow you to generate proxy
code for web services so that you don't have to deal with SOAP or HTTP,
you simply use classes, instantiate objects and call methods.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
JRough
Guest
Posts: n/a
 
      12-13-2008
On Dec 13, 4:20*am, Martin Honnen <(E-Mail Removed)> wrote:
> JRough wrote:
> > 'm just playing with this bible Web Service to figure out how to make
> > SOAP *requests. *I think it should be a simple GET.. *but I don't know
> > how to properly format the GET request. *I just want to request the
> > string "Jesus" and see what comes back from the request. *I don't know
> > if I should type the whole GET... into the browser or what? *I typed
> > this:
> > GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?BibleWords=Jesus
> > HTTP/
> > 1.1 * and didn't get anything.

>
> I get a lengthy XML document forhttp://www.webservicex.net/BibleWebservice.asmx/GetBibleWordsbyKeyWor...
> where however the real XML data is escaped.
>
> As for a SOAP request, no, SOAP is not possible with a GET request and a
> query string in the URL, to make a SOAP request you need to make a HTTP
> POST request with a proper SOAP message in the request body and the
> request header
> SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"
>
> All that is documented nicely onhttp://www.webservicex.net/BibleWebservice.asmx?op=GetBibleWordsbyKey...
>
> Note that platforms like the .NET framework allow you to generate proxy
> code for web services so that you don't have to deal with SOAP or HTTP,
> you simply use classes, instantiate objects and call methods.
>
> --
>
> * * * * Martin Honnen
> * * * *http://JavaScript.FAQTs.com/


thanks very much, so it is a SOAP request, does that mean it has to be
in a html form with a header? I did read the documentation but I
couldn't understand it.
I don't know .Net I have a Mac. It has Applescript. I don't know if
I could send a request with Applescript or not it also has C++
compiler and Xcode framework. I do know how to use a class.
 
Reply With Quote
 
JRough
Guest
Posts: n/a
 
      12-13-2008
On Dec 13, 4:20*am, Martin Honnen <(E-Mail Removed)> wrote:
> JRough wrote:
> > 'm just playing with this bible Web Service to figure out how to make
> > SOAP *requests. *I think it should be a simple GET.. *but I don't know
> > how to properly format the GET request. *I just want to request the
> > string "Jesus" and see what comes back from the request. *I don't know
> > if I should type the whole GET... into the browser or what? *I typed
> > this:
> > GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?BibleWords=Jesus
> > HTTP/
> > 1.1 * and didn't get anything.

>
> I get a lengthy XML document forhttp://www.webservicex.net/BibleWebservice.asmx/GetBibleWordsbyKeyWor...
> where however the real XML data is escaped.
>
> As for a SOAP request, no, SOAP is not possible with a GET request and a
> query string in the URL, to make a SOAP request you need to make a HTTP
> POST request with a proper SOAP message in the request body and the
> request header
> SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"
>
> All that is documented nicely onhttp://www.webservicex.net/BibleWebservice.asmx?op=GetBibleWordsbyKey...
>
> Note that platforms like the .NET framework allow you to generate proxy
> code for web services so that you don't have to deal with SOAP or HTTP,
> you simply use classes, instantiate objects and call methods.
>
> --
>
> * * * * Martin Honnen
> * * * *http://JavaScript.FAQTs.com/

Okay, that makes sense I have to send a form. I noticed on the web
site that there is an example so I assume that would work on my Mac?
Do I save it as an xsl document? or a an HTML document? If I hit
this document in the browser will it send a SOAP request?

Here is the page below:

<html>



<head>

<link rel="alternate" type="text/xml" href="BibleWebservice.asmx?
disco"/>

<style type="text/css">

BODY { color: #000000; background-color: white; font-family:
Verdana; margin-left: 0px; margin-top: 0px; }
#content { margin-left: 30px; font-size: .70em; padding-bottom:
2em; }
A:link { color: #336699; font-weight: bold; text-decoration:
underline; }
A:visited { color: #6699cc; font-weight: bold; text-decoration:
underline; }
A:active { color: #336699; font-weight: bold; text-decoration:
underline; }
A:hover { color: cc3300; font-weight: bold; text-decoration:
underline; }
P { color: #000000; margin-top: 0px; margin-bottom: 12px; font-
family: Verdana; }
pre { background-color: #e5e5cc; padding: 5px; font-family: Courier
New; font-size: x-small; margin-top: -5px; border: 1px #f0f0e0
solid; }
td { color: #000000; font-family: Verdana; font-size: .7em; }
h2 { font-size: 1.5em; font-weight: bold; margin-top: 25px; margin-
bottom: 10px; border-top: 1px solid #003366; margin-left: -15px;
color: #003366; }
h3 { font-size: 1.1em; color: #000000; margin-left: -15px; margin-
top: 10px; margin-bottom: 10px; }
ul { margin-top: 10px; margin-left: 20px; }
ol { margin-top: 10px; margin-left: 20px; }
li { margin-top: 10px; color: #000000; }
font.value { color: darkblue; font: bold; }
font.key { color: darkgreen; font: bold; }
.heading1 { color: #ffffff; font-family: Tahoma; font-size: 26px;
font-weight: normal; background-color: #003366; margin-top: 0px;
margin-bottom: 0px; margin-left: -30px; padding-top: 10px; padding-
bottom: 3px; padding-left: 15px; width: 105%; }
.button { background-color: #dcdcdc; font-family: Verdana; font-
size: 1em; border-top: #cccccc 1px solid; border-bottom: #666666 1px
solid; border-left: #cccccc 1px solid; border-right: #666666 1px
solid; }
.frmheader { color: #000000; background: #dcdcdc; font-family:
Verdana; font-size: .7em; font-weight: normal; border-bottom: 1px
solid #dcdcdc; padding-top: 2px; padding-bottom: 2px; }
.frmtext { font-family: Verdana; font-size: .7em; margin-top: 8px;
margin-bottom: 0px; margin-left: 32px; }
.frmInput { font-family: Verdana; font-size: 1em; }
.intro { margin-left: -15px; }

</style>

<title>BibleWebservice Web Service</title>

</head>

<body>

<div id="content">

<p class="heading1">BibleWebservice</p><br>





<span>
<p class="intro">Click <a href="BibleWebservice.asmx">here</
a> for a complete list of operations.</p>

<h2>GetBibleWordsbyKeyWord</h2>
<p class="intro">This web service list all versus by keyword
from the Kings James version Bible </p>

<h3>Test</h3>

To test the operation using the HTTP POST protocol, click
the 'Invoke' button.



<form target="_blank" action='http://
www.webservicex.net/BibleWebservice.asmx/GetBibleWordsbyKeyWord'
method="POST">

<table cellspacing="0" cellpadding="4"
frame="box" bordercolor="#dcdcdc" rules="none" style="border-collapse:
collapse;">
<tr>
<td class="frmHeader" background="#dcdcdc" style="border-right: 2px
solid white;">Parameter</td>

<td class="frmHeader" background="#dcdcdc">Value</td>
</tr>


<tr>
<td class="frmText" style="color: #000000;
font-weight: normal;">BibleWords:</td>
<td><input class="frmInput" type="text"
size="50" name="BibleWords"></td>
</tr>

<tr>
<td></td>

<td align="right"> <input type="submit"
value="Invoke" class="button"></td>
</tr>
</table>


</form>
<span>
<h3>SOAP</h3>
<p>The following is a sample SOAP request and response.
The <font class=value>placeholders</font> shown need to be replaced
with actual values.</p>

<pre>POST /BibleWebservice.asmx HTTP/1.1
Host: www.webservicex.net
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>
SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-
instance" xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
&lt;soap:Body&gt;
&lt;GetBibleWordsbyKeyWord xmlns="http://www.webserviceX.NET"&gt;
&lt;BibleWords&gt;<font class=value>string</font>&lt;/
BibleWords&gt;

&lt;/GetBibleWordsbyKeyWord&gt;
&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-
instance" xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;

&lt;soap:Body&gt;
&lt;GetBibleWordsbyKeyWordResponse xmlns="http://
www.webserviceX.NET"&gt;
&lt;GetBibleWordsbyKeyWordResult&gt;<font class=value>string</
font>&lt;/GetBibleWordsbyKeyWordResult&gt;
&lt;/GetBibleWordsbyKeyWordResponse&gt;
&lt;/soap:Body&gt;

&lt;/soap:Envelope&gt;</pre>
</span>

<span>
<h3>HTTP GET</h3>
<p>The following is a sample HTTP GET request and
response. The <font class=value>placeholders</font> shown need to be
replaced with actual values.</p>

<pre>GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?
<font class=key>BibleWords</font>=<font class=value>string</font> HTTP/
1.1
Host: www.webservicex.net
</pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;string xmlns="http://www.webserviceX.NET"&gt;<font
class=value>string</font>&lt;/string&gt;</pre>

</span>

<span>
<h3>HTTP POST</h3>
<p>The following is a sample HTTP POST request and
response. The <font class=value>placeholders</font> shown need to be
replaced with actual values.</p>

<pre>POST /BibleWebservice.asmx/GetBibleWordsbyKeyWord
HTTP/1.1
Host: www.webservicex.net
Content-Type: application/x-www-form-urlencoded
Content-Length: <font class=value>length</font>

<font class=key>BibleWords</font>=<font class=value>string</font></
pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;string xmlns="http://www.webserviceX.NET"&gt;<font
class=value>string</font>&lt;/string&gt;</pre>

</span>

</span>





</body>
</html>
 
Reply With Quote
 
JRough
Guest
Posts: n/a
 
      12-13-2008
On Dec 13, 4:20*am, Martin Honnen <(E-Mail Removed)> wrote:
> JRough wrote:
> > 'm just playing with this bible Web Service to figure out how to make
> > SOAP *requests. *I think it should be a simple GET.. *but I don't know
> > how to properly format the GET request. *I just want to request the
> > string "Jesus" and see what comes back from the request. *I don't know
> > if I should type the whole GET... into the browser or what? *I typed
> > this:
> > GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?BibleWords=Jesus
> > HTTP/
> > 1.1 * and didn't get anything.

>
> I get a lengthy XML document forhttp://www.webservicex.net/BibleWebservice.asmx/GetBibleWordsbyKeyWor...
> where however the real XML data is escaped.
>
> As for a SOAP request, no, SOAP is not possible with a GET request and a
> query string in the URL, to make a SOAP request you need to make a HTTP
> POST request with a proper SOAP message in the request body and the
> request header
> SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"
>
> All that is documented nicely onhttp://www.webservicex.net/BibleWebservice.asmx?op=GetBibleWordsbyKey...
>
> Note that platforms like the .NET framework allow you to generate proxy
> code for web services so that you don't have to deal with SOAP or HTTP,
> you simply use classes, instantiate objects and call methods.
>
> --
>
> * * * * Martin Honnen
> * * * *http://JavaScript.FAQTs.com/



<html>



<head>

<link rel="alternate" type="text/xml" href="BibleWebservice.asmx?
disco"/>

<style type="text/css">

BODY { color: #000000; background-color: white; font-family:
Verdana; margin-left: 0px; margin-top: 0px; }
#content { margin-left: 30px; font-size: .70em; padding-bottom:
2em; }
A:link { color: #336699; font-weight: bold; text-decoration:
underline; }
A:visited { color: #6699cc; font-weight: bold; text-decoration:
underline; }
A:active { color: #336699; font-weight: bold; text-decoration:
underline; }
A:hover { color: cc3300; font-weight: bold; text-decoration:
underline; }
P { color: #000000; margin-top: 0px; margin-bottom: 12px; font-
family: Verdana; }
pre { background-color: #e5e5cc; padding: 5px; font-family: Courier
New; font-size: x-small; margin-top: -5px; border: 1px #f0f0e0
solid; }
td { color: #000000; font-family: Verdana; font-size: .7em; }
h2 { font-size: 1.5em; font-weight: bold; margin-top: 25px; margin-
bottom: 10px; border-top: 1px solid #003366; margin-left: -15px;
color: #003366; }
h3 { font-size: 1.1em; color: #000000; margin-left: -15px; margin-
top: 10px; margin-bottom: 10px; }
ul { margin-top: 10px; margin-left: 20px; }
ol { margin-top: 10px; margin-left: 20px; }
li { margin-top: 10px; color: #000000; }
font.value { color: darkblue; font: bold; }
font.key { color: darkgreen; font: bold; }
.heading1 { color: #ffffff; font-family: Tahoma; font-size: 26px;
font-weight: normal; background-color: #003366; margin-top: 0px;
margin-bottom: 0px; margin-left: -30px; padding-top: 10px; padding-
bottom: 3px; padding-left: 15px; width: 105%; }
.button { background-color: #dcdcdc; font-family: Verdana; font-
size: 1em; border-top: #cccccc 1px solid; border-bottom: #666666 1px
solid; border-left: #cccccc 1px solid; border-right: #666666 1px
solid; }
.frmheader { color: #000000; background: #dcdcdc; font-family:
Verdana; font-size: .7em; font-weight: normal; border-bottom: 1px
solid #dcdcdc; padding-top: 2px; padding-bottom: 2px; }
.frmtext { font-family: Verdana; font-size: .7em; margin-top: 8px;
margin-bottom: 0px; margin-left: 32px; }
.frmInput { font-family: Verdana; font-size: 1em; }
.intro { margin-left: -15px; }

</style>

<title>BibleWebservice Web Service</title>

</head>

<body>

<div id="content">

<p class="heading1">BibleWebservice</p><br>





<span>
<p class="intro">Click <a href="BibleWebservice.asmx">here</
a> for a complete list of operations.</p>

<h2>GetBibleWordsbyKeyWord</h2>
<p class="intro">This web service list all versus by keyword
from the Kings James version Bible </p>

<h3>Test</h3>

To test the operation using the HTTP POST protocol, click
the 'Invoke' button.



<form target="_blank" action='http://
www.webservicex.net/BibleWebservice.asmx/GetBibleWordsbyKeyWord'
method="POST">

<table cellspacing="0" cellpadding="4"
frame="box" bordercolor="#dcdcdc" rules="none" style="border-collapse:
collapse;">
<tr>
<td class="frmHeader" background="#dcdcdc" style="border-right: 2px
solid white;">Parameter</td>

<td class="frmHeader" background="#dcdcdc">Value</td>
</tr>


<tr>
<td class="frmText" style="color: #000000;
font-weight: normal;">BibleWords:</td>
<td><input class="frmInput" type="text"
size="50" name="BibleWords"></td>
</tr>

<tr>
<td></td>

<td align="right"> <input type="submit"
value="Invoke" class="button"></td>
</tr>
</table>


</form>
<span>
<h3>SOAP</h3>
<p>The following is a sample SOAP request and response.
The <font class=value>placeholders</font> shown need to be replaced
with actual values.</p>

<pre>POST /BibleWebservice.asmx HTTP/1.1
Host: www.webservicex.net
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>
SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-
instance" xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
&lt;soap:Body&gt;
&lt;GetBibleWordsbyKeyWord xmlns="http://www.webserviceX.NET"&gt;
&lt;BibleWords&gt;<font class=value>string</font>&lt;/
BibleWords&gt;

&lt;/GetBibleWordsbyKeyWord&gt;
&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-
instance" xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;

&lt;soap:Body&gt;
&lt;GetBibleWordsbyKeyWordResponse xmlns="http://
www.webserviceX.NET"&gt;
&lt;GetBibleWordsbyKeyWordResult&gt;<font class=value>string</
font>&lt;/GetBibleWordsbyKeyWordResult&gt;
&lt;/GetBibleWordsbyKeyWordResponse&gt;
&lt;/soap:Body&gt;

&lt;/soap:Envelope&gt;</pre>
</span>

<span>
<h3>HTTP GET</h3>
<p>The following is a sample HTTP GET request and
response. The <font class=value>placeholders</font> shown need to be
replaced with actual values.</p>

<pre>GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?
<font class=key>BibleWords</font>=<font class=value>string</font> HTTP/
1.1
Host: www.webservicex.net
</pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;string xmlns="http://www.webserviceX.NET"&gt;<font
class=value>string</font>&lt;/string&gt;</pre>

</span>

<span>
<h3>HTTP POST</h3>
<p>The following is a sample HTTP POST request and
response. The <font class=value>placeholders</font> shown need to be
replaced with actual values.</p>

<pre>POST /BibleWebservice.asmx/GetBibleWordsbyKeyWord
HTTP/1.1
Host: www.webservicex.net
Content-Type: application/x-www-form-urlencoded
Content-Length: <font class=value>length</font>

<font class=key>BibleWords</font>=<font class=value>string</font></
pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;string xmlns="http://www.webserviceX.NET"&gt;<font
class=value>string</font>&lt;/string&gt;</pre>

</span>

</span>





</body>
</html>
 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      12-13-2008
JRough wrote:

> thanks very much, so it is a SOAP request, does that mean it has to be
> in a html form with a header? I did read the documentation but I
> couldn't understand it.
> I don't know .Net I have a Mac. It has Applescript. I don't know if
> I could send a request with Applescript or not it also has C++
> compiler and Xcode framework. I do know how to use a class.


That web service can be queried with a simple HTTP GET request where the
request argument is passed in the query string of the URL.
The web service can also be queried with a simple HTTP POST request.
So you don't have to use SOAP to use that web service.

If you want to use SOAP and you want to make a SOAP request over HTTP
then you need to make a HTTP POST request where the request body looks
like this

<soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetBibleWordsbyKeyWord xmlns="http://www.webserviceX.NET">
<BibleWords>Moses</BibleWords>
</GetBibleWordsbyKeyWord>
</soap:Body>
</soap:Envelope>

and where you send HTTP request headers

Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"

to the URL http://www.webservicex.net/BibleWebservice.asmx


You don't do that with a web browser or a HTML form, you would do that
with an API that allows you to make HTTP requests and receive the
response or better yet with some SOAP toolkit or even a proxy kit. If
you are on the Mac then you can't use .NET but there should be Java SOAP
toolkits.
--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
JRough
Guest
Posts: n/a
 
      12-13-2008
On Dec 13, 8:23*am, Martin Honnen <(E-Mail Removed)> wrote:
> JRough wrote:
> > thanks very much, so it is a SOAP request, does that mean it has to be
> > in a html form with a header? *I did read the documentation but I
> > couldn't understand it.
> > I don't know .Net I have a Mac. *It has Applescript. *I don't know if
> > I could send a request with Applescript or not it also has C++
> > compiler and Xcode framework. *I do know how to use a class.

>
> That web service can be queried with a simple HTTP GET request where the
> request argument is passed in the query string of the URL.
> The web service can also be queried with a simple HTTP POST request.
> So you don't have to use SOAP to use that web service.
>
> If you want to use SOAP and you want to make a SOAP request over HTTP
> then you need to make a HTTP POST request where the request body looks
> like this
>
> <soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
> xmlnssd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> * *<soap:Body>
> * * *<GetBibleWordsbyKeyWord xmlns="http://www.webserviceX.NET">
> * * * *<BibleWords>Moses</BibleWords>
> * * *</GetBibleWordsbyKeyWord>
> * *</soap:Body>
> </soap:Envelope>
>
> and where you send HTTP request headers
>
> Content-Type: text/xml; charset=utf-8
> Content-Length: length
> SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"
>
> to the URLhttp://www.webservicex.net/BibleWebservice.asmx
>
> You don't do that with a web browser or a HTML form, you would do that
> with an API that allows you to make HTTP requests and receive the
> response or better yet with some SOAP toolkit or even a proxy kit. If
> you are on the Mac then you can't use .NET but there should be Java SOAP
> toolkits.
> --

I will try to look for a Soap toolkit. That is a good idea.

I have one more question, why does it say Get in this Soap request?
That was why I was trying to GET in the URL in the Browser. It seems
like if you put in the
parameter it should work however it doesn't seem to work just hitting
this page in my browser on my web server.



<h3>SOAP</h3>
<p>The following is a sample SOAP request and response.
The <font class=value>placeholders</font> shown need to be replaced
with actual values.</p>

<pre>POST /BibleWebservice.asmx HTTP/1.1
Host: www.webservicex.net
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>
SOAPAction: "http://www.webserviceX.NET/GetBibleWordsbyKeyWord"

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-
instance" xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
&lt;soap:Body&gt;
&lt;GetBibleWordsbyKeyWord xmlns="http://www.webserviceX.NET"&gt;
&lt;BibleWords&gt;<font class=value>string</font>&lt;/
BibleWords&gt;

&lt;/GetBibleWordsbyKeyWord&gt;
&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-
instance" xmlnssd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;

&lt;soap:Body&gt;
&lt;GetBibleWordsbyKeyWordResponse xmlns="http://
www.webserviceX.NET"&gt;
&lt;GetBibleWordsbyKeyWordResult&gt;<font class=value>string</
font>&lt;/GetBibleWordsbyKeyWordResult&gt;
&lt;/GetBibleWordsbyKeyWordResponse&gt;
&lt;/soap:Body&gt;

&lt;/soap:Envelope&gt;</pre>
</span>

<span>
<h3>HTTP GET</h3>
<p>The following is a sample HTTP GET request and
response. The <font class=value>placeholders</font> shown need to be
replaced with actual values.</p>

<pre>GET /BibleWebservice.asmx/GetBibleWordsbyKeyWord?
<font class=key>BibleWords</font>=<font class=value>string</font> HTTP/
1.1
Host: www.webservicex.net
</pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;string xmlns="http://www.webserviceX.NET"&gt;<font
class=value>string</font>&lt;/string&gt;</pre>

</span>

<span>
<h3>HTTP POST</h3>
<p>The following is a sample HTTP POST request and
response. The <font class=value>placeholders</font> shown need to be
replaced with actual values.</p>

<pre>POST /BibleWebservice.asmx/GetBibleWordsbyKeyWord
HTTP/1.1
Host: www.webservicex.net
Content-Type: application/x-www-form-urlencoded
Content-Length: <font class=value>length</font>

<font class=key>BibleWords</font>=<font class=value>string</font></
pre>

<pre>HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: <font class=value>length</font>

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;string xmlns="http://www.webserviceX.NET"&gt;<font
class=value>string</font>&lt;/string&gt;</pre>

</span>

</span>





</body>
</html>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to make soap request and receive soap response from php soapservice Ivan S ASP .Net 0 08-13-2008 03:35 PM
Soap Extension problem (seems that soap request is not sent to server) Frederik Vanderhaegen ASP .Net Web Services 0 10-20-2006 09:18 AM
SOAP Request is repeated in the SOAP response. comp.text.xml XML 0 09-20-2006 08:41 AM
Re: Accessing Request.InputStream / Request.BinaryRead *as the request is occuring*: How??? Brian Birtle ASP .Net 2 10-16-2003 02:11 PM



Advertisments