[jbossws-users] [JBossWS] - WebService does not receive all the parameters passed from t
rkodumagulla1
do-not-reply at jboss.com
Fri Jan 5 09:56:04 EST 2007
I am using JBoss IDE Plugin for Eclipse 3.2.1 and running JBoss 4.0.5 GA app server. I am able to create a web service and deploy it to the server. However, when the WSClientProxy sends requests the web service by passing the parameters, the web service only gets the first parameter and the other parameters are always null
Did any body else run into this issue? Any help will be appreciated.
Here is my WSClient Proxy Class
------------------------------------------------------------------
package localhost.mtcse.services.SimpleWebService;
import java.rmi.RemoteException;
public class SimpleWebServiceProxy implements localhost.mtcse.services.SimpleWebService.SimpleWebService {
private String _endpoint = null;
private localhost.mtcse.services.SimpleWebService.SimpleWebService simpleWebService = null;
public SimpleWebServiceProxy() {
_initSimpleWebServiceProxy();
}
private void _initSimpleWebServiceProxy() {
try {
simpleWebService = (new localhost.mtcse.services.SimpleWebService.SimpleWebServiceServiceLocator()).getSimpleWebService();
if (simpleWebService != null) {
if (_endpoint != null)
((javax.xml.rpc.Stub)simpleWebService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
else
_endpoint = (String)((javax.xml.rpc.Stub)simpleWebService)._getProperty("javax.xml.rpc.service.endpoint.address");
}
}
catch (javax.xml.rpc.ServiceException serviceException) {}
}
public String getEndpoint() {
return _endpoint;
}
public void setEndpoint(String endpoint) {
_endpoint = endpoint;
if (simpleWebService != null)
((javax.xml.rpc.Stub)simpleWebService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
}
public localhost.mtcse.services.SimpleWebService.SimpleWebService getSimpleWebService() {
if (simpleWebService == null)
_initSimpleWebServiceProxy();
return simpleWebService;
}
public java.lang.String testParameters(java.lang.String parm1, java.lang.String parm2, java.lang.String parm3) throws java.rmi.RemoteException{
if (simpleWebService == null)
_initSimpleWebServiceProxy();
return simpleWebService.testParameters(parm1, parm2, parm3);
}
public static void main(String[] args) throws RemoteException {
SimpleWebServiceProxy swsp = new SimpleWebServiceProxy();
System.out.println(swsp.testParameters("Work1", "Work2", "Work3"));
}
}
-----------------------------------------------------------------
Here is my web service
-----------------------------------------------------------------
package org.dhhs.mtcse.service;
import org.dhhs.mtcse.session.*;
import java.util.*;
import com.finalist.util.log.*;
import org.dhhs.mtcse.exception.GenericBusinessException;
import org.apache.commons.beanutils.BeanUtils;
import org.dhhs.mtcse.util.log.*;
import org.apache.axis.AxisFault;
public class SimpleWebService {
/**
* The logger object.
*/
private static Logger log = LogService
.getLogger(SimpleWebService.class);
public String testParameters(String parm1, String parm2, String parm3) throws Exception {
log.debug("Parm 1: " + parm1);
log.debug("Parm 2: " + parm2);
log.debug("Parm 3: " + parm3);
return "Returned String is " + parm1 + " " + parm2 + " " + parm3;
}
}
------------------------------------------------------------
Here is the wsdl generated by Axis in JBoss
------------------------------------------------------------
?
<wsdl:definitions targetNamespace="http://localhost:8080/mtcse/services/SimpleWebService">
?
<!--
WSDL created by Apache Axis version: 1.2
Built on May 03, 2005 (02:20:24 EDT)
-->
?
<wsdl:types>
?
?
</wsdl:types>
?
<wsdl:message name="testParametersResponse">
<wsdl:part element="impl:testParametersReturn" name="testParametersReturn"/>
</wsdl:message>
?
<wsdl:message name="testParametersRequest">
<wsdl:part element="tns1:parm1" name="parm1"/>
<wsdl:part element="tns1:parm2" name="parm2"/>
<wsdl:part element="tns1:parm3" name="parm3"/>
</wsdl:message>
?
<wsdl:portType name="SimpleWebService">
?
<wsdl:operation name="testParameters" parameterOrder="parm1 parm2 parm3">
<wsdl:input message="impl:testParametersRequest" name="testParametersRequest"/>
<wsdl:output message="impl:testParametersResponse" name="testParametersResponse"/>
</wsdl:operation>
</wsdl:portType>
?
<wsdl:binding name="SimpleWebServiceSoapBinding" type="impl:SimpleWebService">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
?
<wsdl:operation name="testParameters">
<wsdlsoap:operation soapAction=""/>
?
<wsdl:input name="testParametersRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
?
<wsdl:output name="testParametersResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
?
<wsdl:service name="SimpleWebServiceService">
?
<wsdl:port binding="impl:SimpleWebServiceSoapBinding" name="SimpleWebService">
<wsdlsoap:address location="http://localhost:8080/mtcse/services/SimpleWebService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Appreciate your help.
RK
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998275#3998275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998275
More information about the jbossws-users
mailing list