I have axis2-1.6.1 running on JDK1.6.0_30 (not so a bad old version)
Atempting to make my web service / web service client supporting
"addressing", 
because addressing is required to have asynchronous transport operations
work properly, isn't it?

how ever when I deploy my web service in a jar, I get
 
21066091 [Timer-3] 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\java_first_jaxws-1.6.1.jar
Retrieving schema at 'HelloWorld_schema1.xsd', relative to 'C:\Program
Files\Apache Software Foundation\Apache Tomcat
6.0.26\work\Catalina\localhost\axis2\_axis2demo.hw.server.HelloWorldImpl
_HelloWorld'.
22076492 [Timer-3] INFO  org.apache.axis2.jaxws.framework.JAXWSDeployer
- Exception creating Axis Service : null
java.lang.NoSuchMethodError:
javax.xml.ws.soap.Addressing.responses()Ljavax/xml/ws/soap/AddressingFea
ture$Responses;
        at
org.apache.axis2.jaxws.server.config.AddressingConfigurator.configure(Ad
dressingConfigurator.java:150)
        at
org.apache.axis2.jaxws.feature.ServerFramework.configure(ServerFramework
.java:97)
        at
org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.configur
eWebServiceFeatures(EndpointDescriptionImpl.java:1770)
        at
org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(E
ndpointDescriptionImpl.java:601)
        at
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(Se
rviceDescriptionImpl.java:401)
        at
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(Se
rviceDescriptionImpl.java:297)
        at
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createSer
viceDescriptionFromDBCMap(DescriptionFactoryImpl.java:255)
        at
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createSer
viceDescriptionFromDBCMap(DescriptionFactoryImpl.java:327)
        at
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createSer
viceDescription(DescriptionFactoryImpl.java:216)
        at
org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(
DescriptionFactory.java:564)
        at
org.apache.axis2.jaxws.framework.JAXWSDeployer.createAxisService(JAXWSDe
ployer.java:257)
        at
org.apache.axis2.jaxws.framework.JAXWSDeployer.deployClasses(JAXWSDeploy
er.java:208)
        at
org.apache.axis2.jaxws.framework.JAXWSDeployer.deploy(JAXWSDeployer.java
:162)
        at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(De
ploymentFileData.java:136)
        at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.j
ava: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(RepositoryL
istener.java:254)
        at
org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryL
istener.java:364)
        at
org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(Sche
dulerTask.java:73)
        at
org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.ja
va:94)
        at
org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(S
cheduler.java:93)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

When I debugg the code, the exception is raised when
org.apache.axis2.jaxws.server.config. AddressingConfigurator    attempts
to execute the following.

            responses = new
Parameter(AddressingConstants.WSAM_INVOCATION_PATTERN_PARAMETER_NAME, 
 
mapResponseAttributeToAddressing(addressing.responses()));

I have checked the API docs for JDK 6 and JDK 7
http://docs.oracle.com/javase/7/docs/api/index.html
http://docs.oracle.com/javase/6/docs/api/index.html

And it is in fact the case, that javax.xml.ws.soap.Addressing does only
have a responses() with JDK 7.0 but not with JDK 6.0
So that measn axis2-1.6.1 isn't 100% supported for JAX-WS 2.1 under JDK
1.6.0_30

What is the policy on that subject? 
Any overlooks? 
please help.

Josef


my simple web service code
package demo.hw.server;

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

@WebService
@BindingType(value= HTTPBinding.HTTP_BINDING)
public interface HelloWorld {
    @WebMethod(operationName = "sayHi", action = "urn:sayHi")
    String sayHi(String in);
}
// END SNIPPET: service

AND

package demo.hw.server;

import javax.annotation.Resource;
import javax.jws.WebService;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.soap.Addressing;

@Addressing
@WebService(endpointInterface = "demo.hw.server.HelloWorld",
serviceName = "HelloWorld")
public class HelloWorldImpl implements HelloWorld {

    @Resource
    private WebServiceContext context;

    public String sayHi(String in) {
        return "Hello " + in;
    }

    //Return the WebServiceContext
    private WebServiceContext getContext() {
        return context;
    }
}

Reply via email to