Link to home
Start Free TrialLog in
Avatar of imaginative
imaginative

asked on

PHP issue with SOAP?

I'm having a bit of difficulty working with a web service I'm trying to create in PHP.  Here's some output:

root@catalyst:/www/ll-prod-api/api# php soap.php

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: No address associated with <port> in /www/ll-prod-api/api/soap.php:3
Stack trace:
#0 /www/ll-prod-api/api/soap.php(3): SoapClient->SoapClient('foo.wsdl', Array)
#1 {main}
  thrown in /www/ll-prod-api/api/soap.php on line 3

And here is the WSDL:


<?xml version="1.0" encoding="UTF-8" ?>
<definitions name="limelock"
	targetNamespace="http://foo.com/demo"
	xmlns:tns="http://foo.com/demo"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="http://schemas.xmlsoap.org/wsdl/">
	
	<message name="DemoRequest">
		<part name="param1" type="xsd:string" />
	</message>
 
	<message name="DemoResponse">
		<part name="Result" type="xsd:string" />
	</message>
 
	<portType name="DemoPortType">
		<operation name="demo2">
			<input message="tns:DemoRequest" />
			<output message="tns:DemoResponse" />
		</operation>
	</portType>
 
	<binding name="DemoBinding" type="tns:DemoPortType">
		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
		<operation name="demo2">
			<soap:operation soapAction="http://foo.com/demo" />
			<input>
				<soap:body use="encoded" namespace="http://foo.com/demo" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
			</input>
			<output>
				<soap:body use="encoded" namespace="http://foo.com/demo" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
			</output>
		</operation>
	</binding>
 
	<service name="DemoService">
		<port name="DemoPort" binding="DemoBinding">
			<soap:address location="http://foo.com/demo" />
		</port>
	</service> 
 
</definitions>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial