I'm trying to figure out why I'm getting this "Unexpected subelement
return" Runtime Exception when I try to use an axis2 client that I
created by using wsdl2java pointing to a wsdl that describes a
webservice running on Jboss4.0.5 (with jax-ws2.0 applied).
I can easily create the webservice from the same wsdl using visual
studio 2005. I can also connect fine if I build my client on a remote
jboss server using the wsconsume tool to generate my client stub.
The client code that I'm trying to use looks like this in a TestClient class:
CalculatorBeanServiceStub stub = new CalculatorBeanServiceStub();
CalculatorBeanServiceStub.Add addClass = new
CalculatorBeanServiceStub.Add();
addClass.setArg0(5);
addClass.setArg1(1);
AddResponse addResponse = stub.add(addClass);
System.out.println( addResponse.localResult );
The wsdl I pasted here http://pastehere.com/?lidoec
and also is listed below (at the end I also list the annotated ejbs
that are deployed). Thanks for any help with this. It's sort of
driving me nuts that I can get this to work from a .NET client but not
Axis2.
<definitions name='CalculatorBeanService'
targetNamespace='http://bean.webservice.tutorial.jboss.org/'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://bean.webservice.tutorial.jboss.org/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<types></types>
<message name='Calculator_subtract'>
<part name='arg0' type='xsd:int'/>
<part name='arg1' type='xsd:int'/>
</message>
<message name='Calculator_subtractResponse'>
<part name='return' type='xsd:int'/>
</message>
<message name='Calculator_addResponse'>
<part name='return' type='xsd:int'/>
</message>
<message name='Calculator_add'>
<part name='arg0' type='xsd:int'/>
<part name='arg1' type='xsd:int'/>
</message>
<portType name='Calculator'>
<operation name='add' parameterOrder='arg0 arg1'>
<input message='tns:Calculator_add'/>
<output message='tns:Calculator_addResponse'/>
</operation>
<operation name='subtract' parameterOrder='arg0 arg1'>
<input message='tns:Calculator_subtract'/>
<output message='tns:Calculator_subtractResponse'/>
</operation>
</portType>
<binding name='CalculatorBinding' type='tns:Calculator'>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='add'>
<soap:operation soapAction=''/>
<input>
<soap:body namespace='http://bean.webservice.tutorial.jboss.org/'
use='literal'/>
</input>
<output>
<soap:body namespace='http://bean.webservice.tutorial.jboss.org/'
use='literal'/>
</output>
</operation>
<operation name='subtract'>
<soap:operation soapAction=''/>
<input>
<soap:body namespace='http://bean.webservice.tutorial.jboss.org/'
use='literal'/>
</input>
<output>
<soap:body namespace='http://bean.webservice.tutorial.jboss.org/'
use='literal'/>
</output>
</operation>
</binding>
<service name='CalculatorBeanService'>
<port binding='tns:CalculatorBinding' name='CalculatorBeanPort'>
<soap:address
location='http://rick-linux:8080/CalculatorBeanService/CalculatorBean'/>
</port>
</service>
</definitions>
--------
@Stateless
@WebService(endpointInterface="org.jboss.tutorial.webservice.bean.Calculator")
public class CalculatorBean
{
public int add(int x, int y)
{
return x + y;
}
public int subtract(int x, int y)
{
return x - y;
}
}
-----------
@WebService
@SOAPBinding(style=Style.RPC)
public interface Calculator extends Remote
{
@WebMethod int add(int x, int y);
@WebMethod int subtract(int x, int y);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]