Coder Social home page Coder Social logo

javaee / metro-jaxws-commons Goto Github PK

View Code? Open in Web Editor NEW
10.0 9.0 9.0 17.04 MB

Metro has been contributed to Eclipse Foundation. This repository is for legacy review only. Please refer to the Eclipse EE4J Metro project for the very latest

Home Page: https://eclipse-ee4j.github.io/metro-wsit/

License: Other

Java 72.68% HTML 5.99% Groovy 3.31% CSS 5.38% JavaScript 11.48% XSLT 1.14% Shell 0.02%

metro-jaxws-commons's People

Contributors

glassfishrobot avatar lukasj avatar pranjal10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metro-jaxws-commons's Issues

maven-jaxws-plugin should allow dependent libraries in provided scope

Currently, the maven-jaxws-plugin requires that libraries needed during its
compilation of the generated classes be in 'compile' scope. This, however, is
very inconvenient when working in a JEE environment where these libraries are
regularly provided by the JEE container. Therefore, you would usually prefer to
have these libraries in 'provided' scope.

The current situation is further aggravated by the fact that many of the maven
plugins usually used during JEE development glean necessary information from the
different scopes. Most notably does the maven-ear-plugin include every
dependency in 'compile' or 'runtime' scope as a third party library in the
generated ear. Today this amounts to the jsr181's being included in the
generated ear while simultaneously being provided by the JEE container.

Allow the dependencies needed during compilation of the generated classes to be
either in 'compile' OR 'PROVIDED' scope.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Using primaryWsdl prevents deployment of application

I am using Metro 1.2, JAX-WS Spring 1.8, and Xbean-Spring 3.4.3 and am trying to
instantiate a service using the following Spring context xml configuration:

<wss:binding url="/notify">
wss:service
<ws:service bean="#notifyConsumer"
serviceName="tns:ConsumerService"
portName="tns:ConsumerPort"
xmlns:tns="http://jtims.wsn.consumer" >
ws:primaryWsdl
WEB-INF/wsdl/notify_consumer.wsdl
</ws:primaryWsdl>
</ws:service>
</wss:service>
</wss:binding>

I am deploying the application to Tomcat 5.5.25. When I startup Tomcat I get the
following error:

java.lang.IllegalArgumentException: Unknown type

{http://www.springframework.org/schema/beans}

WEB-INF/wsdl/notify_consumer.wsdl

Additional info may be found in:
http://forums.java.net/jive/thread.jspa?threadID=45191

Here is the stack trace:
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'com.sun.xml.ws.transport.http.servlet.SpringBinding#0' defined in
ServletContext resource [/WEB-INF/classes/ApplicationContext.xml]: Cannot create
inner bean '(inner bean)' of type
[org.jvnet.jax_ws_commons.spring.SpringService] while setting bean property
'service'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)' defined in ServletContext resource
[/WEB-INF/classes/ApplicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.IllegalArgumentException: Unknown type

{http://www.springframework.org/schema/beans}

WEB-INF/wsdl/notify_consumer.wsdl
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

Environment

Operating System: Windows XP
Platform: PC

Affected Versions

[current]

Check sources modifications to regenerate files or not

The maven plugin "jaxws-maven-plugin" generates files for each build
even if source files didn't change.

So the idea is to optimize build through a "StaleSourceScanner" of source files.

The attached patch (jaxws-patch.txt) add this new feature.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

jaxws-maven-plugin wsgen dependencies

I am running into a problem using the wsgen goal.
It requires dependency resolution of artifacts in runtime scope. See
https://jax-ws-commons.dev.java.net/jaxws-maven-plugin/wsgen-mojo.html
Alas, it requires me to specify a compile scope for things like
javax.persistence:persistence-api – when the scope should be provided.
In theory, the maven way around this limitation is to add dependencies to the
plugin definition, so that the dependency is available for the plugin but they
don't interfere with my artifact's dependency declaration. Similar to:
https://jax-ws-commons.dev.java.net/jaxws-maven-plugin/usage.html
Alas, that doesn't seem to work. (Also note that the usage example is not
structured correctly. A is wrapped in .)

By forcing a compile scope for JEE APIs like javax.persistence:persistence-api,
it requires other projects to explicitly exclude them – and that is just silly
and flies in the face of maven's clever transitive dependency mechanism.

I think I traced the problem down to the getWsGenArgs method in
AbstractWsGenMojo. The code is creating the classpath for wsgen solely based
on project.getArtifacts(). But I think it should ALSO include
project.getPluginArtifacts(). I think my problem will be solved with a minor
code change.

Environment

Operating System: Windows XP
Platform: PC

Affected Versions

[current]

jaxws-maven-sample - does not work on Java 5 - missing dependency on jsr181-api

See also .. http://forums.java.net/jive/thread.jspa?messageID=293732&#293732

Possibly the jsr181-api dependency ought to be pulled in as a transitive
dependency.

In any case it is not.


One solution/workaround is to add an explicit dependency on jsr181-api to the
sample code (feels like a workaround as I think the plugin itself ought to pull
in its own runtime depends).

My 'helloservice' POM now looks like this ...
(Nb the same fix is also required on the helloclient POM).



jaxws-maven-sample
com.example.maven.jaxws
1.0-SNAPSHOT

4.0.0
com.example.maven.jaxws
helloservice
war
helloservice Maven Webapp
1.0-SNAPSHOT
http://maven.apache.org

java.net - Dev [https://maven-repository.dev.java.net/repository](https://maven-repository.dev.java.net/repository) legacy java.net - Maven2 [http://download.java.net/maven/2](http://download.java.net/maven/2) legacy default-tools.jar java.vendor Sun Microsystems Inc. com.sun tools 1.5.0 system $

{java.home}

/../lib/tools.jar



helloservice org.codehaus.mojo jaxws-maven-plugin wsgen

com.example.maven.jaxws.helloservice.Hello
<!-for demo purpose only, the webapp does not->
<!-need the generated wsdl files->
true
true


javax.jws jsr181-api 1.0-MR1 J2EE #### Environment Operating System: All Platform: All #### Affected Versions [current]

jaxws-maven-plugin >= 1.10 does not handle xjcArg correctly for XJC extnsion plugins

I am upgrading from jaxws-maven-plugin from version 1.9 to latest 1.12 and
discovered that since version 1.10 it does not handle any XJC args that are
really intended to be processed by XJC extension plugins like Equlas, Copy
plugins etc.

This causes following in plugin configuration to cause the plugin to fail...

-Xequals -XhashCode -Xcopyable -Xannotate

To further compound thhe problem the failure does not say why it failed and
instead I had to run a standalone wsimport with same options as the plugin to
find out the root problem.

I tested with changing my pom to only change the jaxws-maven-plugin version and
found that 1.9 works while 1.10-1.12 do not.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

WsImportMojo swallows exceptions

Needed to patch the plugin to diagnose

http://www.netbeans.org/nonav/issues/show_bug.cgi?id=157460

as follows:

Index: src/main/java/org/codehaus/mojo/jaxws/WsImportMojo.java

— src/main/java/org/codehaus/mojo/jaxws/WsImportMojo.java (revision 806)
+++ src/main/java/org/codehaus/mojo/jaxws/WsImportMojo.java (working copy)
@@ -290,7 +290,7 @@
throw new MojoExecutionException( "Error executing: wsimport " +
args );
}
} catch (Exception e)

