How to generate java classes from wsdl having multiple xsd? - wsdl

I am new to soap service. I have to change WSDL to java classes. I have tried placing it in resource folder and change it. But I am unable to do it . When I am setting the goals in pom.xml. It is giving errors in execute method.
Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:3.2.4:wsdl2java failed: file:/C:/Workspace/demo/src/main/resources/wsdl/Bene.wsdl [556,5]: 'maintainBene' is already defined
file:/C:/Workspace/demo/src/main/resources/wsdl/Bene.wsdl [20,5]: (related to above error) the first definition appears here
file:/C:/Workspace/demo/src/main/resources/wsdl/Bene.wsdl [733,5]: 'maintainBeneResponse' is already defined
file:/C:/Workspace/demo/src/main/resources/wsdl/Bene.wsdl [197,5]: (related to above error) the first definition appears here
file:/C:/Workspace/demo/src/main/resources/wsdl/Bene.wsdl [940,5]: 'Common' is already defined

Related

Sitefinity 9.2 MVC 5 Feather and Ninject - Error loading module, another module with the same name has already been loaded

Please see attached screenshots and code if that makes it easier (at the bottom of this http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/sitefinity-8-2-to-9-upgrade-error#HlX3NsE3622pWP8AAERlJg post)
I have tried all the methods listed above and the workaround, but still keep getting the same issue.
This happens when I trigger changes(activate/deactivate) a module in Sitefinity/Administration/ModulesAndServices
The progress bar (green) goes into a loop and refreshing the page gives me this:
Error loading Ninject component ICache
No such component has been registered in the kernel's component container.
Suggestions:
1) If you have created a custom subclass for KernelBase, ensure that you have properly
implemented the AddComponents() method.
2) Ensure that you have not removed the component from the container via a call to RemoveAll().
3) Ensure you have not accidentally created more than one kernel.
And in the error logs for sitefinity I get:
Message : Error loading module 'YourPackage.YourModule' of type YourModule
Another module (of type YourModule) with the same name has already been loaded
Suggestions:
1) Ensure that you have not accidentally loaded the same module twice.
2) If you are using automatic module loading, ensure you have not manually loaded a module
that may be found by the module loader.
Have followed the article: http://docs.sitefinity.com/feather-use-constructor-dependency-injections
and the workaround too: https://github.com/Sitefinity/feather/issues/2580
Thanks in Advance

How to configure Lucene to use a custom codec from external JAR?

As part of my studies I need to implement a custom Lucene codec, targetting Lucene 5.3.1.
I've tried following the instructions here:
http://opensourceconnections.com/blog/2013/06/05/build-your-own-lucene-codec/ to get started, but I am having some trouble getting the codec to load when running Lucene tests.
I've uploaded a minimal project at https://github.com/sigbjornlo/codecs
Running mvn package generates a jar with a file META-INF/services/org.apache.lucene.codecs.Codec containing a single line:
edu.ntnu.sigbjornlo.codecs.HelloCodec
...which is where the codec class resides at. It's just a FilterCodec subclass that does nothing extra.
Running ant -Dtestcase=TestSegmentTermDocs -Dtests.codec=HelloCodec -lib /path/to/hello-1.0.jar test gives me the following error:
java.lang.IllegalArgumentException:
An SPI class of type org.apache.lucene.codecs.Codec with name 'HelloCodec' does not exist.
You need to add the corresponding JAR file supporting this SPI to your classpath.
The current classpath supports the following names: [SimpleText, Asserting, CheapBastard, FastCompressingStoredFields, FastDecompressionCompressingStoredFields, HighCompressionCompressingStoredFields, DummyCompressingStoredFields, Lucene53]
What might I be doing wrong here? Is there any way to make Lucene's SPI loader log what it's trying and/or failing to load, and why?

WMBT msg flow class inherit error

