[jboss-user] [JBossWS] - Problem with xsd:enumeration in jbossws 1.0.3

kcp do-not-reply at jboss.com
Fri Dec 1 03:30:16 EST 2006


Hello,

I am using JBossAS 4.0.5. The included wstools (jbossws 1.0.3SP1) seem to have a problem with xsd:enumeration.

My Wsdl is of type docment-literial with elementFormDefault="qualified" and looks as follows:

  | [...]
  | <xsd:complexType name="ForecastRequestData"> 
  |   <xsd:sequence> 
  |     <xsd:element minOccurs="0" name="accountID" nillable="true" type="xsd:string"/>  
  |     <xsd:element minOccurs="0" name="contentMatchMaxBid" nillable="true" type="xsd:double"/>  
  |     <xsd:element minOccurs="0" name="geoTargets" nillable="true" type="tns:ArrayOfString"/>  
  |     <xsd:element minOccurs="0" name="marketID" nillable="true" type="xsd:string"/>  
  |     <xsd:element minOccurs="0" name="matchTypes" nillable="true" type="tns:ArrayOfForecastMatchType"/>  
  |     <xsd:element minOccurs="0" name="sponsoredSearchMaxBid" nillable="true" type="xsd:double"/> 
  |   </xsd:sequence> 
  | </xsd:complexType>
  | <xsd:complexType name="ArrayOfForecastMatchType"> 
  |   <xsd:sequence> 
  |     <xsd:element maxOccurs="unbounded" minOccurs="0" name="ForecastMatchType" nillable="true" type="tns:ForecastMatchType"/> 
  |   </xsd:sequence> 
  | </xsd:complexType>  
  | <xsd:simpleType name="ForecastMatchType"> 
  |   <xsd:restriction base="xsd:string"> 
  |    <xsd:enumeration value="AdvancedMatch"/>  
  |    <xsd:enumeration value="ContentMatch"/>  
  |    <xsd:enumeration value="SponsoredSearch"/> 
  |   </xsd:restriction> 
  | </xsd:simpleType>
  | [...]
  | 

When I use the wstools to generate java classes from the wsdl, I do not get classes for "ForecastMatchType" and "ArrayOfForecastMatchType". I the "ForecastRequestData" the member "matchTypes" is a String[].

When I deploy this classes and the JaxRPC-Mapping JBoss can not parse the response message. I get as error:

  | ERROR [CallImpl] Call invocation failed with unkown Exception
  | javax.xml.soap.SOAPException: Could not transmit message
  | [...]
  | Caused by: javax.xml.rpc.JAXRPCException: org.jboss.xb.binding.JBossXBRuntimeException: Failed to find neither value() nor getValue() in class java.lang.String which is bound to enumeration type {somenamespace}ForecastMatchType
  | [...]
  | Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to find neither value() nor getValue() in class java.lang.String which is bound to enumeration type {somenamespace}ForecastMatchType

I managed to solve the problem, by adding the missing classes and mapping entries manually (as described in http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983950). But, as I have some more wsdls with about 20 enums in total, this solution will not work ;-)

I tried to use jbossws 1.0.4, but I ran into the same problem as in http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987393

I have two questions:
1) Will the wstools in jbossws 1.0.4 be fixed before the official release of 1.0.5 (which according to jiro is scheduled for Feb 2007?
2) Does  jbossws 1.0.4 handle enums correct, or is this scheduled for a later version?

I am grateful for any help.

Regards
Charly

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

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



More information about the jboss-user mailing list