{ - throw new MojoExecutionException( "Error executing: wsimport " + args ); + throw new MojoExecutionException( "Error executing: wsimport " + args + ": " + e, e); }

}

Environment

Operating System: All
Platform: All

Affected Versions

[current]

SpringService.ContainerWrapper must handle getSPI(ServletContext.class)

When trying to use an XWSS 2.0 style configuration file
(/WEB-INF/server_security_config.xml) for my Metro 1.0.1 service endpoint
implementation using JAX-WS Commons Spring integration and Provider, but
does not provide/reference any WSDL, Metro simply did not take my XWSS security
config into account.

I tracked this behavior down to the following issue in
com.sun.xml.ws.assembler.PipelineAssemblerFactoryImpl (line 728 in Metro 1.0.1
source code):

ServletContext ctxt =
context.getEndpoint().getContainer().getSPI(ServletContext.class);

It turned out that JAX-WS Commons Spring integration uses a
SpringService.ContainerWrapper implementation which is unable to return a
ServletContext (but instead returns null), as no default Container will be
available in class SpringService:

// TODO: how to set the default container?
public void setContainer(Container container)

{ this.container = container; }

Luckily, we have the correct ServletContext available in SpringService

I therefore suggest the following two small changes to class SpringService:

  1. Add a getter method for the ServletContext instance:

public ServletContext getServletContext()

{ return servletContext; }

  1. Take special care of ServletContexts in the ContainerWrapper (inner class):

if(spiType==TubelineAssemblerFactory.class)