I'm trying to build websphere message broker however I've stumbled into weird issue. When using mqsicreatebar to create BAR file the build returns following error trice (three times, with different problem number):
Problem 22: Resource - /ErrorHandlingLib/error/handling/ErrorHandler.subflow; Error message - Class should inherit from MbJavaComputeNode..
I have found solution for this in one of the forums which stated that adding full class path to MbJavaComputeNode (as in: extends com.ibm.broker.javacompute.MbJavaComputeNode) the problem should be solved. However it was older wmbt version and neither this, neither any of the new IBM released wmbt fixes helped.
The error printing three times is probably because Java compute node in the sublfow is used in three different routes.
Websphere message broker toolkit used is v8.0.0.5
The classes, that you assign to the Java Compute nodes in your flows must extend the MbJavaComputeNode class.
This error says that you have some Java Computes that are not referencing such classes.
I suggest creating the classes for the Java Compute nodes with the wizard, which starts when you double click a newly inserted Java Compute node which has no class assigned to it.

XTSE1650: net.sf.saxon.trans.LicenseException: Requested feature (xsl:import-schema) requires Saxon-EE

I use java and saxonee-9.5.1.6.jar included build path , when run, getting these errors at different times.
Error at xsl:import-schema on line 6 column 169 of stylesheet.xslt:
XTSE1650: net.sf.saxon.trans.LicenseException: Requested feature (xsl:import-schema)
requires Saxon-EE
Error on line 1 column 1
SXXP0003: Error reported by XML parser: Content is not allowed in prolog.
javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.
I open .xslt file in hex editor and dont see any different character at the beginning AND
I use transformerfactory in a different project but any error I get.
Check what the implementation class of tFactory is. My guess is it is probably net.sf.saxon.TransformerFactoryImpl - which is basically the Saxon-HE version.
When you use JAXP like this, you're very exposed to configuration problems, because it loads whatever it finds sitting around on the classpath, or is affected by system property settings which could be set in parts of the application you know nothing about.
If your application depends on particular features, it's best to load a specific TransformerFactory, e.g. tFactory = new com.saxonica.config.EnterpriseTransformerFactory().
I don't know whether your stylesheet expects the source document to be validated against the schema, but it it does, note that this isn't automatic: you can set properties on the factory to make it happen.
I would recommend using Saxon's s9api interface rather than JAXP for this kind of thing. The JAXP interface was designed for XSLT 1.0, and it's a real stretch to use it for some of the new 2.0 features like schema-awareness: it can be done, but you keep running into limitations.

Facelet Tag Library mechanism does not work as expected

I'm unable to pack taglibrary in a war file. I moved tags from project to extra library the current project is depending now. I put the taglibrary file into the META-INF directory of the jar containing tags (how is described here). But the page does not work:
Expression Error: Named Object: eu.barbucha.barbatag.simple.PropertyTag not found.
The server is able to find the taglibrary. Otherwise the page works, just one waring appears:
Warning: This page calls for XML namespace http://barbucha.eu/tags declared with prefix br but no taglibrary exists for that namespace.
Thus the question is: Why the server finds just the descriptor, but not the classes? When I copy classes from WEB-INF/lib/barbatag.jar into WEB-INF/classes and restart the webapp in administration console, the page gets working. The server also finds UI-components only if they are involved directly in classes of the applictation, but not in the jar stored in the WEB-INF/lib directory. On other hand the server loads taglib descriptor from the jar. It's really confusing... Declaration of the critical class:
package eu.barbucha.barbatag.simple;
#FacesComponent("eu.barbucha.barbatag.simple.PropertyTag")
public class PropertyTag extends UIComponentBase { ... }
Definition of critical tag:
<tag>
<display-name>The component taking values from a property file</display-name>
<tag-name>property</tag-name>
<component>
<component-type>eu.barbucha.barbatag.simple.PropertyTag</component-type>
</component>
</tag>
One potentionally important point: I'm using Spring MVC.
You need to supply a /META-INF/faces-config.xml file in the JAR in order to get JSF to scan the JAR file for classes with JSF specific annotations like #FacesComponent. This is done so to prevent JSF from unnecessarily scanning every single JAR file for classes (which might be very time and CPU consuming if you have lot of them).

Resources