[jboss-user] [EJB 3.0] - WSException: Cannot obtain java type mapping

stefaan.hallet@gmail.com do-not-reply at jboss.com
Wed Jul 30 11:20:05 EDT 2008


Got a webservice deployed on JBoss 4.2.2.GA. At client side, I included server side jar file containing the webservice in the classpath. It seemed that the client is not able to construct jaxrpc message to send to server.  Can generate classes from wsdl using wsconsume, do I have to use these classes at client side ? What is the recommended procedure ? 

Got:
client.AuctionWSClient
Starting Auction WebService Client
Creating a service Using:
http://127.0.0.1:8080/auction-auction-ejb/AuctionWebServiceBean?wsdl
and {http://webservice.auction.be/}AuctionWebServiceBeanService
Exception in thread "main" org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://webservice.auction.be/}item
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildInputParameter(JAXRPCMetaDataBuilder.java:266)

(Generated)WSDL-Extract:

<xs:schema targetNamespace="http://webservice.auction.be/" version="1.0">
<xs:complexType name="user">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="bids" nillable="true" type="tns:bid"/>
<xs:element minOccurs="0" name="email" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="items" nillable="true" type="tns:item"/>
</xs:sequence>
</xs:complexType>...............
<xs:complexType name="item">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="bids" nillable="true" type="tns:bid"/>
<xs:element minOccurs="0" name="description" type="xs:string"/>
<xs:element minOccurs="0" name="seller" type="tns:user"/>
</xs:sequence>
</xs:complexType>
</xs:schema>..................................

Interface AuctionWebService:
@WebService
@SOAPBinding(style = Style.RPC)
public interface AuctionWebService extends Remote {
@WebResult(name="user")User
createUser(@WebParam String email);
}

I have another webservice "echo" which works fine, but which don't use java beans as parameters or return type. The client path seems to be ok (I think). Added @WebResult and @WebParam, but this did not change anything. Deployment on JBoss gives no errors...

If anyone has an idea ?
Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167651#4167651

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167651



More information about the jboss-user mailing list