{ (... omitted by intention ...) // take special care of requests for the ServletContext }

else if(spiType==ServletContext.class)

{ return spiType.cast(getServletContext()); }

if(container!=null)

{ (... omitted by intention ...) }

After applying these two changes, my Provider endpoint has been able to
successfully pick up /WEB-INF/server_security_config.xml and configure its
XWSSServerPipe.

After fixing this, please be so kind as to post a new release of the JAX-WS
Commons Spring integration, such that we can return to using an officially
released version.

Many thanks in advance and best regards,

Andreas


Andreas Loew
Java Architect
Sun Microsystems (Germany)

Environment

Operating System: All
Platform: All

Affected Versions

[current]

jaxws-maven-plugin doesn't work under java 6

Build log:

[INFO] [jaxws:wsimport]
[INFO] Processing: http://10.1.212.181:8080/billing?wsdl
[INFO] jaxws:wsimport args: [-s, /home/marat/projects/billing/target/jaxws/
wsimport/java, -d, /home/marat/projects/billing/target/classes, http://
10.1.212.181:8080/billing?wsdl]
parsing WSDL...

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI
(from jar:file:/home/marat/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.2/jaxb-
impl-2.1.2.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1
API. Use the endorsed directory mechanism to place jaxb-api.jar in the
bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/
standards/)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap
classloader, but this RI (from jar:file:/home/marat/.m2/repository/com/sun/xml/
bind/jaxb-impl/2.1.2/jaxb-impl-2.1.2.jar!/com/sun/xml/bind/v2/model/impl/
ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to
place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/
1.5.0/docs/guide/standards/)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:135)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:389)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:253)
at
com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getJAXBContext(BindInfo.java:316)
at
com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet.apply(SCDBasedBindingSet.java:195)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:502)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:216)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:69)
at
com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:120)
at
com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2159)
at
com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:179)
at
com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:127)
at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:146)
at org.codehaus.mojo.jaxws.WsImportMojo.wsImport(WsImportMojo.java:232)
at
org.codehaus.mojo.jaxws.WsImportMojo.processWsdlViaUrls(WsImportMojo.java:219)
at org.codehaus.mojo.jaxws.WsImportMojo.execute(WsImportMojo.java:150)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Jul 18 13:40:02 MSD 2007
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------

Possible solution: http://weblogs.java.net/blog/kohsuke/archive/2007/02/
running_jaxbws.html

Environment

Operating System: All
Platform: All

Affected Versions

[current]

wsgen not always accept dependencies

Current version of jaxws-maven-plugin/goal wsgen not always accept dependencies.

For example. I got project with parent project -

  • if I run mvn install on child project wsgen run correctly.
  • if i run mvn install on parent project then child project is build but wsgen
    doesn't see their dependency and fails with class not found

Short example


4.0.0

oss oss 1.0.0-SNAPSHOT ../pom.xml

oss
oss-ws
war
(...)



org.codehaus.mojo
jaxws-maven-plugin


wsdl_generate_service_classes
process-classes

wsgen


true
oss.ossServiceImpl





$

{groupId}

oss-rpc $

{version}

(...) #### Environment Operating System: Windows XP Platform: All #### Affected Versions [current]

jaxws-spring defines maven artefacts which are no longer in Java dev Maven repository

jaxws-spring v1.8 refers the following artefacts, which do not exist at
http://download.java.net/maven/2/ (possibly they are cached at some Maven mirrors):

com.sun.xml.stream.buffer streambuffer 0.4 org.jvnet.staxex stax-ex 1.0

Temporary workaround (should be fixed in jaxws-spring-1.8.pom):

org.jvnet.jax-ws-commons.spring jaxws-spring 1.8 runtime org.jvnet.staxex stax-ex com.sun.xml.stream.buffer streambuffer org.jvnet.staxex stax-ex 1.2 com.sun.xml.stream.buffer streambuffer 0.7 #### Environment Operating System: All Platform: All #### Affected Versions [current]

Platform independent jax-ws maven plugin

Hi Guys,

I found an OS independent patch for your build.
You guys may or may not be aware that the jax-ws
maven plugin does not work on Mac OS X due to the
tools.jar reference. This is impacting many people.

My solution is simple, remove the tools.jar
dependency, and then add it via profiles:

Remove this from the element:

sun.jdk tools 1.5.0 system

$

{java.home}/../lib/tools.jar

Add this to the element:

other-oses

true



sun.jdk
tools
1.5.0
system

${java.home}

/../lib/tools.jar




mac


mac os x



thank you I hope that all tags, and the trunk can be updated
with this minor update to the pom.

-Marco

Environment

Operating System: Mac OS X
Platform: All

Affected Versions

[current]

Show how to attach binding files to Metro with Maven

Hello, the Metro documentation clearly states how to attach a binding file to
the wsimport process if you are using the CLI[1] (-b option) and Ant[2], but
could do a better job showing how to do so with Maven[3]. (I needed to Google
to find the syntax[4].) If [3] could be updated to show how a binding file can
be specified (even if it is commented out), that would be very helpful to the
reader, especially since attaching binding files in Maven is not immediately
obvious.

This syntax worked for me:

. bindings.xml

[1] https://metro.dev.java.net/nonav/1.0/docs/wsimport.html
[2] https://metro.dev.java.net/nonav/1.0/docs/wsimportant.html
[3] https://jax-ws-commons.dev.java.net/jaxws-maven-plugin/usage.html
[4] http://forums.java.net/jive/message.jspa?messageID=244045

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Provide only Maven2 based dependencies

I'm using the jaxws plugin.
The jaxws plugin has some (transitive) dependencies to maven1-based artefacts, like:
https://maven-repository.dev.java.net/nonav/repository/com.sun.xml.stream/jars/sjsxp-1.0.jar

My build server is behind a proxy, and I found no way to tell maven2 to use a
proxy for it's maven1 dependencies.

Therefore:
Could you pls provide all dependencies based on Maven2 Repositories ?

(I hope, I understood my situation correctly... )

Environment

Operating System: All
Platform: All

