locked
SOAPUI vs VB .NET RRS feed

  • Question

  • hello

    i am trying to write a vb .net program to send a digtally signed XML file to a webservice. I have currently tried to send it using

      HttpReq.open "POST", "https://rospublictest.ros.ie:8443/customs/service/rcmCollect", False
        HttpReq.setRequestHeader "POST", "https://rospublictest.ros.ie:8443/customs/service/rcmCollect HTTP/1.1"
        HttpReq.setRequestHeader "Host", "rospublictest.ros.ie:8443"
        HttpReq.setRequestHeader "Content-Type", "text/xml;charset=UTF-8"
        HttpReq.setRequestHeader "Content-Length", Len(objDOM.xml)
        HttpReq.setRequestHeader "SOAPAction", """https://rospublictest.ros.ie:8443/customs/service/rcmCollect"""
        HttpReq.setRequestHeader "User-Agent", "Jakarta Commons - HttpClient / 3.1"
        HttpReq.send (objDOM.Text)

    I have also tried using httpwebrequest from both i get server erro 500 reported. If i send the same file from SOAPUI or XMLSPY it works fine.

    can anyone explain???

    Thursday, April 1, 2010 10:37 PM

Answers

All replies

  • Compare using Fiddler the request you send to the one soapUI sends.

    Maybe you missed some http header?

    Maybe the xml is formatted differently which causes the siganture to be invalid?

     

    Remember you are not allows to change anything in the message after the signature has been generated.

    Also check if the server response or server logs contain any additional information as for what was the error.


    http://webservices20.blogspot.com/
    WCF Security, Performance And Testing Blog
    Thursday, April 1, 2010 11:17 PM
  • hi apparently its the way im sending the data the file is okay any ideas??
    Friday, April 2, 2010 10:54 AM
  • Please elaborate. what is the difference you find using fiddler?
    http://webservices20.blogspot.com/
    WCF Security, Performance And Testing Blog
    Friday, April 2, 2010 3:21 PM
  • Hi

     

    fiddler was a bit strange as it didnt show all the headers i was sending or the actual file could be me as i havent used before.

    Friday, April 2, 2010 6:43 PM
  • Fiddler will show all headers. Which version are you using? http://www.fiddler2.com/fiddler2/?

    Once you've gotten used to Fiddler, you should assume that any headers you don't see are not there.

     


    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Friday, April 2, 2010 7:08 PM
    Moderator
  • yes im using fiddler 2 it shows 2 headers even though the code is sending more. But not sure if the fact im sending on https means it not showing them. it does say that the content-length : 0 ats if the file is not being sent at all which is strange
    Friday, April 2, 2010 8:32 PM
  • Does the problem occur when using http instead of https?

    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Saturday, April 3, 2010 6:53 AM
    Moderator
  • I think the problem is "HttpReq.setRequestHeader "POST" ", POST is not header but a method to call the service, which you already mentioned in the Open method. Remove this and try.
    Sunday, April 4, 2010 4:59 AM