Forum Discussion

papabill's avatar
12 years ago

Howto translate SoapUI TestCase to .NET?

I am fairly new to SOAP. I have a SoapUI test that calls a web service, and it works correctly, returns the correct response. I generated some .NET classes and put them in my .NET C# project. I can not get the .NET call to work. I suspect it is because I dont know how to translate the security settings from the SoapUI TestCase to the .NET function calls. Can anyone point me in that direction?

Here is the Raw HTTP from the SoapUI test case. What security objects do I need in .NET?

POST https://secure.saashr.com/ta/ITPDemo.soap HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Content-Length: 925
Host: secure.saashr.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ta="http://saashr.com/ta">
<soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken wsu:Id="UsernameToken-25"><wsse:Username>whatever</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">whatever</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">YzuPVEZRb6K7o/vVSZl2mw==</wsse:Nonce><wsu:Created>2012-11-14T07:04:51.187Z</wsu:Created></wsse:UsernameToken></wsse:Security></soapenv:Header>
<soapenv:Body>
<ta:helloWorld/>
</soapenv:Body>
</soapenv:Envelope>


Many thanks for any help.