Affected Versions

[current]

wsgen does not pass extensions flag

The wsgen mojo declares a configuration property called "extension" to match
wsgen's "-extension" option. However, it it not being used...

Looking at AbstractWsGenMojo.java:
https://jax-ws-commons.dev.java.net/source/browse/jax-ws-commons/trunk/jaxws-
maven-plugin/src/main/java/org/codehaus/mojo/jaxws/AbstractWsGenMojo.java?
rev=684&view=markup

The method: getWsGenArgs
needs the following:

if (extension)

{ args.add("-extension"); }

As it is right now, I am unable to use Soap 1.2.

Environment

Operating System: Windows XP
Platform: PC

Affected Versions

[current]

Allow to specify jars for wsimport goal in Maven plugin

The wsimport tool accepts both .wsdl and .jar files. The jars normally contain a
shared schemas and corresponding generated classes along with
META-INF\sun-jaxb.episode file. This allows separate compilation and reuse of a
common schema between multiple projects without copying xsd files around.

Unfortunately the current Maven plugin does not allow to specify jars in a same
way and only supports the wsdl files as an input. The attached patch removes
such limitation and it simply adds resolved project dependencies to the list of
arguments passed to wsimport tool.

Another important change is a catalog resolver that is capable of resolving
schema files from classpath as it is used in maven-jaxb2-plugin plugin and
described at https://maven-jaxb2-plugin.dev.java.net/docs/guide.html#Catalogs

Environment

Operating System: All
Platform: All

Affected Versions

[current]

jaxws maven plugin: multiple executions not supported

Jaxws plugin multiple executions are not considered.
I have a module project with a jaxws plugin configured to process 4 wsdl files
with different settings, so 4 executions. Only 1st execution runs.

A well documented ticket is open on codehaus, but they have refered it back to
dev.java.net since you are now in charge of the maven plugin.

details: http://jira.codehaus.org/browse/MOJO-640

Environment

Operating System: All
Platform: All

Affected Versions

[current]

JSON NullPointerException

Exception in thread "main" java.lang.NullPointerException
at org.jvnet.jax_ws_commons.json.schema.JsonOperation.build(JsonOperation.java:53)
at org.jvnet.jax_ws_commons.json.schema.JsonOperation.(JsonOperation.java:33)
at org.jvnet.jax_ws_commons.json.SchemaInfo.buildJsonSchema(SchemaInfo.java:221)
at org.jvnet.jax_ws_commons.json.SchemaInfo.(SchemaInfo.java:132)
at org.jvnet.jax_ws_commons.json.JSONCodec.setEndpoint(JSONCodec.java:64)
at com.sun.xml.ws.server.WSEndpointImpl.(WSEndpointImpl.java:158)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:217)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:486)
at
com.sun.xml.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:222)
at com.sun.xml.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:152)
at com.sun.xml.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:113)
at javax.xml.ws.Endpoint.publish(Endpoint.java:170)
at orc.orchard.soap.CompilerService.(CompilerService.java:33)
at orc.orchard.soap.CompilerService.main(CompilerService.java:53)

After some investigation, it appears the problem is that the SchemaInfo
constructor which parses the WSDL is not following the WSDL statement
in the primary WSDL file which refers to the WSDL definition for the
endpointInterface (which in turn refers to the schema file). A quick fix should
be to parse all WSDL SDDocuments rather than just the primary one.

Based on this theory I'm going to try converting my service to not use an
endpointInterface and see if that resolves the issue.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

extension option of wsgen seems to be not implemented which is a problem to generate soap1.2 wsdl

I have problems to execute wsgen with the jaxws-maven-plugin the protocol
Xsoap1.2 and -extension option. The plug-in get the protocol option but the
extension option does not apear in the command. So, when I execute maven I get
this error.

[INFO] [jaxws:wsgen

{execution: default}

]
The optional protocol "Xsoap1.2" must be used in conjunction with the
"-extension" option.

In the wsgen comman generated by the plug-in, the -extension option has not been
generated. Looking the source code it seem there is not any extension option
however it is in the documentation. Maybe, the extension argument implementation
is missing? Has anybody had the same error? Do you know If I am doing something
wrong?

This is the plugin part of the pom.xml


com.sun.xml.ws
jaxws-rt
2.1.3


com.sun.xml.ws
jaxws-tools
2.1.3


com.sun.xml.messaging.saaj
saaj-impl
1.3


es.bsc.brein
SRLM
1.0-SNAPSHOT
compile


es.bsc.brein
SLARepositoryWSITClient
1.0-SNAPSHOT
compile

