cancel
Showing results for 
Search instead for 
Did you mean: 

WSDLException Encountered illegal extension element '{http://schemas.xmlsoap.org/wsdl/}annotation'

SOLVED
Highlighted
New Contributor

WSDLException Encountered illegal extension element '{http://schemas.xmlsoap.org/wsdl/}annotation'

I'm getting this WSDLException and have no clue where to start looking.  I looked at soapui-errors.log and pasted the stack trace below the WSDLException text.

 

WSDLException (at /definitions/message[28]/part/annotation): faultCode=INVALID_WSDL: Encountered illegal extension element '{http://schemas.xmlsoap.org/wsdl/}annotation' in the context of a 'javax.wsdl.Part'. Extension elements must be in a namespace other than WSDL's

 

From soapui-erros.log:

 

2020-07-16 22:30:42,691 ERROR [errorlog] com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlInterfaceDefinition.load(WsdlInterfaceDefinition.java:52)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:62)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:34)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.cacheDefinition(AbstractDefinitionContext.java:245)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.access$400(AbstractDefinitionContext.java:47)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:218)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:131)
at java.lang.Thread.run(Unknown Source)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: WSDLException Encountered illegal extension element '{http://schemas.xmlsoap.org/wsdl/}annotatio

Hey @BenD,

I understand you're using a tool to dynamically build the .wsdl but that doesnt necessarily mean the .wsdl is built with zero issues.

I've done a bit of googling and there are a number of reasons why this could occur.

There's a possible problem with incorrect capitalisation of element so all words in an node name were lower case rather than lower camel case (e.g.porttype rather than portType, targetnamespace rather than targetNamespace, etc.), inclusion of an erroneous element <document>, someone else reckomed they removed ampersnd characters which they say fixed it (although i dont believe that), ensuring all elements had the appropriate namespace prefix, ensuring all elements included a namespace prefix if >1 xmlns is included and to an xmlns prefix is not required.
If i were you i'd focus on the namespace and make sure the elements are referenced by the correct xmlns as that's whst your error message is saying

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

4 REPLIES 4
Highlighted
Community Leader

Re: WSDLException Encountered illegal extension element '{http://schemas.xmlsoap.org/wsdl/}annotatio

@BenD :

 

As it is stating in the error message, it seems error is with the WSDL file, i would suggest that you should get in touch with developer or WSDL provider.


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
New Contributor

Re: WSDLException Encountered illegal extension element '{http://schemas.xmlsoap.org/wsdl/}annotatio

@HimanshuTayal: Thank you for your reply. I forgot to mention that I created the .h files that were input into soapcpp2 tool which produced the WSDL file. soapcpp2 appears to be a gsoap product from Genivia. It’s supposed to generate compliant wsdl. Wondering why SoapUI is complaining about the wsdl. The errors SoapUI gives are not very good. No idea why it’s complaining.

Highlighted
Community Hero

Re: WSDLException Encountered illegal extension element '{http://schemas.xmlsoap.org/wsdl/}annotatio

Hey @BenD,

I understand you're using a tool to dynamically build the .wsdl but that doesnt necessarily mean the .wsdl is built with zero issues.

I've done a bit of googling and there are a number of reasons why this could occur.

There's a possible problem with incorrect capitalisation of element so all words in an node name were lower case rather than lower camel case (e.g.porttype rather than portType, targetnamespace rather than targetNamespace, etc.), inclusion of an erroneous element <document>, someone else reckomed they removed ampersnd characters which they say fixed it (although i dont believe that), ensuring all elements had the appropriate namespace prefix, ensuring all elements included a namespace prefix if >1 xmlns is included and to an xmlns prefix is not required.
If i were you i'd focus on the namespace and make sure the elements are referenced by the correct xmlns as that's whst your error message is saying

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

New Contributor

Re: WSDLException Encountered illegal extension element '{http://schemas.xmlsoap.org/wsdl/}annotatio

Hi Rich:  Your suggestions helped narrow in on the problems.  I had some type-documentation issues and did change some variable names to camelCase.  However, I left one variable as all lower case and it worked just fine.  Now I'm wondering if the camelCase thing is an issue.  Anyway, thank you for your suggestions.  Greatly appreciated.

 

New Here?
Join us and watch the welcome video:
Top Kudoed Authors