NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problem consuming .net service


Joined: 18 Apr 2007
Posts: 1
Reply with quote
so I am having trouble accessing a .net web service from php

without the error catch it does nothing -- with it I get "error 1"

all it should do is return hello

i have the following php code

<?php

require_once('lib/nusoap.php');

$client = new soapclient('http://localhost/WebSite4/Service.asmx');





if(!$err = print($client->call('hello')) ){
print($client->call('hello'));
} else {
print "ERROR: $err";
}


print_r("here");

?>


POST /WebSite4/Service.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri_org/hello"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<hello xmlns="http://tempuri_org/" />
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<helloResponse xmlns="http://tempuri_org/">
<helloResult>string</helloResult>
</helloResponse>
</soap:Body>
</soap:Envelope>
View user's profileFind all posts by tpiazza55Send private message


Joined: 20 Sep 2007
Posts: 2
Location: Griffith, NSW, Australia
Reply with quote
Are there any followups to this problem? it affects me too!
View user's profileFind all posts by nic_john_carSend private message


Joined: 20 Sep 2007
Posts: 2
Location: Griffith, NSW, Australia
Reply with quote
There is a workaround available: manually coding the request envelope, see: http://users.skynet.be/pascalbotte/rcx-ws-doc/nusoapadvanced.htm
View user's profileFind all posts by nic_john_carSend private message
Problem consuming .net service
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic