SV: changing endpoint

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

 



If you don't want to change the wsdl I guess you should be
able to change connection parameters when creating your client.

To be honest I haven't tested it myself. But I think it would
be a better solution to have connection settings in your
client rather than having to change wsdl or keep several
versions of the same wsdl around.

$client = new SoapClient(
                "mywsdl.wsdl",
                array("location" => "http://192.168.0.127:8001/service";));


Regards
Danne Lundqvist
http://www.dotvoid.com



-----Ursprungligt meddelande-----
Från: Antonio Reher [mailto:areher@sonoratec.biz] 
Skickat: den 25 januari 2005 10:27
Till: soap@lists.php.net
Ämne:  changing endpoint


Hi, I'm trying to use a SOAP webservice but i'm having big difficulties. 
They've provided me with a wsdl that requires basic http authentication, 
which is alright because i'm using php5's soapclient class. the problem is 
that the endpoint with the webservices is different from the one described 
in the wsdl. How can i change it? the wsdl is as follows (the endpoint i've 
been given is 
http://www.user.laestrella.es/emi_serviciosHogarServWeb/services/EmiServicio
sHogarHandler):

I'm desperate now because i've tried almost everything. Does anybody have a 
workaround?

Thanks in advance.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://tarificacion.emi.generali.es"; 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:impl="http://tarificacion.emi.generali.es"; 
xmlns:intf="http://tarificacion.emi.generali.es"; 
xmlns:tns2="http://bean.emi.generali.es"; 
xmlns:tns3="http://exception.framework.arq.generali.es"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
 <wsdl:types>
  <schema elementFormDefault="qualified" 
targetNamespace="http://bean.emi.generali.es"; 
xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:impl="http://tarificacion.emi.generali.es"; 
xmlns:intf="http://tarificacion.emi.generali.es"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
   <complexType name="CotizaReq">
...  </schema>  <schema elementFormDefault="qualified" 
targetNamespace="http://tarificacion.emi.generali.es"; 
xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:impl="http://tarificacion.emi.generali.es"; 
xmlns:intf="http://tarificacion.emi.generali.es"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
   <element name="executeCotizacion">
    <complexType>
     <sequence>
      <element name="testReq" nillable="true" type="tns2:CotizaReq"/>
     </sequence>
    </complexType>
   </element>
   <element name="executeCotizacionResponse">
    <complexType>
     <sequence>
      <element name="executeCotizacionReturn" nillable="true" 
type="tns2:CotizaRes"/>
     </sequence>
    </complexType>
   </element>
   <element name="executeAlta">
    <complexType>
     <sequence>
      <element name="testReq" nillable="true" type="tns2:AltaReq"/>
     </sequence>
    </complexType>
   </element>
   <element name="executeAltaResponse">
    <complexType>
     <sequence>
      <element name="executeAltaReturn" nillable="true" 
type="tns2:AltaRes"/>
     </sequence>
    </complexType>
   </element>
  </schema>
  <schema elementFormDefault="qualified" 
targetNamespace="http://exception.framework.arq.generali.es"; 
xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:impl="http://tarificacion.emi.generali.es"; 
xmlns:intf="http://tarificacion.emi.generali.es"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
   <complexType name="GeneraliException">
    <sequence>
     <element name="causingException" nillable="true" type="xsd:anyType"/>
    </sequence>
   </complexType>
   <element name="GeneraliException" nillable="true" 
type="tns3:GeneraliException"/>
  </schema>
 </wsdl:types>
   <wsdl:message name="executeCotizacionResponse">
      <wsdl:part element="intf:executeCotizacionResponse" 
name="parameters"/>
   </wsdl:message>
   <wsdl:message name="executeCotizacionRequest">
      <wsdl:part element="intf:executeCotizacion" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="GeneraliException">
      <wsdl:part element="tns3:GeneraliException" name="fault"/>
   </wsdl:message>
   <wsdl:message name="executeAltaResponse">
      <wsdl:part element="intf:executeAltaResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="executeAltaRequest">
      <wsdl:part element="intf:executeAlta" name="parameters"/>
   </wsdl:message>
   <wsdl:portType name="EmiServiciosHogarHandler">
      <wsdl:operation name="executeCotizacion">
         <wsdl:input message="intf:executeCotizacionRequest" 
name="executeCotizacionRequest"/>
         <wsdl:output message="intf:executeCotizacionResponse" 
name="executeCotizacionResponse"/>
         <wsdl:fault message="intf:GeneraliException" 
name="GeneraliException"/>
      </wsdl:operation>
      <wsdl:operation name="executeAlta">
         <wsdl:input message="intf:executeAltaRequest" 
name="executeAltaRequest"/>
         <wsdl:output message="intf:executeAltaResponse" 
name="executeAltaResponse"/>
         <wsdl:fault message="intf:GeneraliException" 
name="GeneraliException"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="EmiServiciosHogarHandlerSoapBinding" 
type="intf:EmiServiciosHogarHandler">
      <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="executeCotizacion">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="executeCotizacionRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="executeCotizacionResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="GeneraliException">
            <wsdlsoap:fault name="GeneraliException" use="literal"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="executeAlta">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="executeAltaRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="executeAltaResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="GeneraliException">
            <wsdlsoap:fault name="GeneraliException" use="literal"/>
         </wsdl:fault>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="EmiServiciosHogarHandlerService">
      <wsdl:port binding="intf:EmiServiciosHogarHandlerSoapBinding" 
name="EmiServiciosHogarHandler">
         <wsdlsoap:address 
location="http://localhost:9080/emi_serviciosHogarServWeb/services/EmiServic
iosHogarHandler"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions> 

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

______________________________________ 
OBS! Vi har ändrat våra e-postadresser, se avsändaradressen ovan. V.g.
uppdatera dina eventuella sändlistor.
N.B. Our e-mail addresses are changed (see above sender address). Please
change any sendlists accordingly. Thank you. 
______________________________________ 
This message and any files or documents attached are confidential and may
also be legally privileged or protected by other legal rules. It is intended
only for the individual or entity named. If you are not the named addressee
or you have received this email in error, please inform the sender
immediately, delete it from your system and do not copy or disclose it or
its contents or use it for any purpose.
 Thank you. 

Please also note that transmission cannot be guaranteed to be secure or
error-free. 

-- 
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