Skip Menu |

This queue is for tickets about the SOAP-WSDL CPAN distribution.

Report information
The Basics
Id: 78932
Status: new
Priority: 0/
Queue: SOAP-WSDL

People
Owner: Nobody in particular
Requestors: arfreitas [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.00_10
Fixed in: (no value)



Subject: invalid package name when the service name has spaces in the WSDL
Greetings, I started using SOAP-WSDL to use as a client for a SOAP webservice made available at a Siebel CRM system. To start, I used the wsdl2perl to generate the Perl code to access the service: C:\temp\soap\soap-wsdl>wsdl2perl -b bug file:./BISAO_Health_Care_Professional.wsdl Creating complexType class MyTypes/HealthCareProfessionals.pm Creating complexType class MyTypes/Contact.pm Creating element class MyElements/HealthCareProfessionals.pm Creating element class MyElements/Siebel_spcOperation_spcObject_spcId.pm Creating element class MyElements/Process_spcInstance_spcId.pm Creating element class MyElements/Object_spcId.pm Creating element class MyElements/Error_spcMessage.pm Creating element class MyElements/Error_spcCode.pm Creating typemap class MyTypemaps/BISAO Health Care Professional.pm Creating interface class MyInterfaces/BISAO Health Care Professional/Query Contact.pm Multiple parts detected in message BISAO Health Care Professionals_Query_Input. WS-I BP demands 0 to 1 parts in message body For me there are no errors in this output, but when I checked the generated MyInterfaces directory, I found out that the package name created was invalid to Perl: package MyInterfaces::BISAO Health Care Professional::Query Contact; I made some testing by editing the WSDL manually and removing the spaces and I believe the issue happens because of the spaces in the service description at the WSDL file: <service name="BISAO Health Care Professional"> <port binding="tns:Query Contact_Binding" name="Query Contact"> <soap:address location="http://saoasdctt1/eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute" /> </port> </service> Just for reference, I've been able to invoke this webservice by using SOAP Lite application without any issue. Also, I tried to use XML::Compile::SOAP to make a client, but the distribution does not accept spaces in the namespaces URI. I double checked the proposal made by W3C regarding URI's for XML namespaces and looks like there is no defined pattern about the URI need to be valid or not. It seems there is still some debate about that. Anyway, I believe that SOAP-WSDL should generate an error message or at least remove the spaces when creating the Perl packages names (or replacing them with a underscore, for example). The latter solution looks like the best. I believe that SOAP-WSDL is the best thing CPAN has to offer nowadays regarding SOAP support for Perl. Thanks for your code! I would be glad to provide a patch but I'm not sure which is the correct way to fix this bug since I'm not an expert in SOAP RFC. I attached the WSDL file and the generated code from it. Regards, Alceu
Subject: BISAO_Health_Care_Professional.wsdl

Message body not shown because it is not plain text.

Subject: bug.tar
Download bug.tar
application/octet-stream 28k

Message body not shown because it is not plain text.