开发者

Inout and Out parameters in WebServices

I'm using Inout and Out parameters in the ServiceEndPointInterface(SEI). Here is the method signature.

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.WebParam.Mode;
import javax.jws.Oneway;
import javax.xml.rpc.holders.*;

@WebMethod
@Oneway
public  @WebResult void TestDomainCls( @WebParam (mode=Mode.INOUT)   IntegerWrapperHolder inpuInt ); 

And I have implemented this method in the EJBBean. And I have exposed this EJBBean as a webservice using annotation.

While deploying this EAR in JBOSS 5.,it's throwing the error like

Caused by:  java.lang.IllegalStateException: 
Cannot synchronize to any of these methods:
public abstract java.lang.String MURCOMP.MURCOMP_SEI.serv_20_search1(java.lang.String,javax.xml.rpc.holders.StringHolder)

OperationMetaData:
qname={http://MURCOMP/}serv_20_search1
javaName=serv_20_search1
style=rpc/literal
oneWay=false
soapAction=
ParameterMetaData:
xmlName=arg0
partName=arg0
xmlType={http://www.w3.org/2001/XMLSchema}string
javaType=java.lang.String
mode=IN
inHeader=false
index=0
ParameterMetaData:
xmlName=arg1
partName=arg1
xmlType={http://www.w3.org/2001/XMLSchema}anyType
javaType=java.lang.Object
mode=OUT
inHeader=false
index=1
ReturnMetaData:
xmlName=return
partName=return
xmlType={http://www.w3.org/2001/XMLSchema}string
javaType=java.lang.String
mode=OUT
inHeader=false
index=-1
at   org.jboss.ws.metadata.umdm.OperationMetaData.eagerInitialize(OperationMetaData.java:491)
    at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitializeOperations(EndpointMetaData.java:559)
    at org.jboss.ws.metadata.umdm.EndpointMetaData.initializeInternal(EndpointMetaData.java:543)
    at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitialize(EndpointMetaData.java:533)
    at org.jboss.ws.metadata.umdm.ServiceMetaData.eagerInitialize(ServiceMetaData.java:433)
    at org.jboss.ws.metadata.umdm.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:194)
    at org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect.start(EagerInitializeDeploymentAspect.java:48)
    at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:129)
    at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:76)
    at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:60)
    at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:113)
    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    ... 30 more
17:40:12,483 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS开发者_如何学JAVA FOR DETAILS):

This error is coming only if I'm using inout or out parameters in my method.

Can anyone suggest me.,where I'm going wrong or Is there anything missing with respect to INOUT and OUT parameters in Web Services

enter code here


I have got the solution.,I have used javax.xml.ws.Holder instead of the javax.xml.rpc.holders. The code is as follows @WebMethod public @WebResult String testINout(@WebParam Holder holder);

But I didnt got the actual solution, why if I use javax.xml.rpc.holders such exception has occured. Anyway the alternate way I found to work on..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