Hi,
Firstly i'm newbie programmer with little experience, so please help me if u
can.
I have found an example on how to create java classes from WSDL under maven:
(...)(...)
I've created the below java class and I create new object of this class:
UploadChunk up = new UploadChunk()
and up.setSomething(123) etc....
I have some service for which I have to prepare soap request manually -
suitable for my service requests.
I'm doing it using dom4j to create xml documents and i rewrite values to it
from my variable up.
I wonder if it is possible to do it automatically - I have UploadChunk
object and I want do use xFire library somehow to produce ready or almost
ready soap request. I want to do it in my code, no some ant or maven task.
So I propably need a couple line of code, when I have:
up.setSomething(123);
//////CONVERTION - CAN U TELL ME HOW TO DO THAT PLEASE? I haven't found the
way :( it seems I need your help.
//////Document result =....
callService(result,namespace,qname);
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
*
Java class for UploadChunk complex type.
*
*
The following schema fragment specifies the expected content contained
within this class.
*
*
* <complexType name="UploadChunk">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SessionID"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="InputFileName"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Buffer"
type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
* <element name="Offset"
type="{http://www.w3.org/2001/XMLSchema}long"/>
* <element name="BytesRead"
type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UploadChunk", propOrder = {
"sessionID",
"inputFileName",
"buffer",
"offset",
"bytesRead"
})
public class UploadChunk {
@XmlElement(name = "SessionID")
protected String sessionID;
@XmlElement(name = "InputFileName")
protected String inputFileName;
@XmlElement(name = "Buffer")
protected byte[] buffer;
@XmlElement(name = "Offset")
protected long offset;
@XmlElement(name = "BytesRead")
protected int bytesRead;
/**
* Gets the value of the sessionID property.
*
* @return
* possible object is
* [EMAIL PROTECTED] String }
*
*/
public String getSessionID() {
return sessionID;
}
/**
* Sets the value of the sessionID property.
*
* @param value
* allowed object is
* [EMAIL PROTECTED] String }
*
*/
public void setSessionID(String value) {
this.sessionID = value;
}
/**
* Gets the value of the inputFileName property.
*
* @return
* possible object is
* [EMAIL PROTECTED] String }
*
*/
public String getInputFileName() {
return inputFileName;
}
/**
* Sets the value of the inputFileName property.
*
* @param value
* allowed object is
* [EMAIL PROTECTED] String }
*
*/
public void setInputFileName(String value) {
this.inputFileName = value;
}
/**
* Gets the value of the buffer property.
*
* @return
* possible object is
* byte[]
*/
public byte[] getBuffer() {
return buffer;
}
/**
* Sets the value of the buffer property.
*
* @param value
* allowed object is
* byte[]
*/
public void setBuffer(byte[] value) {
this.buffer = ((byte[]) value);
}
/**
* Gets the value of the offset property.
*
*/
public long getOffset() {
return offset;
}
/**
* Sets the value of the offset property.
*
*/
public void setOffset(long value) {
this.offset = value;
}
/**
* Gets the value of the bytesRead property.
*
*/
public int getBytesRead() {
return bytesRead;
}
/**
* Sets the value of the bytesRead property.
*
*/
public void setBytesRead(int value) {
this.bytesRead = value;
}
}
--
View this message in context:
http://www.nabble.com/Transforming-XFIRE-tagged-class-to-XML-%28soap-request%29-tf2904198.html#a8113700
Sent from the XFire - User mailing list archive at Nabble.com.