[jbossws-users] [JBossWS] - Re: trying to access a webservice - not working from either

PeterJ do-not-reply at jboss.com
Wed Jul 25 13:10:42 EDT 2007


I must say that your WSDL file looks very strange. It appears that for some reason that the method names are being treated as types. More on that in a second.

The first thing I noticed was that JBossWS did not like List as a return type. When i deployed the web service I got this error:

Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of
  | IllegalAnnotationExceptions
  | java.util.List is an interface, and JAXB can't handle interfaces.
  |         this problem is related to the following location:
  |                 at java.util.List

When I changed the return types to ArrayList, the error went away and the web service deployed just fine.

Looking at my WSDL, one of the methods is defined by:

<message name="POAddressManagerWS_getAddressByPostCode">
  |   <part name="arg0" type="xsd:string"/>
  | </message>
  | <message name="POAddressManagerWS_getAddressByPostCodeResponse">
  |   <part name="return" type="tns:arrayList"/>
  | </message>

while for you it is defined as:

<message name="POAddressManagerWS_getAddressByPostCode">
  |   <part element="tns:getAddressByPostCode" name="getAddressByPostCode" /> 
  |   </message>
  | - <message name="POAddressManagerWS_getAddressByText">
  |   <part element="tns:getAddressByText" name="getAddressByText" /> 
  |   </message>

This explains the error you are getting:

anonymous wrote : Exception in thread "main" org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://session.address.cmmgroup.com/}getAddressByPostCode

because there is no such type, hence no type mapping.

Unfortunately, I don't know what to tell you to do to correct this. As I said, your WSDL looks way different from mine. And other than changing the return types to ArrayList, the only other thing I did differently was I did not code up the entity bean (I hard-coded the return of a ArrayList containing two strings). Also, I did not try the client.



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

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



More information about the jbossws-users mailing list