Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Web Services: SOAP response and what to do with it

pho01 (Programmer) (OP)
9 Jun 03 22:40
I've read the SOAP tutorials on the net and don't quite understand the logic behind it.

Assume that you have the SOAP response:

  <?xml version="1.0" encoding="UTF-8" ?>
  <SOAP-ENV:Envelope
   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
   xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
   xmlns:xsd="http://www.w3.org/1999/XMLSchema">;
    <SOAP-ENV:Body>
        <ns1:doubleAnIntegerResponse
         xmlns:ns1="urn:MySoapServices"
         SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">;
            <return xsi:type="xsd:int">246</return>
        </ns1:doubleAnIntegerResponse>
    </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>


What do you do to display the results in html from the SOAP response? If some experts outthere can explain it more, i would greatly appreciate it. Thanks!
AGIMA (Programmer)
2 Aug 03 7:36
This would very much depend on what you were programming in.

Here is a webservice that I use for testing.

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

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">;
  <soap:Body>
    <DisplayResponse xmlns="http://tempuri.org/army_acms/Report">;
      <DisplayResult>string</DisplayResult>
    </DisplayResponse>
  </soap:Body>
</soap:Envelope>




Here is the code that call the web service.  This code is taken from ASP .

    dim objSoapClient
    dim NewMessage

    SET objSoapClient = Server.CreateObject("MSSOAP.SoapClient30")

    
    objSoapClient.ClientProperty("ServerHTTPRequest") = True
    ' needs to be updated with the url of your Web Service WSDL and is
    ' followed by the Web Service name
    Call objSoapClient.mssoapinit("http://localhost/"; & application("WebService") & "/WebServices/Reports/Report.asmx?WSDL", "Report")


    objSoapClient.ConnectorProperty("Timeout") = 900000
    
    ' use the SOAP object to call the Web Method Required  
    
    NewMessage = objSoapClient.Display("This is a test.")

    ProcessMonthlyReport = "<DIV style='OVERFLOW: scroll; WIDTH: 100%; HEIGHT: 100%;'>" &  NewMessage & "</DIV>"


As you can see the result is returned into NewMessage (Text = "This is a test.") and it is then placed within a DIV that is sent back to the browser.

If you were using .NET this would be different as you could use the same object model that the web service returns.

Let me know if this helps.



AGIMA.net

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close