0

I have developed a WebService in PHP using SoapDiscovery class made by Braulio José Solano Rojas but with some adjustments made by me in order to support complex types.

The problem is that I can use the webservice in PHP client, but not in VS 2012. When adding the Web reference, Web Service methods are detected and I can add the reference correctly, but when I try to use it, intellisense does not show it, so that I cannot instantiate it and do nothing. I can, however, use a Webservice that does not use complex types.

The WSDL is at: http://feriados.servicios.desytec.com/feriados?wsdl

Please advise me.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
jstuardo
  • 3,901
  • 14
  • 61
  • 136
  • Why did you use a web reference instead of a service reference? Also, see http://johnwsaunders3.wordpress.com/2009/05/17/how-to-consume-a-web-service/ to learn how to find where the code went. – John Saunders Mar 24 '14 at 23:05
  • because it is a web service.... I have another web service that does not have complex types and it works. – jstuardo Mar 25 '14 at 20:50
  • You should always use service references. Web references are part of the legacy ASMX technology, which should not be used for new development. – John Saunders Mar 25 '14 at 20:58
  • I tried it, but I cannot use the service either. It does not even appear in Object Browser – jstuardo Mar 25 '14 at 21:00
  • Again, look at the link I posted to figure out where your Reference.cs/.vb is located; then look inside to find the code. – John Saunders Mar 25 '14 at 21:01
  • Reference.cs appears empty. Only the comments telling that is an auto-generated code is inside. – jstuardo Mar 25 '14 at 21:06
  • Ok, then try using svcutil.exe from the command line, to see what errors come back. – John Saunders Mar 25 '14 at 21:07
  • in fact... there are 3 errors... the first one is: wdsl:portType cannot be imported. A schema with the namespace "urn:Desytec_Feriados" cannot be found. The only difference f this webservice with respect to a webservice that does work, is that in this case, complex types are being defined. – jstuardo Mar 25 '14 at 21:41
  • And, is there a schema with that namespace? – John Saunders Mar 25 '14 at 21:41
  • Ok, that's just wrong. You have `complexType` outside of any `schema` – John Saunders Mar 25 '14 at 21:44
  • Yes.. that was the problem... however, due to this correction, I realized also that array type is defined bad... well... that will be for another question. – jstuardo Mar 26 '14 at 00:14
  • And finally, I was able to create an instance of the Webservice from a Visual Studio application, however, at the moment of invocation, a "Moved Permanently" error is thrown. Do you know how to solve it? – jstuardo Mar 26 '14 at 10:37

0 Answers0