Wdsl problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I created a soap web service, with two functions.
But ther server recognize only one function.
The wsdl file:

<?xml version="1.0"?>
<definitions name="HelloWorld" targetNamespace="urn:HelloWorld"
xmlns:tns="urn:HelloWorld"  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns="http://schemas.xmlsoap.org/wsdl/";>
  <types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema";
targetNamespace="urn:DataService">
      <xsd:element name="getParameterLook" type="xsd:string" />
	  <xsd:element name="getParameterAmadeusFirstID" type="xsd:string" />
	  <xsd:element name="GetAgentPerMonthParameterResponse" type="xsd:string"
/>	

      <xsd:element name="getOverallLook" type="xsd:string" />
	  <xsd:element name="getOverallAmadeusFirstID" type="xsd:string" />
	  <xsd:element name="GetAgentPerMonthOverallResponse" type="xsd:string" />	  
	</xsd:schema>			
  </types>
  
  <message name="GetAgentPerMonthParameter">
    <part name="look" type="tns:getParameterLook" />
	<part name="AmadeusFirstID" type="tns:getParameterAmadeusFirstID" />
  </message>
  
  <message name="GetAgentPerMonthOverall">
    <part name="look" type="tns:getOverallLook" />
	<part name="AmadeusFirstID" type="tns:getOverallAmadeusFirstID" />
  </message>

  <message name="doGetAgentPerMonthParameterResponse">
    <part name="return" type="tns:GetAgentPerMonthParameterResponse" />
  </message>  
  
  <message name="doGetAgentPerMonthOverallResponse">
    <part name="return" type="tns:GetAgentPerMonthOverallResponse" />
  </message>  

  <portType name="GetAgentPerMonthParameterPort">
  	<operation name="GetAgentPerMonthParameter">
	  <input message="tns:GetAgentPerMonthParameter" />
	  <output message="tns:doGetAgentPerMonthParameterResponse" />
	  </operation>
	</portType>
	
	  <portType name="GetAgentPerMonthOverallPort">
	  	<operation name="GetAgentPerMonthOverall">
	  <input message="tns:GetAgentPerMonthOverall" />
	  <output message="tns:doGetAgentPerMonthOverallResponse" />
	</operation>
	</portType>
 
   <binding name="GetAgentPerMonthParameterBinding"
type="tns:GetAgentPerMonthParameterPort">
   <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
  	 <operation name="GetAgentPerMonthParameter">
	    <soap:operation soapAction="urn:GetAgentPerMonthParameterAction" />
		<input>
		  <soap:body use="encoded" namespace="urn:Hello"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; />		  
		</input>
		<output>
		  <soap:body use="encoded" namespace="urn:Hello"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; />		  
		</output>
	  </operation>
	 </binding>
	 
<binding name="GetAgentPerMonthOverallBinding"
type="tns:GetAgentPerMonthOverallPort">
   <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
     	 <operation name="GetAgentPerMonthOverall">
	    <soap:operation soapAction="urn:GetAgentPerMonthOverallAction" />
		<input>
		  <soap:body use="encoded" namespace="urn:Hello"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; />		  
		</input>
		<output>
		  <soap:body use="encoded" namespace="urn:Hello"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; />		  
		</output>
	  </operation>
	 </binding>
  
    <service name="GetAgentPerMonthParameterService">
	<port name="GetAgentPerMonthOverallPort"
binding="tns:GetAgentPerMonthOverallBinding">
	  <soap:address location="http://localhost/DataService/DataService.php"; />
	</port>
    <port name="GetAgentPerMonthParameterPort"
binding="tns:GetAgentPerMonthParameterBinding">
	  <soap:address location="http://localhost/DataService/DataService.php"; />
	</port>
  </service>
    
</definitions>

The php server file:
<?php
if(!extension_loaded("soap")){
  dl("php_soap.dll");
}

ini_set("soap.wsdl_cache_enabled","0");
$server = new SoapServer("DataService.wsdl");

function GetAgentPerMonthParameter($look, $AmadeusFirstID){
	return "prompt('GetAgentPerMonthParameter');";
}

function GetAgentPerMonthOverall($look, $AmadeusFirstID){
	return "GetAgentPerMonthOverall";
}

$server->AddFunction("GetAgentPerMonthParameter");
$server->AddFunction("GetAgentPerMonthOverall");
$server->handle();
?>

When the client call to the first function (GetAgentPerMonthParameter) it's
seem to work ok, 
But when the client call to the second function (GetAgentPerMonthOverall) 
it's call to the first function (GetAgentPerMonthParameter) !
What's wrong in my code?
-- 
View this message in context: http://old.nabble.com/Wdsl-problem-tp31574819p31574819.html
Sent from the Php - Soap mailing list archive at Nabble.com.


-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux