Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Webservice problem

    I've got a problem with php webservice, on localhost everything works but when uploaded to a hosting provider it will not work.(I changed the url in the wsdl file) when i navigate with my browser to the files using the url in de wsdl file it works. Error: "Not Found"

    php serverside
    Code:
    function test()
    {
        return "Success";
    } 
    
    
    $server = new SoapServer( 'iChannelWebservice.wsdl' );
    $server->addFunction('test');      
    $server->handle();
    php clientside
    Code:
    $client = new SoapClient("http://channel.mainport.nl/soap/iChannelWebservice.wsdl");  
    print $client->test();
    wsdl
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://new.webservice.namespace" targetNamespace="http://new.webservice.namespace">
    	<wsdl:types>
    		<xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
    	</wsdl:types>
    	<wsdl:message name="testRequest">
    	</wsdl:message>
    	<wsdl:message name="testResponse">
    		<wsdl:part name="config" type="xs:string"/>
    	</wsdl:message>
    	<wsdl:portType name="iChannelWebservicePortType">
    		<wsdl:operation name="test">
    		    <wsdl:input message="tns:testRequest"/>
    			<wsdl:output message="tns:testResponse"/>
    		</wsdl:operation>
    	</wsdl:portType>
    	<wsdl:binding name="iChannelWebserviceBinding" type="tns:iChannelWebservicePortType">
    		<http:binding verb="GET"/>
    		<wsdl:operation name="test">
    			<http:operation location="urn:#test"/>
    			<wsdl:input>
    				<http:urlEncoded/>
    			</wsdl:input>
    			<wsdl:output>
    				<mime:content type="string"/>
    			</wsdl:output>
    		</wsdl:operation>
    	</wsdl:binding>
    	<wsdl:service name="iChannelWebservice">
    		<wsdl:port name="iChannelWebservicePort" binding="tns:iChannelWebserviceBinding">
    			<http:address location="http://channel.mainport.nl/soap/i-channelwebmethods.php"/>
    		</wsdl:port>
    	</wsdl:service>
    </wsdl:definitions>

  • #2

  • Users who have thanked gvre for this post:

    jrnvnjk (09-20-2011)

  • #3
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by gvre View Post
    It's case sensitive i guess :P i'll try.

  • #4

  • #5
    Regular Coder
    Join Date
    May 2011
    Posts
    240
    Thanks
    1
    Thanked 56 Times in 55 Posts
    Try this wsdl

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://new.webservice.namespace" targetNamespace="http://new.webservice.namespace">
            <wsdl:types>
                    <xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
            </wsdl:types>
            <wsdl:message name="testRequest">
            </wsdl:message>
            <wsdl:message name="testResponse">
                    <wsdl:part name="config" type="xs:string"/>
            </wsdl:message>
            <wsdl:portType name="iChannelWebservicePortType">
                    <wsdl:operation name="test">
                        <wsdl:input message="tns:testRequest"/>
                            <wsdl:output message="tns:testResponse"/>
                    </wsdl:operation>
            </wsdl:portType>
            <wsdl:binding name="iChannelWebserviceBinding" type="tns:iChannelWebservicePortType">
                    <http:binding verb="GET"/>
                    <wsdl:operation name="test">
                            <http:operation location="urn:#test"/>
                            <wsdl:input>
                                    <http:urlEncoded/>
                            </wsdl:input>
                            <wsdl:output>
                                    <mime:content type="string"/>
                            </wsdl:output>
                    </wsdl:operation>
            </wsdl:binding>
            <wsdl:service name="iChannelWebservice">
                    <wsdl:port name="iChannelWebservicePort" binding="tns:iChannelWebserviceBinding">
                            <http:address location="http://channel.mainport.nl/soap/i-ChannelWebmethods.php"/>
                    </wsdl:port>
            </wsdl:service>
    </wsdl:definitions>

  • #6
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    It works Tanks for your feedback

  • #7


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •