Having problems using WebService

Discussion in 'ASP .Net Web Services' started by Mark Parter, Jul 13, 2004.

  1. Mark Parter

    Mark Parter Guest

    I have installed DSML Services for Windows on a webserver. I've created an ASP.NET page to pass SOAP queries to this using the following code;

    Dim strSOAPXML As String = soapreq.Text

    Dim objHTTPReq As System.Net.HttpWebRequest
    Dim objHTTPRes As System.Net.HttpWebResponse

    objHTTPReq = CType(System.Net.WebRequest.CreateDefault(New System.Uri("http://www.someurl.com/dsml/adssoap.dsmlx")), HttpWebRequest)
    objHTTPReq.ContentType = "text/xml;charset=""utf-8"""
    objHTTPReq.Accept = "text/xml"
    objHTTPReq.Method = "POST"

    objHTTPReq.Headers.Add("SOAPAction", """http://tempuri.org/Add""")

    Dim objStream As System.IO.StreamWriter
    objStream = New StreamWriter(objHTTPReq.GetRequestStream(), Encoding.UTF8)
    objStream.Write(strSOAPXML)
    objHTTPReq.GetRequestStream().Close
    'objHTTPRes = objHTTPReq.GetResponse()

    Dim objXML As New System.Xml.XmlDocument()
    objHTTPRes = objHTTPReq.GetResponse()
    objXML.Load(objHTTPRes.GetResponseStream())
    objXML.Save(soaprec.Text)

    When I pass it a SOAP request, like so;

    <se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/">
    <se:Body xmlns="urn:eek:asis:names:tc:DSML:2:0:core">
    <batchRequest>
    <searchRequest dn="cn=a-user,ou=Staff,ou=User Accounts,dc=staff,dc=someurl,dc=com" scope="baseObject" derefAliases="neverDerefAliases">
    <filter>
    <present name="objectclass"/>
    </filter>
    </searchRequest>
    </batchRequest>
    </se:Body>
    </se:Envelope>

    I always get an 'Internal Server Error' on the 'objHTTPRes = objHTTPReq.GetResponse()' line.

    Can anybody offer any advice on how to get this working? I've been trying for days now and am getting balder by the minute!
     
    Mark Parter, Jul 13, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. judith
    Replies:
    16
    Views:
    1,333
    Chris Uppal
    Oct 16, 2006
  2. Replies:
    1
    Views:
    492
  3. Replies:
    1
    Views:
    294
    Marc 'BlackJack' Rintsch
    Jul 1, 2008
  4. phil2phil

    having problems with webservice (proxy) reference

    phil2phil, Aug 12, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    183
    ArunPrakash
    Aug 13, 2005
  5. Roberto Giorgetti

    Error connection using webservice locally (3 webservice in balanci

    Roberto Giorgetti, Jun 13, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    312
    Roberto Giorgetti
    Jun 13, 2006
  6. blissdev
    Replies:
    1
    Views:
    171
    Logan Capaldo
    Sep 11, 2006
  7. Jeff Silverman

    I am having problems installing PDL using CPAN

    Jeff Silverman, Nov 11, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    243
    Jeff Silverman
    Nov 11, 2003
  8. mothra
    Replies:
    3
    Views:
    664
    Shawn Corey
    Dec 2, 2004
Loading...