Hello,
First of all we are new to using web services.
We are trying to use a client's set of web services for a project.
We are a java/linux house and they are a MS house.
We installed axis 1.0 and ran WSDL2Java to generate the interface stubs.
The WSDL has elements of complexTypes within complexTypes as shown:
<s:element name="set_request">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Request">
<s:complexType>
<s:sequence>
<s:any
namespace="http://www.mysite.com/set_request.xsd" />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="sError"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
When we run WSDL2Java it produces the stubs and two beans:
Request.java
Set_Request.java
The Request.java contains a getter/setter for an array of MessageElement
as shown:
public org.apache.axis.message.MessageElement [] get_any() {
return _any;
}
public void set_any(org.apache.axis.message.MessageElement [] _any) {
this._any = _any;
}
This produces several questions:
1. Why doesn't Request contain any getter/setter methods for Set_Request?
2. Is this due to the complexType being define in a remote schema (.xsd)?
3. Is there any interops with doing this?
4. If this is how WSDL2Java produces the stubs, is this the correct way
of getting
Set_Request into Request (see example)
Example:
Set_Request sreq = new Set_Request();
// set bean data
sreq.setVersion("1.0.0");
Request req = new Request();
MessageElement element = new MessageElement();
QName qname = new QName("http://www.mysite.com/",
"set_request");
element.setName("set_request");
element.setObjectValue(sreq);
element.setType(qname);
req.set_any(new MessageElement[]{element});
TIA
--
Tony Keith
