[JBossWS] - JBossXSErrorHandler: cannot resolve XSD name when loading JS
by dma_k
Hello all!
Has anybody succeeded to deploy a JSR-181 EJB Endpoint, created by https://jax-ws.dev.java.net/?
I am trying to use JAX-WS 2.0 with JbossWS 1.0.3. I have done the following:
- Launched jboss-4.0.5.GA + jboss-EJB-3.0_RC9-FD + jbossws-1.0.3.GA.
- Generated all JAXB entities + ..PortType.java interface + ..Service.java class using the wsimport as written in https://jax-ws.dev.java.net/nonav/jax-ws-21-ea2/docs/UsersGuide.html#3.1.....
- Implemented ..PortType.java (..PortTypeImpl.java) and turned it to JSR-181 EJB Endpoint:
// Standard EJB3 annotations:
| @Local(..LocalInterface.class)
| @Stateless
| // Standard JSR181 annotations:
| @WebService(name = "..PortType", wsdlLocation="META-INF/wsdl/Search.wsdl", targetNamespace = "https://webservices.dot.com/services")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| // JBoss propriatary annotations:
| @PortComponent(contextRoot = "/service/search", urlPattern = "/*")
| @LocalBinding(jndiBinding = "/ejb3/MyBean")
| public class ..PortTypeImpl
| implements ..LocalInterface, ..PortType
| {
| // EJB local interface:
| public SearchRS doHotelSearch(SearchRQ request)
| {
| return null;
| }
|
| @WebMethod
| public SearchRS doHotelSearch(Holder<MessageHeader> ebHeader,
| Holder<Security> wsseHeader, SearchRQ bodyRQ)
| {
| return null;
| }
|
| @WebMethod
| public InfoRS getHotelDescriptiveInfo(Holder<MessageHeader> ebHeader,
| Holder<Security> wsseHeader, InfoRQ bodyRQ)
| {
| return null;
| }
| }
And when deploying it I have a lot of errors like this:
02 16:02:18 ERROR [ws.metadata.wsdl.xmlschema.JBossXSErrorHandler] JBossWS_www.opentravel.org_OTA_2003_0544098.xsd[domain:http://www.w3.org/... resolve the name 'OTA_PayloadStdAttributes' to a(n) 'attribute group' component.
| 02 16:02:18 ERROR [ws.metadata.wsdl.xmlschema.JBossXSErrorHandler] JBossWS_www.opentravel.org_OTA_2003_0544098.xsd[domain:http://www.w3.org/... valid-content.1]::Message=s4s-elt-invalid-content.1: The content of '#AnonType_OTA_HotelDescriptiveInfoRS' is invalid. Element 'attributeGroup' is invalid, misplaced, or occurs too often.
| ...
| org.jboss.ws.WSException: Cannot load schema: [file:/usr/local/jboss-4.0.5.GA/server/default/tmp/jbossws/JBossWS_www.opentravel.org_OTA_2003_0544099.xsd, file:/usr/local/jboss-4.0.5.GA/server/default/tmp/jbossws/JBossWS_schemas.xmlsoap.org_ws_2002_12_secext44092.xsd, file:/usr/local/jboss-4.0.5.GA/server/default/tmp/jbossws/JBossWS_schemas.xmlsoap.org_soap_envelope_44094.xsd, file:/usr/local/jboss-4.0.5.GA/server/default/tmp/jbossws/JBossWS_www.ebxml.org_namespaces_messageHeader44090.xsd]
| at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:172)
| at org.jboss.ws.metadata.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:227)
| at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:118)
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:145)
Is it possible at all? Any ideas?
Thanks a lot.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982888#3982888
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982888
19Â years, 6Â months
[Persistence, JBoss/CMP, Hibernate, Database] - read-only
by andreas.ammerï¼ eyesys.se
Hello, i recently started for a company fixing some of the problems they had in their java code. The problem remaining in the application is the amount of deadlocks in the database. The system is running on jboss 4.0.2, ejb2.0, xdoclet 1.1.2, j2sdk1.4.1, mysql 4.0.16.
I dont know that much about configuring beans but ive noticed that trying to fix the order of all transactions in the application looks like it could take weeks if at all even possible. Ive been reading around a bit and found that you can set certain methods in a bean to read-only. For example this site: http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch5.chapter.html
in chapter 5.4.6.4. there is a description on how making readonly methods to avoid deadlocks.
What ive done is this.
In the code of the bean:
* @ejb.persistence
* read-only="true" <<< added this
* column-name="uuid"
* sql-type="VARCHAR(35)"
and in the jboss-web.xml i added method-attributes:
<ejb-ref>
<ejb-ref-name>ejb/SomeBean</ejb-ref-name>
<jndi-name>ejb/SomeBean</jndi-name>
<method-attributes>
<method-name>getUUID</method-name>
<read-only>true</read-only>
</method-attributes>
</ejb-ref>
with the ref-name linked to the web-..xml:
<ejb-ref>
<ejb-ref-name>ejb/SomeBean</ejb-ref-name>
<ejb-ref-type>EntityBean</ejb-ref-type>
capi.SomeBeanHome
capi.SomeBean
</ejb-ref>
Deadlocks only appear when accessing the primary key field (uuid) of the table, the changes ive made in both the code and the xml-file seem to have no effect at all. Is there some crucial detail im missing here? Would appreciate any input.
Thanks in advance
Andreas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982887#3982887
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982887
19Â years, 6Â months
[JBoss Seam] - Re: BUG?
by Seto
here is the code of the Article
| /**
| *
| */
| package cn.net.kdc.domain.cms;
|
| import java.util.*;
|
| import javax.persistence.*;
|
| import org.hibernate.validator.*;
|
| import cn.net.kdc.domain.global.*;
|
| /**
| * @author Seto
| *
| */
| @Entity
| @Table(name = "cms_article")
| public class Article {
| @Id
| @GeneratedValue
| @Column(name = "id")
| private int id;
|
| @Column(name = "tag")
| @NotNull
| @Length(min = 2, max = 8)
| private String tag;
|
| @Column(name = "title")
| @NotNull
| @Length(min = 4, max = 32)
| private String title;
|
| @Column(name = "short_title")
| @NotNull
| @Length(min = 4, max = 32)
| private String short_title;
|
| @Column(name = "long_title")
| @NotNull
| @Length(min = 4, max = 32)
| private String long_title;
|
| @Column(name = "author")
| @Length(min = 4, max = 64)
| private String author;
|
| @Column(name = "click_count")
| private int click_count;
|
| @Column(name = "insert_date")
| @NotNull
| @Temporal(TemporalType.TIME)
| private Date insert_date = new Date();
|
| @Column(name = "update_date")
| @NotNull
| @Temporal(TemporalType.TIME)
| private Date update_date = new Date();
|
| @Column(name = "intro")
| private String intro;
|
| @Column(name = "content")
| @NotNull
| private String content;
|
| @ManyToOne
| @JoinColumn(name = "photo")
| private Resource photo = new Resource();
|
| @ManyToOne
| @JoinColumn(name = "position")
| private Position position = new Position();
|
| @ManyToOne
| @JoinColumn(name = "category")
| private Category category = new Category();
|
| @ManyToMany
| @JoinTable(name = "cms_area_article", joinColumns = { @JoinColumn(name = "article") }, inverseJoinColumns = { @JoinColumn(name = "area") })
| private List<Area> areas = new ArrayList<Area>();
|
| @OneToMany(mappedBy = "article")
| private List<Comment> comments = new ArrayList<Comment>();
|
| /**
| * default constuctor
| */
| public Article() {
| super();
| }
|
| /**
| * minimal constructor
| *
| * @param id
| * @param tag
| * @param title
| * @param short_title
| * @param long_title
| * @param insert_date
| * @param update_date
| * @param content
| * @param position
| * @param category
| */
| public Article(int id, String tag, String title, String short_title,
| String long_title, Date insert_date, Date update_date,
| String content, Position position, Category category) {
| super();
| this.id = id;
| this.tag = tag;
| this.title = title;
| this.short_title = short_title;
| this.long_title = long_title;
| this.insert_date = insert_date;
| this.update_date = update_date;
| this.content = content;
| this.position = position;
| this.category = category;
| }
|
| /**
| * full constructor
| *
| * @param id
| * @param tag
| * @param title
| * @param short_title
| * @param long_title
| * @param author
| * @param click_count
| * @param insert_date
| * @param update_date
| * @param intro
| * @param content
| * @param photo
| * @param position
| * @param category
| * @param areas
| * @param comments
| */
| public Article(int id, String tag, String title, String short_title,
| String long_title, String author, int click_count,
| Date insert_date, Date update_date, String intro, String content,
| Resource photo, Position position, Category category,
| List<Area> areas, List<Comment> comments) {
| super();
| this.id = id;
| this.tag = tag;
| this.title = title;
| this.short_title = short_title;
| this.long_title = long_title;
| this.author = author;
| this.click_count = click_count;
| this.insert_date = insert_date;
| this.update_date = update_date;
| this.intro = intro;
| this.content = content;
| this.photo = photo;
| this.position = position;
| this.category = category;
| this.areas = areas;
| this.comments = comments;
| }
|
| /**
| * @return the id
| */
| public int getId() {
| return id;
| }
|
| /**
| * @param id
| * the id to set
| */
| public void setId(int id) {
| this.id = id;
| }
|
| /**
| * @return the tag
| */
| public String getTag() {
| return tag;
| }
|
| /**
| * @param tag
| * the tag to set
| */
| public void setTag(String tag) {
| this.tag = tag;
| }
|
| /**
| * @return the title
| */
| public String getTitle() {
| return title;
| }
|
| /**
| * @param title
| * the title to set
| */
| public void setTitle(String title) {
| this.title = title;
| }
|
| /**
| * @return the short_title
| */
| public String getShort_title() {
| return short_title;
| }
|
| /**
| * @param short_title
| * the short_title to set
| */
| public void setShort_title(String short_title) {
| this.short_title = short_title;
| }
|
| /**
| * @return the long_title
| */
| public String getLong_title() {
| return long_title;
| }
|
| /**
| * @param long_title
| * the long_title to set
| */
| public void setLong_title(String long_title) {
| this.long_title = long_title;
| }
|
| /**
| * @return the author
| */
| public String getAuthor() {
| return author;
| }
|
| /**
| * @param author
| * the author to set
| */
| public void setAuthor(String author) {
| this.author = author;
| }
|
| /**
| * @return the click_count
| */
| public int getClick_count() {
| return click_count;
| }
|
| /**
| * @param click_count
| * the click_count to set
| */
| public void setClick_count(int click_count) {
| this.click_count = click_count;
| }
|
| /**
| * @return the insert_date
| */
| public Date getInsert_date() {
| return insert_date;
| }
|
| /**
| * @param insert_date
| * the insert_date to set
| */
| public void setInsert_date(Date insert_date) {
| this.insert_date = insert_date;
| }
|
| /**
| * @return the update_date
| */
| public Date getUpdate_date() {
| return update_date;
| }
|
| /**
| * @param update_date
| * the update_date to set
| */
| public void setUpdate_date(Date update_date) {
| this.update_date = update_date;
| }
|
| /**
| * @return the intro
| */
| public String getIntro() {
| return intro;
| }
|
| /**
| * @param intro
| * the intro to set
| */
| public void setIntro(String intro) {
| this.intro = intro;
| }
|
| /**
| * @return the content
| */
| public String getContent() {
| return content;
| }
|
| /**
| * @return the photo
| */
| public Resource getPhoto() {
| return photo;
| }
|
| /**
| * @param photo
| * the photo to set
| */
| public void setPhoto(Resource photo) {
| this.photo = photo;
| }
|
| /**
| * @param content
| * the content to set
| */
| public void setContent(String content) {
| this.content = content;
| }
|
| /**
| * @return the position
| */
| public Position getPosition() {
| return position;
| }
|
| /**
| * @param position
| * the position to set
| */
| public void setPosition(Position position) {
| this.position = position;
| }
|
| /**
| * @return the category
| */
| public Category getCategory() {
| return category;
| }
|
| /**
| * @param category
| * the category to set
| */
| public void setCategory(Category category) {
| this.category = category;
| }
|
| /**
| * @return the areas
| */
| public List<Area> getAreas() {
| return areas;
| }
|
| /**
| * @param areas
| * the areas to set
| */
| public void setAreas(List<Area> areas) {
| this.areas = areas;
| }
|
| /**
| * @return the comments
| */
| public List<Comment> getComments() {
| return comments;
| }
|
| /**
| * @param comments
| * the comments to set
| */
| public void setComments(List<Comment> comments) {
| this.comments = comments;
| }
|
| }
|
|
here is the table definition
| CREATE TABLE `cms_article` (
| `id` int(10) unsigned NOT NULL auto_increment,
| `tag` varchar(8) NOT NULL,
| `title` varchar(32) NOT NULL,
| `short_title` varchar(32) NOT NULL,
| `long_title` varchar(32) NOT NULL,
| `author` longtext,
| `click_count` int(10) unsigned default NULL,
| `insert_date` datetime NOT NULL,
| `update_date` datetime NOT NULL,
| `intro` longtext,
| `content` longtext NOT NULL,
| `photo` int(10) unsigned default NULL,
| `position` int(10) unsigned NOT NULL,
| `category` int(10) unsigned NOT NULL,
| PRIMARY KEY (`id`)
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
here is the HQL strings
| from Article article
|
Result:
The row with null click_count won't return.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982880#3982880
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982880
19Â years, 6Â months
[JBoss jBPM] - Is this a viable scenario?
by apill
We have an EJB 3 application running in Jboss that is designed to track inventory. Our data model is persisted with hibernate and according to the EJB3 spec and we're using stateless session beans to execute business logic from the client application.
I would like design a workflow to manage which actions can be performed upon an item of inventory at any point during it's life. For example, if it is in a repair state it can either be repaired or scrapped.
>From the client app it would be nice to ask the server...
what are the current available actions for this inventory?
then...
1. user selects an action
2. client app collects necessary data from the user for the action
3. client invokes the action in the workflow to move the inventory to its next state
Is this a valid scenario that could be integrated with jBPM? How might i go about this? Can someone point me to some documentation that might help?
The tutorial/getting started docs are fine, but they give me no clue as to how to begin integrating a workflow with my system.
Thank you very much.
Adrian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982879#3982879
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982879
19Â years, 6Â months