|
Problem consuming dot net webservice usign nusoap.: msg#00039php.nusoap.general
Hi, I am trying to consume my web service (which is in asp.net/vb.net) in my php page using nusoap. My WebMethod code is : <WebMethod()> _ Public Function GetMsg(ByVal abc As String) As String Dim Text As String Dim sr As StreamWriter sr = File.CreateText("E:\Amol\test\Webservicetest.txt") sr.Write("<Start>") sr.Write(abc) sr.Write("<End>") sr.Close() sr = Nothing Return "Sucessful" End Function and the PHP Code is <? require_once('nusoap.php'); $wsdl="http://localhost/GreetingService/Service1.asmx?wsdl"; $client=new soapclient($wsdl,'wsdl'); $resp=$client->call('GetMsg','Test'); print_r($resp); ?> I am using nusoap in php to access the webservice. The Webmethod is returning the message alright but the value which I am passing is not being written to the txt file. I am not understanding what is going wrong. The error I am getting is : ( [faultcode] => soap:Client [faultstring] => Server did not recognize the value of HTTP Header SOAPAction: . [detail] => ) I read on a microsoft forum that appending [SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)] before the webservice class will do the trick. but it gives me another error. ( [faultcode] => soap:Client [faultstring] => The request element <GetMsg xmlns='http://tempuri.org'> was not recognized. [detail] => ) My requirement is that my php page should send some parameters to my webservice (it is on microsoft platform) e.g. product Id and the webservice returns all relavent details for that product to the page which is displayed on the page. My pages have to be in php and at present I am using microsoft technologies at the backend, asp, asp.net, vb.net ms sql server. Any help will be appreciated. Any alternative ways will also be appreciated. I am new to this. Any help preferably with examples (or links) will be greatly appreciated. Amol ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: NuSOAP client w/WSDL not returning value: 00039, Scott Nichol |
|---|---|
| Next by Date: | use of "xsd:ur-type" for serialization of arrays and structs: 00039, Ingo Fischer |
| Previous by Thread: | NuSOAP client w/WSDL not returning valuei: 00039, Andrew Pasetti |
| Next by Thread: | Re: Problem consuming dot net webservice usign nusoap.: 00039, Scott Nichol |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |