|
Re: Problem consuming dot net webservice usign nusoap.: msg#00048php.nusoap.general
You are not passing parameters correctly from your PHP code. First, parameters to $client->call must be in an array. As such, a more typical call would be $params = array('abc' => 'Test'); $resp = $client->call('GetMsg', $params); However, unless you explicitly specify otherwise, a .NET method will use document/literal instead of rpc/encoded SOAP. For document/literal, the method parameters are wrapped in an additional element that .NET names "parameters". Your could would look like $params = array('abc' => 'Test'); $resp = $client->call('GetMsg', array('parameters' => $params)); Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: "Amol Dalvi" <amol.007@xxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, April 12, 2005 1:46 AM Subject: [Nusoap-general] Problem consuming dot net webservice usign nusoap. > 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 > _______________________________________________ > Nusoap-general mailing list > Nusoap-general@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/nusoap-general > ------------------------------------------------------- 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_ide95&alloc_id396&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Howto make "nested" arrays?: 00048, Scott Nichol |
|---|---|
| Next by Date: | problems with charset encoding: 00048, Gaetano Giunta |
| Previous by Thread: | Problem consuming dot net webservice usign nusoap.i: 00048, Amol Dalvi |
| Next by Thread: | use of "xsd:ur-type" for serialization of arrays and structs: 00048, Ingo Fischer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |