Custom tool Warning: Cannot import wsdl:portType

Asked

Viewed 838 times

6

I can’t use the ServiceReference after successfully importing. After performing the import, write the class and use your methods in the build occur the Warnings:

Warning 1

Custom tool warning: Cannot import wsdl:portType
Detail: The ' ' character, hexadecimal value 0x20, cannot be included in a name.
Parameter name: name
XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:sigiss_ws']/wsdl:portType[@name='WebService SigISSPortType']    C:\ProjetosVS\ClientWBAws\ClientWBAws\ClientWBAws\Service References\ServiceReferenceSigISS\Reference.svcmap    1   1   ClientWBAws

Warning 2

Custom tool warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='urn:sigiss_ws']/wsdl:portType[@name='WebService SigISSPortType']
XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:sigiss_ws']/wsdl:binding[@name='WebService SigISSBinding']  C:\ProjetosVS\ClientWBAws\ClientWBAws\ClientWBAws\Service References\ServiceReferenceSigISS\Reference.svcmap    1   1   ClientWBAws

Warning 3

Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='urn:sigiss_ws']/wsdl:binding[@name='WebService SigISSBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:sigiss_ws']/wsdl:service[@name='WebService SigISS']/wsdl:port[@name='WebService SigISSPort']    C:\ProjetosVS\ClientWBAws\ClientWBAws\ClientWBAws\Service References\ServiceReferenceSigISS\Reference.svcmap    1   1   ClientWBAws

Error:

Error   4   Custom tool error: Failed to generate code for the service reference 'ServiceReferenceSigISS'.  Please check other error and warning messages for details.  C:\ProjetosVS\ClientWBAws\ClientWBAws\ClientWBAws\Service References\ServiceReferenceSigISS\Reference.svcmap    1   1   ClientWBAws

What must I do to correct this problem?

  • You can make calls work with WCFTestClient.exe?

3 answers

3

Without the file you imported I cannot give the complete solution to your problem, but I can help you explain the warnings.

Warning 1: says you cannot import wsdl:port because there is a ' ' ( blank ) in the type name, which cannot exist.

Warnings 2, 3 and 4 are consequences of the first. The 2 and 3 say that the declared types depend on the type of Warning 1 that could not be formed, so the latter also cannot. Finally Warning 4 that Build failed to perform and you should see the above errors/warnings.

In short: remove the name space of the type you have great chances of getting rid of all these warnings.

0

As Raul mentioned, the first Warning is a ' (space) that is in a parameter called "name".

Looking at the other details in the messages, highlight this excerpt:

/wsdl:portType[@name='WebService SigISSPortType'] 

I don’t know if you can change the <wsdl:portType> and put the name without space:

<wsdl:portType name="WebService-SigISSPortTYpe" />

0

Solved. The problem was in the way I declared the class.

  • 2

    I’m glad you liked the answers! But the best way to thank whoever helped you is to mark the best answer and vote for everyone who helped you. So you make sure that whoever wrote the answer gets something in return, in addition to making the site cleaner and more useful for everyone. Adding a new answer like this (which is not an answer to the question) makes the site more confusing and can get in the way.

  • It would be good to describe how the class was and how it was fixed, so that others can also avoid the same problem.

Browser other questions tagged

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