David
David

Reputation: 31

PHP webservice SOAPClient error

I have a webserivce and just doing simple thing to call webservice in SOAP Client

i.e.

$client = new SoapClient("http://test.unistream.com/wcflib/service.svc?WSDL");

It says

SOAP-ERROR: Parsing WSDL: 'IWebService_GetCountries_InputMessage' already defined

web service is

http://test.unistream.com/wcflib/service.svc?WSDL

Thanks.

Upvotes: 3

Views: 3507

Answers (3)

JayMore
JayMore

Reputation: 211

I experienced the same error with my system : the Soap client was in PHP (5.3.10) and the server side was written in .NET :

  • I loaded the wsdl "Foo.wsdl" from PHP
  • Then the "Foo.wsdl" did an import of "Bar.wsdl"
  • then "Bar.wsdl" import again "Foo.wsdl"
  • PHP crash with "SOAP-ERROR: Parsing WSDL: bla bla already defined

To avoid this, i simply use the case-unsensitive standard feature of .net, and I call the first wsdl in lower case ("foo.wsdl") instead of original case (Foo.wsdl). It worked because now, foo.wsdl import Bar.wsdl, and Bar.wsdl import Foo.wsdl, and by a curious things i cant explain, PHP likes that.

Upvotes: 0

benjy
benjy

Reputation: 4716

The issue is that the 'IWebService_GetCountries_InputMessage' type is defined more than once in that WSDL. This is not an error with your code, but with the WSDL you are attempting to consume. You should talk to whoever wrote the WSDL to see if they can recreate it and fix the issue.

Upvotes: 1

adrian7
adrian7

Reputation: 1016

It might be related, or same issue with this: https://bugs.php.net/bug.php?id=43868 ,

also you may find a possible solution here PHP SoapClient: Problems with Distributed WSDL File

(maybe duplicate...)

later edit, here another link: http://www.codingforums.com/showthread.php?t=181338

Upvotes: 1

Related Questions