Create Client code to access a webservice vb.net

Lulkallecycle

New Member
I will try to be as clear as I can here.I'm using Language vb.net, Framework .Net 2.0, WS Security I have a third party webservice that I need to send data to and receive a response etc.I need to send WS security information in the SOAP header and I have created the header part of the soap message manually with a Usernametoken, Nonce and created date.SOAP request format:\[code\]<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"><soapenv:Header> <wsse:Security soapenv:mustUnderstand="1"> <wsse:UsernameToken wsu:Id="UsernameToken-22347273"> <wsse:Username>POSC-CUS176</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">AXsYUKPBQzPqJq/QkW+QSsNZ+HE</wsse:Password> <wsse:Nonce>VFRUMjAwODA1MjMwNjA3Mzg3OTY</wsse:Nonce> <wsu:Created>2008-05-23T06:07:38.796Z</wsu:Created> </wsse:UsernameToken> </wsse:Security></soapenv:Header><soapenv:Body> <p194:verifyNameAddress xmlns:p194="http://www.address.com/xml/schema/ccs/verifynameaddress/v1"> <p194:verifyNameAddressDto> <p194:inputRefId>2345678901</p194:inputRefId> <p194:crn>202692419S</p194:crn> <p194:surname>WALSH</p194:surname> <p194:firstName>BELINDA</p194:firstName> <p194:middleName>ANN</p194:middleName> <p194:dob>1973-08-08</p194:dob> <p194:addrLn1>10 HONEYEATER AVE</p194:addrLn1> <p194:suburb>NOOSAVILLE</p194:suburb> <p194:state>QLD</p194:state> <p194:pcode>4566</p194:pcode> <p194:cnfrmDate>2008-07-01</p194:cnfrmDate> </p194:verifyNameAddressDto> </p194:verifyNameAddress></soapenv:Body></soapenv:Envelope> \[/code\]Im just not sure how to create the soap body of the message. I know i could use an xml document but i need help with creating the elements with there attributes.I would be greatful for any help or direction.ThanksS
 
Back
Top