[JBossWS] - Re: Exception while deploying the webservice using jax-ws
by tpawankumar
alessio.soldano wrote:
anonymous wrote : Could you please post the code where you're using the XmlAccessorType annotation?
| I mean, are you using this
| Code:
|
| @XmlAccessorType(XmlAccessType.FIELD)
|
|
| or something different? (like an array of AccessType.FIELD)
|
| You might also start from the classes generated by wsconsume.
I have generated the classes from JAXB 2.0 . these classes are using this
@XmlAccessorType(XmlAccessType.FIELD)
and sample code for this
| //
| // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b26-ea3
| // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
| // Any modifications to this file will be lost upon recompilation of the source schema.
| // Generated on: 2007.10.22 at 10:28:58 AM IST
| //
|
|
| package com.covad.xsd.smo.vendororder;
|
| import java.util.ArrayList;
| import java.util.List;
| import javax.xml.bind.annotation.AccessType;
| import javax.xml.bind.annotation.XmlAccessorType;
| import javax.xml.bind.annotation.XmlElement;
| import javax.xml.bind.annotation.XmlType;
| import javax.xml.datatype.XMLGregorianCalendar;
| import com.covad.xsd.smo.vendororder.Client;
| import com.covad.xsd.smo.vendororder.LineItem;
| import com.covad.xsd.smo.vendororder.VendorOrder;
|
|
| /**
| * <p>Java class for VendorOrder complex type.
| *
| * <p>The following schema fragment specifies the expected content contained within this class.
| *
| * <pre>
| * <complexType name="VendorOrder">
| * <complexContent>
| * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
| * <sequence>
| * <element name="orderID" type="{http://www.w3.org/2001/XMLSchema}int"/>
| * <element name="vendorID" type="{http://www.w3.org/2001/XMLSchema}int"/>
| * <element name="vendorOrderID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
| * <element name="orderReceivedDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
| * <element name="contractAcceptedFlag" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
| * <element name="contractAcceptedDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
| * <element name="productLanguageCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
| * <element name="client" type="{http://smo.xsd.covad.com/vendororder}Client" minOccurs="0"/>
| * <element name="lineItem" type="{http://smo.xsd.covad.com/vendororder}LineItem" maxOccurs="unbounded" minOccurs="0"/>
| * </sequence>
| * </restriction>
| * </complexContent>
| * </complexType>
| * </pre>
| *
| *
| */
| @XmlAccessorType(AccessType.FIELD)
| @XmlType(name = "VendorOrder", propOrder = {
| "orderID",
| "vendorID",
| "vendorOrderID",
| "orderReceivedDate",
| "contractAcceptedFlag",
| "contractAcceptedDate",
| "productLanguageCode",
| "client",
| "lineItem"
| })
| public class VendorOrder {
|
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder", type = Integer.class)
| protected int orderID;
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder", type = Integer.class)
| protected int vendorID;
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder")
| protected String vendorOrderID;
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder")
| protected XMLGregorianCalendar orderReceivedDate;
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder")
| protected Boolean contractAcceptedFlag;
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder")
| protected XMLGregorianCalendar contractAcceptedDate;
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder")
| protected String productLanguageCode;
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder")
| protected Client client;
| @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder")
| protected List<LineItem> lineItem;
|
| /**
| * Gets the value of the orderID property.
| *
| */
| public int getOrderID() {
| return orderID;
| }
|
| /**
| * Sets the value of the orderID property.
| *
| */
| public void setOrderID(int value) {
| this.orderID = value;
| }
|
| /**
| * Gets the value of the vendorID property.
| *
| */
| public int getVendorID() {
| return vendorID;
| }
|
| /**
| * Sets the value of the vendorID property.
| *
| */
| public void setVendorID(int value) {
| this.vendorID = value;
| }
|
| /**
| * Gets the value of the vendorOrderID property.
| *
| * @return
| * possible object is
| * {@link String }
| *
| */
| public String getVendorOrderID() {
| return vendorOrderID;
| }
|
| /**
| * Sets the value of the vendorOrderID property.
| *
| * @param value
| * allowed object is
| * {@link String }
| *
| */
| public void setVendorOrderID(String value) {
| this.vendorOrderID = value;
| }
|
| /**
| * Gets the value of the orderReceivedDate property.
| *
| * @return
| * possible object is
| * {@link XMLGregorianCalendar }
| *
| */
| public XMLGregorianCalendar getOrderReceivedDate() {
| return orderReceivedDate;
| }
|
| /**
| * Sets the value of the orderReceivedDate property.
| *
| * @param value
| * allowed object is
| * {@link XMLGregorianCalendar }
| *
| */
| public void setOrderReceivedDate(XMLGregorianCalendar value) {
| this.orderReceivedDate = value;
| }
|
| /**
| * Gets the value of the contractAcceptedFlag property.
| *
| * @return
| * possible object is
| * {@link Boolean }
| *
| */
| public Boolean isContractAcceptedFlag() {
| return contractAcceptedFlag;
| }
|
| /**
| * Sets the value of the contractAcceptedFlag property.
| *
| * @param value
| * allowed object is
| * {@link Boolean }
| *
| */
| public void setContractAcceptedFlag(Boolean value) {
| this.contractAcceptedFlag = value;
| }
|
| /**
| * Gets the value of the contractAcceptedDate property.
| *
| * @return
| * possible object is
| * {@link XMLGregorianCalendar }
| *
| */
| public XMLGregorianCalendar getContractAcceptedDate() {
| return contractAcceptedDate;
| }
|
| /**
| * Sets the value of the contractAcceptedDate property.
| *
| * @param value
| * allowed object is
| * {@link XMLGregorianCalendar }
| *
| */
| public void setContractAcceptedDate(XMLGregorianCalendar value) {
| this.contractAcceptedDate = value;
| }
|
| /**
| * Gets the value of the productLanguageCode property.
| *
| * @return
| * possible object is
| * {@link String }
| *
| */
| public String getProductLanguageCode() {
| return productLanguageCode;
| }
|
| /**
| * Sets the value of the productLanguageCode property.
| *
| * @param value
| * allowed object is
| * {@link String }
| *
| */
| public void setProductLanguageCode(String value) {
| this.productLanguageCode = value;
| }
|
| /**
| * Gets the value of the client property.
| *
| * @return
| * possible object is
| * {@link Client }
| *
| */
| public Client getClient() {
| return client;
| }
|
| /**
| * Sets the value of the client property.
| *
| * @param value
| * allowed object is
| * {@link Client }
| *
| */
| public void setClient(Client value) {
| this.client = value;
| }
|
| /**
| * Gets the value of the lineItem property.
| *
| * <p>
| * This accessor method returns a reference to the live list,
| * not a snapshot. Therefore any modification you make to the
| * returned list will be present inside the JAXB object.
| * This is why there is not a <CODE>set</CODE> method for the lineItem property.
| *
| * <p>
| * For example, to add a new item, do as follows:
| * <pre>
| * getLineItem().add(newItem);
| * </pre>
| *
| *
| * <p>
| * Objects of the following type(s) are allowed in the list
| * {@link LineItem }
| *
| *
| */
| public List<LineItem> getLineItem() {
| if (lineItem == null) {
| lineItem = new ArrayList<LineItem>();
| }
| return this.lineItem;
| }
|
| }
|
Please suggest on this.
Thanks in Advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099124#4099124
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099124
18Â years, 6Â months
[Clustering/JBoss] - Re: Controlling cluster services
by krithi
Please give me an opportunity to redefine my questions more clearly
My question is
1. Is it not true that, the singleton service (MyClusterService) will be started in the current master node only?
2. Do I need to use if ( isMasterNode() ) check, to avoid the starting the Singleton service in the current slave node? (My worry is, Is this the right way to control the service)
3. Is there any configuration available to control my singleton services from getting started only in the current master node
Am I missing any of them
MyClusterService.java
| public class MyClusterService extends HAServiceMBeanSupport {
| private boolean isMasterNode = false;
| protected void startService() throws Exception {
| if (isMasterNode()) {
| log.info("MyClusterService Started Successfully");
| //Send JMS messages to indicate Service Started
| }else {
| log.info("MyClusterService - Waiting to acquire Master Status");
| }
| }
| protected void stopService() {
| log.info("Stopping MyClusterService - If Slave is waiting it will become master ");
| }
| public boolean isMasterNode() {
| return isMasterNode;
| }
| public void startSingleton() {
| isMasterNode = true;
| if (isMasterNode) {
| startService();
| }
| }
| public void stopSingleton() {
| stopService();
| isMasterNode=false;
| }
| }
|
jboss-service.xml
| <mbean code="org.jboss.ha.singleton.HASingletonController"
| name="my.com:service=MyService-HASingletonController">
|
| <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
| <depends>my.com:service=MyClusterService</depends>
| <attribute
| name="PartitionName">${jboss.partition.name:DefaultPartition}</attribute>
| <attribute
| name="TargetName">my.com:service=MyClusterService</attribute>
| <attribute name="TargetStartMethod">startSingleton</attribute>
| <attribute name="TargetStopMethod">stopSingleton</attribute>
| <!-- <attribute name="TargetStopMethodArgument">true</attribute> -->
| </mbean>
| <mbean code="com.my.cluster.MyClusterService"
| name="my.com:service=MyClusterService">
| <depends>my.com:service=OtherServices</depends>
| </mbean>
|
Thanks
Krithi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099118#4099118
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099118
18Â years, 6Â months