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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP SOAP: Problem parsing WSDL

    Hi all

    I have really been scratching my head on this. Can anybody help me out here?

    I am to consume a webservice:
    WDSL: http://services.conzoom.eu/addit/AddItService.svc?wsdl

    The webservice utilizes WS-security, and I rely on the WSSoapClient class to handle this aspect for me ( http://www.phpclasses.org/browse/package/3640.html )

    I had everything setup and working for several weeks. Then apparantly something was changed at the WS end and I can no longer connect. Although the folks behind the service says that nothing changed.

    My problem is that I get a WSDL-parser error:

    SOAP-ERROR: Parsing WSDL: <message> 'AddItService_GetValues_InputMessage' already defined in (my file)
    My code looks like this:
    PHP Code:
    ini_set("soap.wsdl_cache_enabled""0");
        include(
    'WSSoapClient.class.php');
          
    $url "http://services.conzoom.eu/addit/AddItService.svc?wsdl";
          
        
    $client = new SoapClient($url,array(                                                ** ERROR refers to this line **
            
    'soap_version' => SOAP_1_2,
            
    "trace"      => 1
            
    "exceptions" => 0,
        
    "cache_wsdl" => "WSDL_CACHE_NONE"));
        
    $client->__setUsernameToken(USERNAME,PASSWORD);
        
    $params = array('input'=>array(array('Type'=>'StreetAndHouseno','Value'=>$address),array('Type'=>'PostcodeAndDistrict','Value'=>$zip)),'variables'=>array(410,411));

        
    $result=$client->__soapCall('GetValues',array($params));


        print 
    "<pre>\n"
        print 
    "Request: \n".htmlspecialchars($client->__getLastRequest()) ."\n"
        print 
    "Response: \n".htmlspecialchars($client->__getLastResponse())."\n"
        print 
    "</pre>"
    Can anyone spot any obvious mistakes or have any ideas as to what might be wrong here. I'm getting nuts, as it was extremely easy to set up in the first place, and now I have spent hours and hours to fix this thing.

    Any help would be much appreciated

    Best regards, Thomas
    Last edited by TNielsen; 11-04-2009 at 03:41 PM. Reason: Further info given

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    254
    Thanks
    1
    Thanked 63 Times in 63 Posts
    Haven't had the opportunity to work with SOAP before but based on the error message, I'm suspecting that somewhere in your code, you have a loop of sorts, with regards to the the provided code.
    So, if I'm not mistaken, changing
    PHP Code:
    include('WSSoapClient.class.php'); 
    to
    PHP Code:
    include_once('WSSoapClient.class.php'); 
    should fix your problem

  • #3
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Unfortunately that wasn't the problem.

    The error refers to this line:

    PHP Code:
    $client = new SoapClient($url,array(
            
    'soap_version' => SOAP_1_2,
            
    "trace"      => 1
            
    "exceptions" => 0,
        
    "cache_wsdl" => "WSDL_CACHE_NONE")); 
    and basically says, that there is a dual definition in the WSDL-file referred to by $url. However to me the WSDL seems well formatted.

    But thanks a lot for your reply


  •  

    Posting Permissions

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