|
Posted by PHP Wooer on February 2, 2009, 8:29 am
Please log in for more thread options On Feb 2, 4:51=A0pm, "=C1lvaro G. Vicario"
show/hide quoted text
> PHP Wooer escribi=F3:
> > I am creating a web service, I have created a wsdl document for it.
> > WSDL doc and web services and clients are working properly in my local
> > machine. However when I upload the wsdl file on my remote hosting
> > server, when I try to browse the uploaded wsdl file (i.e. to open it)
> > it asks for download.
> > But in my local machine when I browse the wsdl file it properly
> > displays its contents.
> > Why is this happening on the remote server, is there some setting to
> > be done?
> Most likely, your script does not set the appropriate HTTP headers and
> the web server is using its default settings.
> If unsure, inspect the headers with your favourite Firefox extension
> (Live HTTP Headers, Firebug...) in the server where they work and add it
> to your PHP code with calls to header().
> --
> --http://alvaro.es- =C1lvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programaci=F3n web:http://bits.demogracia.com
> -- Mi web de humor al ba=F1o Mar=EDa:http://www.demogracia.com
> --
Thanks =C1lvaro,
I have checked the XML header of WSDL file and it looks fine to me.
Here is the the wsdl file contents:
show/hide quoted text
<?xml version =3D'1.0' encoding =3D'UTF-8' ?>
<definitions name=3D'Contacts' targetNamespace=3D'http://10.21.1.237/khex/ soap/contacts' xmlns:tns=3D' http://10.21.1.237/khex/soap/contacts'
xmlns:soap=3D'http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd=3D'http://
www.w3.org/2001/XMLSchema' xmlns:soapenc=3D'http://schemas.xmlsoap.org/ soap/encoding/' xmlns:wsdl=3D'http://schemas.xmlsoap.org/wsdl/'
show/hide quoted text
xmlns=3D'http://schemas.xmlsoap.org/wsdl/'>
show/hide quoted text
<message name=3D'getContactRequest'>
<part name=3D'contactName' type=3D'xsd:string'/>
</message>
<message name=3D'addContactRequest'>
<part name=3D'contactInfo' type=3D'xsd:array'/>
</message>
<message name=3D'getContactResponse'>
<part name=3D'Result' type=3D'xsd:array'/>
</message>
<message name=3D'addContactResponse'>
<part name=3D'contactAdded' type=3D'xsd:array'/>
</message>
show/hide quoted text
<portType name=3D'ContactPortType'>
<operation name=3D'getContacts'>
<input message=3D'tns:getContactRequest'/>
<output message=3D'tns:getContactResponse'/>
</operation>
</portType>
show/hide quoted text
<portType name=3D'ContactPortType2'>
<operation name=3D'addContacts'>
<input message=3D'tns:addContactRequest'/>
<output message=3D'tns:addContactResponse'/>
</operation>
</portType>
show/hide quoted text
<binding name=3D'ContactBinding' type=3D'tns:ContactPortType'>
<soap:binding style=3D'rpc' transport=3D'http://schemas.xmlsoap.org/soap/ show/hide quoted text
http'/>
<operation name=3D'getContacts'>
<soap:operation soapAction=3D'urn:10.21.1.237-khex-soap-
show/hide quoted text
contacts#getContacts'/>
<input>
<soap:body use=3D'encoded' namespace=3D'urn:10.21.1.237-khex-soap-
show/hide quoted text
contacts' encodingStyle=3D'http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body use=3D'encoded' namespace=3D'urn:10.21.1.237-khex-soap-
show/hide quoted text
contacts' encodingStyle=3D'http://schemas.xmlsoap.org/soap/encoding/'/>
</output>
</operation>
</binding>
show/hide quoted text
<binding name=3D'ContactBinding2' type=3D'tns:ContactPortType2'>
<soap:binding style=3D'rpc' transport=3D'http://schemas.xmlsoap.org/soap/ show/hide quoted text
http'/>
<operation name=3D'addContacts'>
<soap:operation soapAction=3D'urn:10.21.1.237-khex-soap-
show/hide quoted text
contacts#addContacts'/>
<input>
<soap:body use=3D'encoded' namespace=3D'urn:10.21.1.237-khex-soap-
show/hide quoted text
contacts' encodingStyle=3D'http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body use=3D'encoded' namespace=3D'urn:10.21.1.237-khex-soap-
show/hide quoted text
contacts' encodingStyle=3D'http://schemas.xmlsoap.org/soap/encoding/'/>
</output>
</operation>
</binding>
show/hide quoted text
<service name=3D'ContactService'>
<port name=3D'ContactPort' binding=3D'ContactBinding'>
<soap:address location=3D'http://10.21.1.237/khex/soap/contacts/ show/hide quoted text
contacts-functions.php'/>
</port>
</service>
<service name=3D'ContactService2'>
<port name=3D'ContactPort2' binding=3D'ContactBinding2'>
<soap:address location=3D'http://10.21.1.237/khex/soap/contacts/ show/hide quoted text
contacts-functions.php'/>
</port>
</service>
</definitions>
Here the IP address is of LAN, however similar file except the IP
address I have uploaded on my remmote server.
|
> WSDL doc and web services and clients are working properly in my local
> machine. However when I upload the wsdl file on my remote hosting
> server, when I try to browse the uploaded wsdl file (i.e. to open it)
> it asks for download.
>
> But in my local machine when I browse the wsdl file it properly
> displays its contents.
>
> Why is this happening on the remote server, is there some setting to
> be done?