You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Stephane Gallès (JIRA)" <ji...@apache.org> on 2013/04/19 16:25:16 UTC

[jira] [Comment Edited] (AXIS2-4927) Can't use @WebFault and @RequestWrapper annotations in JAX-WS services on Java 1.6

    [ https://issues.apache.org/jira/browse/AXIS2-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13636414#comment-13636414 ] 

Stephane Gallès edited comment on AXIS2-4927 at 4/19/13 2:23 PM:
-----------------------------------------------------------------

Hi,

As I can not use workaround [1], I've tried workaround [2] (using child first classloading) and it has triggered a very subtle but blocking problem

Indeed, workaround [2] solved the "RequestWrapper" problem, but in the same time something weird happened : all my MTOM annotated services have started to behave as 'non-MTOM' services (I've found by chance that all the 'xop:include' had disappeared in the response from the server, the attachment were inlined instead of being attached via XOP, even though the type of the request was still 'xop+xml')

After a debugging session, I've localized the problem in method EndpointDescriptionImpl#isMTOMEnabled : this method is looking for the @BindingType or @MTOM annotation and when the workaround [2] is used, it simply does not see them anymore ! (even though the WSDL automatic generation is correct).

So, everything seems to work, the WSDL seems OK, but MTOM is deactivated on the annotated services during runtime.

(My environment JBOSS 4.2 GA + JDK 1.6 + Axis 1.6.2 libs embedded in a War (the War is in an Ear).
                
      was (Author: sgalles):
    Hi,

As can not use workaround [1], I've tried workaround [2] (using child first classloading) and it has triggered a very subtle but blocking problem

Indeed, workaround [2] solved the "RequestWrapper" problem, but in the same time something weird happened : all my MTOM annotated services have started to behave as 'non-MTOM' services (I've found by chance that all the 'xop:include' had disappeared in the response from the server, the attachment were inlined instead of being attached via XOP, even though the type of the request was still 'xop+xml')

After a debugging session, I've localized the problem in method EndpointDescriptionImpl#isMTOMEnabled : this method is looking for the @BindingType or @MTOM annotation and when the workaround [2] is used, it simply does not see them anymore ! (even though the WSDL automatic generation is correct).

So, everything seems to work, the WSDL seems OK, but MTOM is deactivated on the annotated services during runtime.

(My environment JBOSS 4.2 GA + JDK 1.6 + Axis 1.6.2 libs embedded in a War (the War is in an Ear).
                  
> Can't use @WebFault and @RequestWrapper annotations in JAX-WS services on Java 1.6
> ----------------------------------------------------------------------------------
>
>                 Key: AXIS2-4927
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4927
>             Project: Axis2
>          Issue Type: Bug
>          Components: jaxws
>    Affects Versions: 1.6.0, 1.6.1, 1.6.2
>            Reporter: Isuru Eranga Suriarachchi
>            Assignee: Andreas Veithen
>             Fix For: 1.7.0
>
>
> When @WebFault and @RequestWrapper annotations are used, JAX-WS service doesn't get deployed properly. Following is the stack trace on the console.
> java.lang.NoSuchMethodError: javax.xml.ws.WebFault.messageName()Ljava/lang/String;
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.attachWebFaultAnnotation(JavaClassToDBCConverter.java:384)
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.setTypeTargettedAnnotations(JavaClassToDBCConverter.java:247)
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.introspectClass(JavaClassToDBCConverter.java:159)
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.buildDBC(JavaClassToDBCConverter.java:141)
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.produceDBC(JavaClassToDBCConverter.java:97)
> 	at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:215)
> 	at org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(DescriptionFactory.java:564)
> 	at org.apache.axis2.jaxws.framework.JAXWSDeployer.createAxisService(JAXWSDeployer.java:253)
> 	at org.apache.axis2.jaxws.framework.JAXWSDeployer.deployClasses(JAXWSDeployer.java:208)
> 	at org.apache.axis2.jaxws.framework.JAXWSDeployer.deploy(JAXWSDeployer.java:162)
> 	at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> 	at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
> 	at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> 	at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:370)
> 	at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
> 	at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:142)
> 	at org.apache.axis2.deployment.FileSystemConfigurator.loadServices(FileSystemConfigurator.java:147)
> 	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
> 	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
> 	at org.apache.axis2.transport.SimpleAxis2Server.<init>(SimpleAxis2Server.java:47)
> 	at org.apache.axis2.transport.SimpleAxis2Server.main(SimpleAxis2Server.java:98)
> [INFO] Exception creating Axis Service : null
> java.lang.NoSuchMethodError: javax.xml.ws.RequestWrapper.partName()Ljava/lang/String;
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaMethodsToMDCConverter.attachRequestWrapperAnnotation(JavaMethodsToMDCConverter.java:202)
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaMethodsToMDCConverter.convertMethods(JavaMethodsToMDCConverter.java:84)
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.introspectClass(JavaClassToDBCConverter.java:193)
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.buildDBC(JavaClassToDBCConverter.java:141)
> 	at org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter.produceDBC(JavaClassToDBCConverter.java:120)
> 	at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:215)
> 	at org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(DescriptionFactory.java:564)
> 	at org.apache.axis2.jaxws.framework.JAXWSDeployer.createAxisService(JAXWSDeployer.java:253)
> 	at org.apache.axis2.jaxws.framework.JAXWSDeployer.deployClasses(JAXWSDeployer.java:208)
> 	at org.apache.axis2.jaxws.framework.JAXWSDeployer.deploy(JAXWSDeployer.java:162)
> 	at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> 	at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
> 	at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> 	at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:370)
> 	at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
> 	at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:142)
> 	at org.apache.axis2.deployment.FileSystemConfigurator.loadServices(FileSystemConfigurator.java:147)
> 	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
> 	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
> 	at org.apache.axis2.transport.SimpleAxis2Server.<init>(SimpleAxis2Server.java:47)
> 	at org.apache.axis2.transport.SimpleAxis2Server.main(SimpleAxis2Server.java:98)
> Thanks,
> ~Isuru

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org