maven-repository.dev.java.net Java.net Repository for Maven 1 [http://download.java.net/maven/1/](http://download.java.net/maven/1/) legacy maven2-repository.dev.java.net Java.net Repository for Maven 2 [http://download.java.net/maven/2/](http://download.java.net/maven/2/) maven2-repository.dev.java.net [http://download.java.net/maven/2/](http://download.java.net/maven/2/) org.codehaus.mojo jaxws-maven-plugin 1.11 org.apache.maven.plugins maven-compiler-plugin 1.5 1.5 compile compile initialize org.codehaus.mojo jaxws-maven-plugin 1.11 wsgen true Xsoap1.2 es.bsc.brein.srlm.SrlmWSIT.SrlmWS true true com.sun.xml.ws jaxws-tools 2.1.3 #### Environment Operating System: Linux Platform: All #### Affected Versions [current]

WSDL given GF by endPoint?wsdl is generated by wsimport iso one in wsdlLocation

Hello.
I've deployed EJB3 WebService with wsldLocation, put my wsdl in service jar,
include jar to ear and deploy it. All seems OK and I see my wsdl file, located
at domain1\generated\xml\j2ee-apps\BMUserManagement...

But by endPoint http://localhost:8080/billingWS/BMUserManagement?wsdl GlassFish
returned not my wsdl, but generated by wsimport from service class.

I expect, that must be returned my wsdl, declared in wsdlLocation and included
in jar.

Head of WebService:

@webservice(name = "BMUserManagement", serviceName = "billingWS",
targetNamespace = "http://starlab.scartel.com/services/datatypes",
wsdlLocation = "META-INF/wsdl/BMUserManagement.wsdl")

@XmlSeeAlso({
ObjectFactory.class
})

@stateless
public class BMUserManagementService implements IBMUserManagement {

Environment

Operating System: All
Platform: All

Affected Versions

[current]

SpringService initialization in Servlet environment

SpringService does not work properly when depending on a ServletContext. The
class implements ServletContextAware
(http://www.springframework.org/docs/api/org/springframework/web/context/ServletContextAware.html#setServletContext(javax.servlet.ServletContext),
but the setters for primaryWSDL and metadata rely on the ServletContext having
already been set in the bean. According to the Spring documentation, the
context is not set until after the population of regular bean properties. As
such, any resource resolution relying on the ServletContext fails at runtime.

The class must also implement InitializingBean and perform all ServletContext
aware processing in afterPropertiesSet.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Impossible to generate test sources, wsimport always attaches a regular source root

Even if I attach jaxws-maven-plugin execution to test-generate-sources, it still adds a
regular compile source root for the generated files.

This is because addCompileSourceRoot() is always invoked in WsImportMojo.execute(), there is
no way to disable it or make it invoke addTestCompileSourceRoot() instead.

Also the Eclipse plugin only invokes generates-sources and not test-generate-sources, so I
want to be able to generate my test classes in the normal generate-sources phase but still
attach them to the test compile root.

So, there should be a configuration option to be able to specify which compile root I want to
add, if any, for example like this:

false
true

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Make it possible to use JAXB 2 plugins

The idea is to make it possible to include JAXB plugins into generation process.

http://confluence.highsource.org/display/J2B/JAXB2+Basics+Plugins
http://confluence.highsource.org/display/J2B/User+Guide

What is basically required is an additional configuration directive, that allows
misc classpathentries to be added, e.g.

...


-extension
-Xdefault-value
-Xfluent-api


jaxws\default-value-plugin.jar
jaxws\fluent-api-plugin.jar




Environment

Operating System: All
Platform: All

Affected Versions

[current]

resource leak in WSSpringServlet

WSSpringServlet from Jaxws-Spring fails to release WSServletDelegate and the
associated application context when it is destroyed. This causes a memory leak
during redeployment of the web application.

The following code should be added to WSSpringServlet.java:

/**

  • destroys the servlet and releases all associated resources,
  • such as the Spring application context and the JAX-WS delegate.
    */
    @OverRide
    public void destroy() {

getServletContext().log("Destroying Servlet '" + getServletName() + "'");

WebApplicationContext wac =
WebApplicationContextUtils.getWebApplicationContext(getServletContext());
if (wac instanceof ConfigurableApplicationContext)

{ ((ConfigurableApplicationContext) wac).close(); }

super.destroy();
delegate.destroy();
delegate = null;
}

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Dependencies still pointing to non-POM-4.0

When i build from POM 1.8 and 1.9-SNAPSHOT, i got this messages.

6/13/09 6:56:25 AM CDT: [WARN] POM for
'com.sun.xml.stream.buffer:streambuffer:pom:0.4:provided' is invalid. It will be ignored for artifact
resolution. Reason: Failed to validate POM for project com.sun.xml.stream.buffer:streambuffer at
/Users/rlezama/.m2/repository/com/sun/xml/stream/buffer/streambuffer/0.4/streambuffer-0.4.pom
6/13/09 6:56:25 AM CDT: [WARN] POM for 'org.jvnet.staxex:stax-ex:pom:1.0:provided' is invalid. It
will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.jvnet.staxex:stax-ex at
/Users/rlezama/.m2/repository/org/jvnet/staxex/stax-ex/1.0/stax-ex-1.0.pom

Which actually are not 4.0 POM using Maven 2.1.0

Environment

Operating System: All
Platform: Macintosh

Affected Versions

[current]

ws:primaryWsdl does not support imported xsd as well as xsd's that import other xsd's

Definition of wsdl below does not allow access to imported xsd.

For details see similar bug in Spring WS:
http://jira.springframework.org/browse/SWS-281


WEB-INF/applicationContext.xml

<wss:bindings id="jax-ws.http">
wss:bindings
<wss:binding url="/services/AddInt" service="#AddIntService" />
</wss:bindings>
</wss:bindings>

<ws:service
id="AddIntService"
bean="#AddIntServiceImpl"
serviceName="tns:AddIntService"
portName="tns:AddIntPort"
xmlns:tns="http://www.example.org/AddInt"
bindingId="http://www.w3.org/2003/05/soap/bindings/HTTP/">
ws:handlers

</ws:handlers>
ws:primaryWsdl
/WEB-INF/wsdl/AddInt.wsdl
</ws:primaryWsdl>
</ws:service>
....

WEB-INF/wsdl/AddInt.wsdl

<wsdl:definitions name="AddInt"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.example.org/AddInt"
targetNamespace="http://www.example.org/AddInt">
wsdl:types
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import
namespace="http://www.example.org/AddInt"
schemaLocation="AddInt.xsd"/>
</xsd:schema>
</wsdl:types>
....
<wsdl:service name="AddIntService">
<wsdl:port name="AddIntPort" binding="tns:AddIntBinding">
<soap:address
location="http://localhost:8080/AddInt/services/AddInt"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Environment

Operating System: All
Platform: All

Affected Versions

[current]

update Spring currency

please update the jaxws-spring component to support the latetst Spring version;
it now needs Spring 2.0.6, whereas Spring 2.5 has a lot new features, for
instance caching with jndiTemplate.

Environment

Operating System: All
Platform: All

Missing entries in spring.handlers and spring.schemas

As of version 1.7 of jaxws-spring, the file META-INF/spring.handlers is missing
entries for the namespaces http://jax-ws.dev.java.net/spring/core and
http://jax-ws.dev.java.net/spring/servlet. They should be as follows:

http://jax-ws.dev.java.net/spring/core=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
http://jax-ws.dev.java.net/spring/servlet=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler

The corresponding entries are also missing from META-INF/spring.schemas:

http://jax-ws.dev.java.net/spring/core.xsd=spring-jax-ws-core.xsd
http://jax-ws.dev.java.net/spring/servlet.xsd=spring-jax-ws-servlet.xsd

Environment

Operating System: All
Platform: All

Affected Versions

[current]

AOP proxied webservice are not supported

Hi.

It seems that there's a lack of AOP proxy support in jax-ws-commons. Proxied
webservice endpoints aren't correctly recognized as webservices (although
annotated). The problem lies in the fact, that jax-ws-commons doesn't unwrap the
proxied object to read the annotations from the target class instead from the
proxy. This makes AOP for webservices unusable for nice features like automatic
logging etc.

See also:

http://forums.java.net/jive/thread.jspa?threadID=27930

Would be cool if jax-ws-commons would support this.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Missing entries in spring.schemas and spring.handlers for local transport in jaxws-spring 1.4

In order to get local transport to work, there is an entry missing for
local-transport in each of the two files META-INF/spring.services and
META-INF/spring.handlers:

In spring.schemas, the line

http://jax-ws.dev.java.net/spring/local-transport.xsd=spring-jax-ws-local-transport.xsd

must be added, while in spring.handlers, the line

http://jax-ws.dev.java.net/spring/local-transport=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler

is missing.

After fixing this, can you please push version 1.4.1 (or so), so that I can
reference an official version in the java.net Maven2 repository from my POM file?

Thanks & best regards,

Andreas

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Support for contract-first

I have a jar with JAXWS/JAXB binding classes and interfaces generated from a WSDL. I would like to have
one of my Grails services implement the port-type interface, sp I did the following:

  1. installed the metro grails plug-in
  2. dropped my jar with jaxws/jaxb interfaces/classes into the lib directory of my grails app
  3. Made my Grails service implement the jax-ws-generated interface (SEI) from my jar
  4. grails run-app

I'm reporting this as an enhancement request, since I suspect it wasn't the intended use of the plug-in.
There were a lot of exceptions occurring during start-up (using Grails 1.0.4). please let me know if this
was indeed a supported scenario. I will then provide detailed descriptions of the stack traces.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Patch for Missing Addressing Class Problem and missing JSR-181

it sample does not work due to:

  • missing Addressing class in jaxws-api, added 2.1-1 dependency to plugin
    section. The jar from central does not contain the Addressing class, the jar
    from this site does, but central is picked up first. This has been resolved by
    providing 2.1-1, but the example does not use that dependency for the plugin yet.
  • jsr-181 from bea must be added to repo manually, I found it on
    http://ftpna2.bea.com/pub/downloads/jwsri-1.0.zip, but it was really difficult
    to locate since dev2dev no longer exists and Oracle has not exposed the link
    anywhere. It is just a matter of time when the above link will be closed as
    well. This is because the 2.1-1 points to the bea impl by default and does not
    use the geronimo version

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Possibility to specify endpoint interface in spring configuration

Hi.

It seems there's no way to specify an endpoint interface in the ws: or wss:
schema like in the sun-jaxws.xml. Although it seems to work without it, it
should be enhanced in that way.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Exception swallowing in wsImport()

In WsImportMojo.java we have exception handling that swallows useful info on
root causes which makes life difficult for users.

private void wsImport( ArrayList args )
throws MojoExecutionException
{
try {
final ClassLoader cl = Invoker.createClassLoader(Thread.currentThread
().getContextClassLoader());
Class c = cl.loadClass("com.sun.tools.ws.wscompile.WsimportTool");
Object tool = c.getConstructor(OutputStream.class).newInstance
(System.out);
String[] ar = args.toArray( new String[args.size()] );
Boolean result = (Boolean)c.getMethod("run", ar.getClass()).invoke
(tool, new Object[]

{ar}

);
if ( !result )

{ throw new MojoExecutionException( "Error executing: wsimport " + args); }

// New handler complementing thrown exception above
} catch (MojoExecutionException e)

{ throw e; }

catch (Exception e)

{ // Corrected throw to include second param 'e' (chaining) throw new MojoExecutionException( "Error executing: wsimport " + args, e ); }

}

Without this we cannot see the reasons why the function is failing.
See also ...
http://forums.java.net/jive/thread.jspa?messageID=293732&#293732

PS I would contribute if I knew how.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Need to support xjcArgs in wsimport goal of maven-jaxws-plugin

Currently it is not possible to configure wsimport goal to pass xjc arguments
using the WsImport -B option. This is an urgently needed RFE by the HyperJAXB3
project.

I have created a simpel and safe patch that implements this RFE and hope that
project owners could quickly review and commit this patch. The patch may be
found at:

http://ebxmlrr.sourceforge.net/tmp/xjcArgs.patch

The patch may be applied as follows:

cd .../jaxws-maven-plugin
patch -p0 < xjcArgs.patch

Please let me know if you have any questions or concerns. Thank you.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Grails-plugin: injected service in WS-ServiceImpl must not be NULL

Please see sample app in issue #19, install metro plugin

grails run-app

call ExternalService with soapUI on
http://localhost:8080/sampleApp/services/ExternalService?wsdl
Exception in SOAP response and stacktracke on the shell:

05.08.2008 23:58:13 com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
SCHWERWIEGEND: Cannot invoke method doAnything() on null object
java.lang.NullPointerException: Cannot invoke method doAnything() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:784)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:198)
at de.foo.bar.ExternalService.serviceMethod(ExternalService.groovy:19)

Environment

Operating System: Linux
Platform: All

Affected Versions

[current]

add encoding customization support for jaxws-maven-plugin

This duplicate for https://jax-ws.dev.java.net/issues/show_bug.cgi?id=428, but
nobody is working on it. Here is copy of that description:

Problem:
There's no way to specify a custom encoding for the java sources generated by
the jaxws-maven-plugin.

The com.sun.codemodel.CodeWriter which creates the
java.io.OutputStreamWriter.OutputStreamWriter dosen't set a special
java.nio.charset.Charset. For this reason the OutputStreamWriter always uses the
system encoding.

Workaround:
A Workaround is to add an encoding parameter to the WsImportMojo and extend the
classes WSCodeWriter, FileCodeWriter and CodeWriter with an Charset parameter to
put it into the OutputStreamWriter.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

REPLACE_WITH_ACTUAL_URL not replaced when generating from local wsdl file

wsgen generates a wsdl containing REPLACE_WITH_ACTUAL_URL as soap address. When
this wsdl is used by wsimport, the generated client code does not work because
it uses that address

What is the recommended practice to handle this? If there is none, can we have a
plugin argument that actually replaces that string by a URL that can be given in
a profile?

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Bad Javadoc in SpringService.java causes SAXParseException: White spaces are required between publicId and systemId

Took me a while to track this down.

For xbean, you need to make sure your javadoc is xml compliant.

SpringService.java has some bad javadoc which causes below when deploying the
test-app

SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Line 1 in XML
document from ServletContext resource [/WEB-INF/applicationContext.xml] is
invalid; nested exception is org.xml.sax.SAXParseException: White spaces are
required between publicId and systemId.
Caused by: org.xml.sax.SAXParseException: White spaces are required between
publicId and systemId.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanExternalID(XMLScanner.java:1026)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.scanDoctypeDecl(XMLDocumentScannerImpl.java:685)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:965)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
at
com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:435)
at
com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:491)
at
com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:510)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1802)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:531)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2408)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1753)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:685)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2740)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:405)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:123)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:91)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
at
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3692)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1181)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1304)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
at java.lang.Thread.run(Thread.java:619)

