Hi Ben

If you wsdl doesnt contain a ns1 namespace, I guess the error comes from the 
SOAP message that your CXF component is sending to your external service. Do 
you know the content of this message? (You can activate debug mode of log4j if 
needed)

If you still can't solve your problem, can you provide us with the content of 
the message and the wsdl? (you can attach the file)

Regards
Vivian

-----Message d'origine-----
De : Brown, Ben [mailto:[email protected]] 
Envoyé : vendredi 31 juillet 2009 12:01
À : [email protected]
Objet : Error Parsing WSDL with CXF-BC

Hi All

 

I am attempting to connect to an external web service using a CXF-BC provider.  
On deployment of my service unit I am getting the following exception thrown:

 

<loc-message>javax.wsdl.WSDLException: WSDLException:
faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.:
org.xml.sax.SAXParseException: The value of the attribute 
"prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"" is invalid.
Prefixed namespace bindings may not be empty.</loc-message>

<stack-trace><![CDATA[javax.jbi.management.DeploymentException:
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem 
parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: The value of the 
attribute "prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"" is invalid. 
Prefixed namespace bindings may not be empty.

        at
org.apache.servicemix.cxfbc.CxfBcProvider.validate(CxfBcProvider.java:50
4)

        at
org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeployer.
java:58)

        at
org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBeanD
eployer.java:55)

        at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(Abstract
XBeanDeployer.java:97)

        at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseService
UnitManager.java:88)

        at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUn
itManager.java:69)

        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssem
bly(DeploymentService.java:520)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceA
ssembly(AutoDeploymentService.java:349)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(
AutoDeploymentService.java:255)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirecto
ry(AutoDeploymentService.java:658)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(Aut
oDeploymentService.java:63)

        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDepl
oymentService.java:622)

        at java.util.TimerThread.mainLoop(Timer.java:512)

        at java.util.TimerThread.run(Timer.java:462)

Caused by: javax.wsdl.WSDLException: WSDLException:
faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.:
org.xml.sax.SAXParseException: The value of the attribute 
"prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"" is invalid.
Prefixed name

space bindings may not be empty.

        at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)

        at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)

        at
org.apache.servicemix.cxfbc.CxfBcProvider.validate(CxfBcProvider.java:47
4)

        ... 13 more

Caused by: org.xml.sax.SAXParseException: The value of the attribute 
"prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"" is invalid.
Prefixed namespace bindings may not be empty.

        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
Source)

        ... 16 more

]]></stack-trace> 

 

I have found a few messages on the mailing list that have similar errors, 
however none seem to have any solutions - apologies if this is not the case I 
have tried to search for an answer.

 

The WSDL that I am reading does not contain a namespace called ns1, so first 
question - is this an exception to do with parsing the external WSDL or 
something to do with an internally generated WSDL?

 

In either case, does anyone have any clue as to how this can be solve, or the 
'usual' causes for something like this.  I will probably be unable to post a 
link to the WSDL easily, however I can try to obfuscate out all identifying 
information if this would be useful to people.

 

Incidentally, originally the WSDL contained a target namespace of 
http://tempuri.org <http://tempuri.org/>  - but I had this changed as this 
appeared to cause errors where the target namespace did not match the actual 
namespace for the service.  At this stage the SA would deploy correctly with an 
error message, but no messages could be delivered as it had obviously not 
parsed the WSDL correctly.

 

Thanks in advance.

 

Ben Brown

This email and any files or information it contains are confidential and may be 
privileged.  It is for the intended addressee(s) only.  The unauthorised use, 
disclosure or copying of this email or any information it contains, is 
prohibited and could, in certain circumstances be a criminal offence. If you 
are not the intended recipient you should not disseminate or copy this email.  
Please notify the sender immediately and delete this message from your system. 

Please note that any opinions presented in this email are solely those of the 
author (or those of a third party whose statement is forwarded) and do not 
necessarily represent those of any company within the Bluefin Group Limited 
group of companies.

Email transmission cannot be guaranteed to be secure or error free as 
information could be intercepted, corrupted, lost, destroyed, late in arriving 
or incomplete as a result of the transmission process.  The sender therefore 
does not accept liability for any errors or omissions in the contents of this 
message which arise as a result of email transmission.

WARNING: Computer viruses can be transmitted by email. The recipient should 
check this email and any attachments for the presence of viruses.  The Bluefin 
Group Limited group of companies accepts no liability for any damage caused by 
any virus transmitted by this email.

Reply via email to