How to access a PHP Web Service from ASP.Net?
Posted
by Steve Johnson
on Stack Overflow
See other posts from Stack Overflow
or by Steve Johnson
Published on 2010-03-18T12:02:20Z
Indexed on
2010/03/18
12:21 UTC
Read the original article
Hit count: 423
I am trying use a web service in a C# ASP.Net Web Application. The service is built in php and is located on some remote server not under my control so i cant modify it to add meta data or something else into it.
When i use the "Add Web Reference" option in Visual Studio 2008, I receive the following error:
The HTML document does not contain Web service discovery information.
while trying to add the following web service.
https://subreg.forpsi.com/robot2/subreg_command.php?wsdl
The web service functions are exposed and displayed in Visual Studio 2008. however i could not add the reference to it for use in ASP.Net Application.
t3Service" Description
Methods __construct ( )
create_contact ( )
get_contact ( )
get_domain_info ( )
get_last_error_code ( )
get_last_error_msg ( )
get_NSSET ( )
get_owner_mail ( )
login ( )
register_domain ( )
register_domain_with_admin_contacts ( )
renew_domain ( )
request_sendmail ( )
send_auth_info ( )
transfer_domain ( )
I also tried the wsdl.exe method by retrieving the xml and copying it to a wsdl file and generating a proxy class. But the wsdl output contains warnings and the proxy class generated skips the exposed fucntions and generates something like this:
// CODEGEN: The operation binding 'create_contact' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'get_contact' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'get_domain_info' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'get_last_error_code' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'get_last_error_msg' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'get_NSSET' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'get_owner_mail' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'send_auth_info' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'transfer_domain' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'request_sendmail' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'login' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'register_domain' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'register_domain_with_admin_contacts' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type. // CODEGEN: The operation binding 'renew_domain' from namespace 'urn:t3' was ignored. Each message part in an use=encoded message must specify a type.
Any help in this regard will be highly appreciated.
Regards
© Stack Overflow or respective owner