In fact the problem has nothing to do with /WEB-INF/applicationContext.xml or
systemId or publicId. It has to do with unescaped > in
spring-jax-ws-core.xsd.html generated by xbean.

Will attach patch that fixes this.

This issue make release 1.1 unusable as is.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Unable to configure any <ws:features> due to XSD bug

Due to the following declaration in spring-jax-ws-core.xsd, the ws:features
element currently cannot be made to work as announced in

http://weblogs.java.net/blog/kohsuke/archive/2007/01/spring_support.html

<ws:service impl="foo.MyService">
ws:features
<ws:addressing />
</ws:features>
</ws:service>

but rather is completely useless: Due to being declared as
"namespace='##other'", it does not accept any nested tags from "ws" namespace,
such as ws:addressing and ws:mtom.

<xs:element name='features' minOccurs='0' maxOccurs='1'>
xs:annotation
xs:documentation<![CDATA[

{@link WebServiceFeature}

s that are activated in this endpoint.
]]></xs:documentation>
</xs:annotation>
xs:complexType
<xs:sequence minOccurs='0' maxOccurs='unbounded'><xs:any
namespace='##other'/></xs:sequence>
</xs:complexType>
</xs:element>

Changing this by directly modifying the xsd to read

<xs:sequence minOccurs='0' maxOccurs='unbounded'>xs:any/</xs:sequence>

