You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by frper <fr...@gmail.com> on 2010/02/16 15:10:48 UTC

Problemto access to an Axis 1 web service with a JAX-RPC client

Hello,

Trying to clear to expose my problem, I've created two simple Axis 1.3 web
services which are almost identical.
One can be access by a JAX-RPC while the other can't be.
The services contains only one operation : getTeam, which returns a Team
Object.
Team has a "name" attribute and an array of String which is the list of the
members of the team.

The only difference between the 2 services is that in one case, the Team
class is in the same package (test.ws.service.axis) than the operation,
while in the other case, the two classes are in different packages
(test.ws.service.axis and test.ws.service.axis.bean).

When I try to access to the second service with a JAX-RPC client, I raise an
exception :
Unable to deserialize the name element of name the bean
test.ws.service.axis.bean.Team
The child element name doesn't belong to the namespace
http://axis.service.ws.test

My two wsdl et server-config.wsdd seems to be corrects. 
But what seems odd to me is that the 2 services send the same response :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<soapenv:Body>
		<getTeamResponse xmlns="http://axis.service.ws.test">
			<getTeamReturn>
				<name>LA Lakers</name>
				<players>
					<players>Kobe BRYANT</players>
					<players>Pau GASOL</players>
					<players>Andrew BYNUM</players>
					<players>Ron ARTEST</players>
					<players>Lamar ODOM</players>
					<players>Shannon BROWN</players>
				</players>
			</getTeamReturn>
		</getTeamResponse>
	</soapenv:Body>
</soapenv:Envelope>

I made some test with a mock service on soapUI, an my JAX-RPC client seems
to expect a response like this :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:axis="http://axis.service.ws.test"
xmlns:bean="http://bean.axis.service.ws.test">
	<soapenv:Header/>
	<soapenv:Body>
		<axis:getTeamResponse>
			<axis:getTeamReturn>
				<bean:name>SA Spurs</bean:name>
				<bean:players>
					<bean:players>Tony Parker</bean:players>
					<bean:players>Tim Duncan</bean:players>
				</bean:players>
			</axis:getTeamReturn>
		</axis:getTeamResponse>
	</soapenv:Body>
</soapenv:Envelope>

I also made the test with Axis 1.4 and the results were the same.
My question is who is right, Axis or JAX-RPC.

Excuse my poor english.
Thank you for your help

-- 
View this message in context: http://old.nabble.com/Problemto-access-to-an-Axis-1--web-service-with-a-JAX-RPC-client-tp27608882p27608882.html
Sent from the Axis - User mailing list archive at Nabble.com.