[JBossWS] - Re: enumerations in jboss ws...
by mwiles
It's like when you're trying to break into a house - you assume the door is locked and can't figure out why you can't open it!
Well turns out that all that mapping stuff for the enum is surplus to requirements as far as jboss is concerned. You just remove it and it works fine!
| <java-xml-type-mapping>
| <java-type>za.co.sanlam.employeebenefits.IncomeTypeEnum</java-type>
| <root-type-qname xmlns:rtq="http://sanlam.co.za/employeebenefits/dto/1">rtq:IncomeTypeEnum</root-type-qname>
| <qname-scope>simpleType</qname-scope>
| <variable-mapping>
| <java-variable-name>pension</java-variable-name>
| <xml-element-name>pension</xml-element-name>
| </variable-mapping>
| <variable-mapping>
| <java-variable-name>salary</java-variable-name>
| <xml-element-name>salary</xml-element-name>
| </variable-mapping>
| </java-xml-type-mapping>
|
I took a simple remote interface which took as a parameter an object following the enum pattern and generated the wsdl and mapping file with jboss and no mappings for the values in the enumeration were generated.
The lines in red above are not necessary in jboss, and it uses the fromValue method to resolve the enum data type. Very impressive.
What I didn't mention is that the jaxrpc mapping file was generated by wsdl2java from WAS which generates mapping files which have this stuff included. I'm not so sure why it even bothers as that information is available from the wsdl. I removed the mapping and tested my simple web service and it behaved just fine.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008677#4008677
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008677
19 years, 2 months
[JBoss Seam] - Re: Sybase EAServer error
by saeediqbal1
after adding jsf-api.jar and jsf-impl.jar files to web-inf i am left with just this error. any help would be appreciated.
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh [AutoRefreshTask] Refresh failed for module: webapp-jboss_seam_registration
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh com.sybase.djc.SystemException
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.server.jetty.WebServer.refresh(WebServer.java:537)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.server.jetty.WebServer.refresh(WebServer.java:307)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.server.WebRefreshUtil.refresh(WebRefreshUtil.java:16)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.server.WebRefreshUtil.refresh(WebRefreshUtil.java:9)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.server.AutoRefreshTask.refresh(AutoRefreshTask.java:124)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.server.AutoRefreshTask.run(AutoRefreshTask.java:80)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at java.lang.reflect.Method.invoke(Method.java:585)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.scheduler.ScheduledTask.execute(ScheduledTask.java:910)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.scheduler.ScheduledTask_DJC.access$001(ScheduledTask_DJC.java:4)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.scheduler.ScheduledTask_DJC$1.invoke(ScheduledTask_DJC.java:29)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.transaction.TransactionManager.invokeNotSupported1(TransactionManager.java:654)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.transaction.TransactionManager.invokeNotSupported(TransactionManager.java:610)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.scheduler.ScheduledTask_DJC.execute(ScheduledTask_DJC.java:43)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.scheduler.ScheduledTask.run(ScheduledTask.java:717)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh Caused by: org.mortbay.util.MultiException[java.lang.IllegalStateException: Servlet class web.components.jboss_seam_registration.JspServlet$WC is not a javax.servlet.Servlet, java.lang.IllegalStateException: Servlet class javax.faces.webapp.FacesServlet is not a javax.servlet.Servlet]
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:486)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at org.mortbay.util.Container.start(Container.java:72)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh at com.sybase.djc.server.jetty.WebServer.refresh(WebServer.java:515)
2007-01-30 23:07:22.687 WARN ScheduledTask:AutoRefresh ... 15 more
2007-01-30 23:07:39.109 WARN HttpListener0-1 [ResourceCache] Alias request of 'file:/C:/EAServer6/html/jboss-seam-registration' for 'file:/C:/EAServer6/html/jboss-seam-registration'
2007-01-30
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008670#4008670
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008670
19 years, 2 months
[JBossWS] - urgent: java enums and mapping file...
by tejasjani
Hi all...
I am in urgent need of help.
I have some enum types defined in my schema. I have already written the associated enum type classes for them as described in some other posts here.
Now, I am not able to figure out how to change the jaxrpc-mapping file to map the xml enum types to the Java type classes.
I have looked for answers in a lot of places but could not find it.
Pls. help.
thanks
e.g.
Here is the enum type
<xsd:simpleType name="StatusType">
<xsd:restriction base="xsd:string">
<!-- The operation was successful. -->
<xsd:enumeration value="Success" />
<!-- An error occured while processing the request. -->
<xsd:enumeration value="SystemError" />
<!-- An error occurred due to input given from the user -->
<xsd:enumeration value="UserError" />
</xsd:restriction>
</xsd:simpleType>
-------------------------------------
Here is its Java type:
import java.io.Serializable;
public class StatusType implements Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected StatusType(java.lang.String value)
{
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _SUCCESS = "Success";
public static final java.lang.String _SYSTEMERROR = "SystemError";
public static final java.lang.String _USERERROR = "UserError";
public static final StatusType SUCCESS = new StatusType(_SUCCESS);
public static final StatusType USERERROR = new StatusType(_USERERROR);
public static final StatusType SYSTEMERROR = new StatusType(_SYSTEMERROR);
public java.lang.String getValue() { return _value_;}
public static StatusType fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException
{
StatusType enumeration = (StatusType)_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static StatusType fromString(java.lang.String value)
throws java.lang.IllegalArgumentException
{
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
}
-------------------------------------------------
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008668#4008668
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008668
19 years, 2 months