[JBossWS] - Problem with xsd:enumeration in jbossws 1.0.3
by kcp
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
18 years
[JCA/JBoss] - Re: Integrating / Deploying SunOne OpenMessageQueue with JBo
by jsalvo
"jsalvo" wrote :
| SunOne OMQ comes distributed with a RAR archive ( imqjmsra.rar ). However, I could not find information on how to go about deploying it inside of JBoss:
|
| 1) Do I just copy the .rar archive onto the deploy directory ?
|
Answering myself on that part. I modified the ra.xml inside the RAR file so that it connects to the proper IP and port of the remotely running SunOneMQ, and copied the RAR file into the deploy directory. That's working fine now. The SunOneMQ RA is deployed:
| 2006-12-01 18:05:35,686 DEBUG [org.jboss.system.ServiceController] starting service jboss.jca:service=RARDeployment,name='imqjmsra.rar'
| 2006-12-01 18:05:35,686 DEBUG [org.jboss.resource.deployment.RARDeployment] Starting jboss.jca:service=RARDeployment,name='imqjmsra.rar'
| 2006-12-01 18:05:35,744 ERROR [STDERR] 1/12/2006 18:05:35 com.sun.messaging.jms.ra.ResourceAdapter start
| INFO: MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...
| ================================================================================
| Sun Java(tm) System Message Queue 4.0
| Sun Microsystems, Inc.
| Version: 4.0 (Build 28-a)
| Compile: Tue May 2 09:50:18 PDT 2006
|
| Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
| SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
| This product includes code licensed from RSA Data Security.
| ================================================================================
| 18:05:37,649 ERROR [STDERR] 1/12/2006 18:05:37 com.sun.messaging.jms.ra.ResourceAdapter start
| INFO: MQJMSRA_RA1101: SJSMQ JMS ResourceAdaapter configuration=
| < .. snip ..>
|
| 18:05:37,653 ERROR [STDERR] 1/12/2006 18:05:37 com.sun.messaging.jms.ra.ResourceAdapter start
| INFO: MQJMSRA_RA1101: SJSMQ JMSRA Started
|
anonymous wrote :
| 2) What do I need to configure in the various xml files ( e.g. jms-ds.xml, etc... ) so that it uses SunOne OMQ ....:
| 2a) ... in addition to JBossMQ ?
| 2b) ... as a replacement for JBossMQ ?
|
The only thing now is, do I have to change the any JBoss specific XML files ?
Regards,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990367#3990367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990367
18 years
[JCA/JBoss] - Re: Problem with writing JCA adapter
by LGSW_Sam
Hi Weston!
I also noticed that my matchManagedConnections(Set connections, Subject subject, ConnectionRequestInfo info)
connections.size() is always 1..
I have checked that I do get connections.
Here is my cleanup and destroy methods.
|
| private AbstractProtocolHandler handler;
| private Vector <Object> handles;
|
| // Goes throu every item in handles and sets value of valid to false
| public void cleanup() throws ResourceException {
| synchronized (this) {
| for (Iterator it = handles.iterator(); it.hasNext(); )
| {
| Invalidatable i = (Invalidatable)it.next();
| i.invalidate();
| }
| handles = new Vector();
| attributes = new HashMap();
| }
| }
|
| public void invalidate() {
| setValid(false);
| }
|
| // Sets value of closing to true and if there is handler then disconnects its connection.
| public void destroy() throws ResourceException {
| synchronized (this) {
| this.closing = true;
| if (handler != null) {
| try {
| handler.disconnect();
| } catch (ProtocolHandlerException e) {
| e.printStackTrace();
| }
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990363#3990363
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990363
18 years