axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josef Stadelmann (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-3817) JAXWS error occurs when invoking java-first service in RESTful manner
Date Wed, 28 Mar 2012 13:44:28 GMT

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

Josef Stadelmann commented on AXIS2-3817:
-----------------------------------------

I did as said above - AND have enhanced the sample application jaxws-version in axis2-1.6.1
package sample.jaxws;

import javax.jws.WebService;
import javax.xml.ws.BindingType;
import javax.xml.ws.http.HTTPBinding;

@WebService(serviceName = "JAXWSVersion",
            portName="VersionPort",
            wsdlLocation="META-INF/version.wsdl")
@BindingType(value= HTTPBinding.HTTP_BINDING)
public class Version {
    public String getVersion() throws Exception {
        return "Hello I am Axis2 version service ," +
                " My version is " + org.apache.axis2.Version.getVersionText();
    }

and get the following back when I launch Tomcat 

3682 [main] INFO  org.apache.axis2.jaxws.framework.JAXWSDeployer  - Deploying artifact : C:\Program
Files\Apache Software Foundation\Apache Tomcat 6.0.26\webapps\axis2\WEB-INF\servicejars\jaxws-version-1.6.1.jar
3838 [main] INFO  org.apache.axis2.jaxws.framework.JAXWSDeployer  - Exception creating Axis
Service : null
javax.xml.ws.WebServiceException: The ServiceDescription failed to validate due to the following
errors -- Validation Phase 2 failure:  :: Endpoint failed validation ::  :: There is a mismatch
between the wsdl and annotation information.  Please make sure both use the same binding namespace.
 The wsdl is [SOAP 1.1 HTTP Binding]namespace = {http://schemas.xmlsoap.org/wsdl/soap/}. 
The annotation is [XML HTTP Binding]namespace = {http://www.w3.org/2004/08/wsdl/http}., Failing
composite: org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite@1754daa
ClassName: sample.jaxws.Version; SuperClass:java.lang.Object
Class modifiers: 
is Service Provider: true
wsdlURL: jar:file:/C:/Program Files/Apache Software Foundation/Apache Tomcat 6.0.26/temp/axis2-tmp-1700637798562779905.tmp/axis22074050676493411695jaxws-version-1.6.1.jar!/META-INF/
has wsdlDefinition?: true
Interfaces: 
WebService: 
@WebService.name= 
@WebService.serviceName= JAXWSVersion
@WebService.endpointInterface= 
@WebService.targetNamespace= 
@WebService.wsdlLocation= META-INF/version.wsdl
@WebService.portName= VersionPort

BindingType: 
@BindingType.value= http://www.w3.org/2004/08/wsdl/http

Number of Method Descriptions: 2
org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite@3de71c
Name: getVersion; ReturnType: java.lang.String
Exceptions: java.lang.Exception; 
Number of Parameter Descriptions: 0
org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite@ffc1c
Name: <init>; ReturnType: null
Exceptions: 
Number of Parameter Descriptions: 0
Number of Field Descriptions: 0, Failing Service Description: org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl@170c7a3
ServiceQName: {http://jaxws.sample/}JAXWSVersion
isWSDLSpecified: true; WSDL Location: null
WSDL Definition available: true; Generated WSDL Definition available: false
isServerSide: true
handlerChainAnnotation: null
handlerChainsType: null
Number of defined ports: 1
Port QNames: {http://jaxws.sample/}VersionPort; start compositeorg.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite@1754daa
ClassName: sample.jaxws.Version; SuperClass:java.lang.Object
Class modifiers: 
is Service Provider: true
wsdlURL: jar:file:/C:/Program Files/Apache Software Foundation/Apache Tomcat 6.0.26/temp/axis2-tmp-1700637798562779905.tmp/axis22074050676493411695jaxws-version-1.6.1.jar!/META-INF/
has wsdlDefinition?: true
Interfaces: 
WebService: 
@WebService.name= 
@WebService.serviceName= JAXWSVersion
@WebService.endpointInterface= 
@WebService.targetNamespace= 
@WebService.wsdlLocation= META-INF/version.wsdl
@WebService.portName= VersionPort

BindingType: 
@BindingType.value= http://www.w3.org/2004/08/wsdl/http

Number of Method Descriptions: 2
org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite@3de71c
Name: getVersion; ReturnType: java.lang.String
Exceptions: java.lang.Exception; 
Number of Parameter Descriptions: 0
org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite@ffc1c
Name: <init>; ReturnType: null
Exceptions: 
Number of Parameter Descriptions: 0
Number of Field Descriptions: 0
end composite

Number of EndpointDescrptions: 1
org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl@142d884
Name: Version; Endpoint Address: http://192.168.2.102:8080/axis2/services/JAXWSVersion.VersionPort
ServiceQName: {http://jaxws.sample/}JAXWSVersion; PortQName: {http://jaxws.sample/}VersionPort;
TargetNamespace: http://jaxws.sample/
Service Mode: null; Binding Type: http://www.w3.org/2004/08/wsdl/http; Client Binding Type:
http://schemas.xmlsoap.org/wsdl/soap/http
Is provider-based: false; Is proxy-based: true; Is WSDL fully specified: true
AxisService: JAXWSVersion
EndpointInterfaceDescription: org.apache.axis2.jaxws.description.impl.EndpointInterfaceDescriptionImpl@194d431
Name: Version; PortType: {http://jaxws.sample/}Version
SOAP Style: DOCUMENT; SOAP Use: LITERAL; SOAP Paramater Style: WRAPPED
Number of operations: 1
Operation: org.apache.axis2.jaxws.description.impl.OperationDescriptionImpl@1f71b53
Name: getVersion; Operation Name: getVersion; Action: 
Operation excluded: false; Is oneway: false; Is returning result: true; Is result header:
false; Is JAXWS Client Async method: false
SOAP Style: DOCUMENT; SOAP Use: LITERAL; SOAP Paramater Style: WRAPPED
Result name: return; Result part name: return; Result type: class java.lang.String; Result
actual type: class java.lang.String
Request Wrapper class: null; Response Wrapper class: null
Java declaring class name: sample.jaxws.Version
Java method name: getVersion
Java paramaters: []
Service Implementation method: null
Axis Operation: org.apache.axis2.description.InOutAxisOperation@bc917c
No Paramater Descriptions
Number of Fault Descriptions: 1
Fault Description: org.apache.axis2.jaxws.description.impl.FaultDescriptionImpl@1f378c8
Exception class: java.lang.Exception
Name: 
Namespace: 
FaultBean: 
FaultInfo Type Name  : 
No Attachment Descriptions
RuntimeDescriptions:0

RuntimeDescriptions:0

	at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:173)
	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:118)
	at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:271)
	at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:327)
	at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:216)
	at org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(DescriptionFactory.java:564)
	at org.apache.axis2.jaxws.framework.JAXWSDeployer.createAxisService(JAXWSDeployer.java:257)
	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.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:283)
	at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
	at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
	at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
4041 [main] ERROR org.apache.axis2.jaxws.framework.JAXWSDeployer  - Error:
 No @WebService annotated service implementations found in the jar: file:/C:/Program Files/Apache
Software Foundation/Apache Tomcat 6.0.26/webapps/axis2/WEB-INF/servicejars/jaxws-version-1.6.1.jar.
Service deployment failed.
4041 [main] DEBUG org.apache.axis2.deployment.WarBasedAxisConfigurator  - loaded services
from webapp
28.03.2012 15:38:51 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory bck
28.03.2012 15:38:51 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
28.03.2012 15:38:51 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
28.03.2012 15:38:51 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
28.03.2012 15:38:51 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
28.03.2012 15:38:51 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
28.03.2012 15:38:52 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
28.03.2012 15:38:52 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
28.03.2012 15:38:52 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
28.03.2012 15:38:52 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/46  config=null
28.03.2012 15:38:52 org.apache.catalina.startup.Catalina start
INFO: Server startup in 10024 ms

Josef
                
> JAXWS error occurs when invoking java-first service in RESTful manner
> ---------------------------------------------------------------------
>
>                 Key: AXIS2-3817
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3817
>             Project: Axis2
>          Issue Type: Bug
>          Components: jaxws
>    Affects Versions: 1.4
>         Environment: Axis2-1.4, jdk15, winxp
>            Reporter: Charitha Kankanamge
>            Assignee: Isuru Eranga Suriarachchi
>            Priority: Critical
>         Attachments: ExamplePOJOService.jar
>
>
> Following error is thrown when invoking a java-first jaxws based service in RESTful manner.
> [ERROR] An error was detected during JAXWS processing
> org.apache.axis2.AxisFault: An error was detected during JAXWS processing
>         at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:187)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
>         at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
>         at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
>         at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:257)
>         at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
>         at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
>         at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
>         at java.lang.Thread.run(Thread.java:595)
> Steps to reproduce:
> ================
> 1. Deploy the attached service on Axis2server
> It includes the following jaxws annotated class
> package org.test;
> import javax.jws.WebMethod;
> import javax.jws.WebService;
> @WebService
> public class ExamplePOJOService {
> 	@WebMethod
> 	public String reverse(String input) {
> 		StringBuffer buff = new StringBuffer();
> 		for (int i=input.length()-1; i>=0; i--) {
> 			buff.append(input.charAt(i));
> 		}
> 		return buff.toString();
> 	}
> }
> 2. Invoke the service in REStful manner
> http://10.100.1.150:8080/axis2/services/ExamplePOJOServiceService.ExamplePOJOServicePort/reverse?input=hello
> I copied jaxws-tools.jar and jaxws-rt.jar into Axis2/lib directory. However, I'm still
getting the same error.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


Mime
View raw message