works around the issue, but in order to really solve the issue from its roots, I
think some XBean annotations must be changed (sorry, I am not at all familiar
with XBean).

Could you please release an updated version of the Spring extension to fix this?

Many thanks & best regards,

Andreas

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Grails-plugin: test-app: -> Error executing tests Error creating bean

Starting grails to run functional tests cause following error:

grails test-app

[5132] spring.GrailsWebApplicationContext Bean factory for application context
[org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@35be06]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@d8fb2b
Error executing tests Error creating bean with name
'com.sun.xml.ws.transport.http.servlet.SpringBinding#0' defined in URL
file:./grails-app/conf/spring/resources.xml: Cannot create inner bean '(inner
bean)' of type [org.jvnet.jax_ws_commons.spring.SpringService] while setting
bean property 'service'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)#1': FactoryBean threw exception on object creation;
nested exception is com.sun.xml.ws.model.RuntimeModelerException: runtime
modeler error: Wrapper class de.foo.bar.jaxws.ServiceMethod is not found. Have
you run APT to generate them? ...
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'com.sun.xml.ws.transport.http.servlet.SpringBinding#0' defined in URL
file:./grails-app/conf/spring/resources.xml: Cannot create inner bean '(inner
bean)' of type [org.jvnet.jax_ws_commons.spring.SpringService] while setting
bean property 'service'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)#1': FactoryBean threw exception on object creation;
nested exception is com.sun.xml.ws.model.RuntimeModelerException: runtime
modeler error: Wrapper class de.foo.bar.jaxws.ServiceMethod is not found. Have
you run APT to generate them?
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.

