Avatar of ts84zs
ts84zs
 asked on

Read Soap services in .net

I have to read data published on soap-services.

I have the WSDL of the soap service.

In order to request the data or to connect to that soap-service, first of all, I have to connect using userid/password.

Then I have to pass a request whose xml looks like this -

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cm="http://oracle.com/mysoapservices.xsd">
   <soapenv:Header/>
   <soapenv:Body>
      <mysoapservices>
    <request>
        <assignmentId></assignmentId>
        <needCompletionDetails>Y</needCompletionDetails>  
        <hostSystem>myhostsystem</hostSystem>
    </request>  
      </mysoapservices>
   </soapenv:Body>
</soapenv:Envelope>

That request will send a response, which will also be xml-format...
I have to write that data to a database . I can do like whats mentioned in  https://msdn.microsoft.com/en-us/library/bb628652.aspx but I have to  access the data  by passing that xml-request object and getting xml-response object...

How should i do it.  I want to do it in .net

Thanks so much...
.NET ProgrammingASP.NETSOAP Protocol

Avatar of undefined
Last Comment
Ioannis Paraskevopoulos

8/22/2022 - Mon
ste5an

See Using the SOAP Interface.

That request will send a response, which will also be xml-format...
Obvious, that's how SOAP works.

I have to  access the data  by passing that xml-request object and getting xml-response object...
When it is a SOAP Service: Then NO, you have not to do that. Cause adding the web service reference to your project will create all the necessary code behind, so that you can access those values by the generated classes,
ts84zs

ASKER
Is that the only way to access read soap services...
ste5an

No, but that's the reason why SOAP service are built they way they are.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ts84zs

ASKER
Ok thanks so much... So that's the best way to do it ?
ste5an

Yup.
ts84zs

ASKER
Ok thanks a lot
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ts84zs

ASKER
i found this one another way  to access SOAP - http://www.roelvanlisdonk.nl/?p=1893.. its like using HttpWebRequest class
What are pros & cons of both the methods? thanks so much....
ste5an

It ignores the SOAP stack in VS... so you may do it like that. But you will have a much harder day finding bugs in your code.
ts84zs

ASKER
Thanks so much... Can you please send me more information like link that provides such tips for accessing soap services or books
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
ste5an

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ts84zs

ASKER
thanks so much
ts84zs

ASKER
My SOAP services are created using  some oracle obiee server .. So  I cannot use SOAPClient class...
ste5an

Does it provide a WSDL?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ts84zs

ASKER
Yes
ste5an

Then use this WSDL to add your service reference.
ts84zs

ASKER
ok... thanks so much....
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Ioannis Paraskevopoulos

Hi,

I would like to urge you on following ste5an's advice. Yes, you can call SOAP manually as that article describes, but why? It would be like reinventing the wheel, when the adding a Service Reference will do the hard job for you. After that you do not have to care about the XML, you will get actual .Net classes to fill in and use for your requests and responces.

Giannis