MegaPowerRockstar Posted July 21, 2015 Report Posted July 21, 2015 Hi... Need help in reading content from a soap header response... I am able to consume and connect to a service.... There is an operation that authenticates and gives a session id in soap body of response... but the body is empty.... ACTUAL RESPONSE: (SOAP FORMAT) <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <soap:Header> <snp:m_Header xmlns:snp="urn:UntricService"> <m_SessionID>SESSION1235</m_SessionID> </snp:m_Header> </soap:Header> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <snp:Authenticate xmlns:snp="urn:UntricService"/> </soap:Body> </soap:Envelope> CODE: UntricServiceSoapClient Client = new UntricServiceSoapClient(); Client.Authenticate(loginId, password); I am able to make the call successfully... but there is no return type for that method and response is in header..... How do i read that ?? can you please share samples.... In C#, i am trying to look at the possible types... but i am not able to locate that type....
puli_keka Posted July 21, 2015 Report Posted July 21, 2015 get the contract from partner team.. you need to have a c# serializable class, usually when you generate froxy it will also output response object's class whose service is this, ask them for froxy which has response object.. no need to reinvent the wheel
MegaPowerRockstar Posted July 22, 2015 Author Report Posted July 22, 2015 get the contract from partner team.. you need to have a c# serializable class, usually when you generate froxy it will also output response object's class whose service is this, ask them for froxy which has response object.. no need to reinvent the wheel i have the wsdl from them and i can see that they added a complex type in the header section of response... my qs is how do i retrieve from dot net....i dont see that in intellisance.. lttt
puli_keka Posted July 22, 2015 Report Posted July 22, 2015 no one to help ?????? Add Web reference lo wsdl ivvochu anta mari try that.. Usually if you add a service reference proxy adhe create chesthadi or svcutil command tho generate proxy.Cs.. Bye1 bye1
MegaPowerRockstar Posted July 22, 2015 Author Report Posted July 22, 2015 Add Web reference lo wsdl ivvochu anta mari try that.. Usually if you add a service reference ***** adhe create chesthadi or svcutil command tho generate *****.Cs.. bye1 bye1 I did add the service reference.. and also looked at the class file that gets generated by the proxy... I see the Header class being generated but not able to see them in the operation data annotations... but in soap ui we are able to see it....
Recommended Posts