Environment

Operating System: Linux
Platform: All

Affected Versions

[current]

JSR-109

Recently I took jaxws-commons spring integration for a spin with glassfish and
noticed 2 things.

1. when following the tutorial on jaxws and spring from the metro site
(https://metro.dev.java.net/guide/Using_Metro_With_Spring_and_NetBeans_6_1.html)
the resulting application will register 2 web services. The first one being the
autodeployed webservice (I believe glassfish registers an interceptor prior to
loading the spring stuff) and the 2nd web service endpoint is the spring one. To
prevent the autdeployment one will need to add <web-app ...
metadata-complete="true"> to the web.xml. This is not really desirable as I
believe glassfish will ignore sun-web.xml alltogether. Maybe a setting in the
sun-web.xml to turn off autodeploy for webservices would be a better solution.

2. After disabling autodeployment of webservices for the web app the spring
servlet does not generate a webservices.xml nor does it register the service
with the glassfish admin console. Perhaps that would be a nice feature for the
spring integration. I am not too sure if there is much more work involved to
regain monitoring and other admin features.

Hope this case make sense, happy to send some further details.

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Error in metadata element definition in spring-jax-ws-core.xsd

It should be possible to specify multiple values for the ws:metadata element.
This is actually supported by the code in the SpringService class which has the
appropriate setter method:

void setMetadata(Collection metadata)

However, the element definition in spring-jax-ws-core.xsd only allows for a
single value:

<xs:element name='metadata' minOccurs='0' maxOccurs='1'>
xs:complexType
<xs:sequence minOccurs='0' maxOccurs='1'><xs:any
namespace='##other'/></xs:sequence>
</xs:complexType>
</xs:element>

Changing the value of the maxOccurs attribute on the xs:sequence element to
"unbounded" solves the issue and the following declaration is accepted:

<ws:service bean="#myPort">
ws:metadata
/WEB-INF/wsdl/schema1.xsd
/WEB-INF/wsdl/schema2.xsd
/WEB-INF/wsdl/schema3.xsd
</ws:metadata>
ws:primaryWsdl/WEB-INF/wsdl/myservice.wsdl</ws:primaryWsdl>
</ws:service>

Environment

Operating System: All
Platform: All

Affected Versions

[current]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.