Error when viewing Webservice Consultregistration 2

Asked

Viewed 844 times

1

I’m trying to automate Sintegra consultations here at my company. I am trying to implement in VB.NET (company software language), the consultation through the webservice provided by Sefaz (https://sef.sefaz.rs.gov.br/ws/cadconsultacadastro/cadconsultacadastro2.asmx)

However, at the time of calling the service, passing the header and the message, VS returns me the following error:

System.Web.Services.Protocols.Soapheaderexception: SOAP header Action was not understood. at System.Web.Services.Protocols.Soapheaderhandling.Setheadermembers(Soapheadercollection headers, Object target, Soapheadermapping[] mappings, Soapheaderdirection Direction, Boolean client) at System.Web.Services.Protocols.Soapserverprotocol.Createserverinstance() At System.Web.Services.Protocols.Webservicehandler.Invoke() at System.Web.Services.Protocols.Webservicehandler.Coreprocessrequest()

I’ve searched several forums about a solution. So far nothing.

  • Post your code, it’s necessary...

  • the code did not fit here. I will provide the download link via Dropbox https://www.dropbox.com/s/6g31g0hzav8lf8y/codigo.txt

1 answer

2


To access web services via . NET follow the following steps:

  1. Right-click the project and select "Add Web References..."
  2. Enter the Web Service URL.

Now, simply instantiate the Web Service object as an object and call the Web Services methods.

From what I saw in your code, you are creating the web service call manually, which makes it very difficult to maintain the code.

  • Thanks Eduardo. I redid the code and it worked. I hit a bit on xml, because it is case Sensitive. I appreciate the attention!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.