Hi Fazle,
Since the request has no input, how about change your wsdl a bit to make
it compatible with doc/liter/wrapped so that the generated method
timeSalesAllInstruments() has no input parameter.
I will change your wsdl inline
Regards
Freeman
Fazle Khan wrote:
I am trying to use cxf to make a soap request that has no attributes or
elements and it seems to be generating invalid xml. I assume I'm using the
api wrong.
Here is part of the wsdl, notice the request has no attributes or elements
<!--xs:element name="TimeSalesAllInstrumentsRequest"/-->
<xs:element name="TimeSalesAllInstruments"/>
<xs:element name="TimeSalesAllInstrumentsResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="numberInstruments"
type="xs:unsignedLong"/>
<xs:element maxOccurs="unbounded" minOccurs="0"
name="instrument" type="ci:TimeSalesType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="TimeSalesType">
<xs:sequence>
<xs:element name="instrumentId" type="xs:unsignedLong"/>
<xs:element name="bid" nillable="true" type="xs:decimal"/>
<xs:element name="ask" nillable="true" type="xs:decimal"/>
<xs:element name="mostRecentExecutionPrice" nillable="true"
type="xs:decimal"/>
<xs:element name="code" nillable="true" type="xs:string"/>
<xs:element name="longName" nillable="true" type="xs:string"/>
<xs:element name="shortName" nillable="true" type="xs:string"/>
<xs:element name="volumeTraded" nillable="true"
type="xs:decimal"/>
<xs:element name="openInterest" nillable="true"
type="xs:decimal"/>
<xs:element name="imageURL" nillable="true" type="xs:string"/>
<xs:element name="twentyFourHourChangeInPrice" nillable="true"
type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
<wsdl:message name="TimeSalesAllInstrumentsResponse">
<wsdl:part element="schema:TimeSalesAllInstrumentsResponse"
name="TimeSalesAllInstrumentsResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="TimeSalesAllInstrumentsRequest">
<wsdl:part element="schema:TimeSalesAllInstruments"
name="TimeSalesAllInstrumentsRequest">
</wsdl:part>
</wsdl:message>
Here is the jaxB interface generated by cxfWSDLToJava, since the request as
no attributes no request class was generated
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebResult(targetNamespace = "http://cithaeron.com/schemas", partName =
"TimeSalesAllInstrumentsResponse", name = "TimeSalesAllInstrumentsResponse")
@WebMethod(operationName = "TimeSalesAllInstruments")
public com.cithaeron.backoffice.api.TimeSalesAllInstrumentsResponse
timeSalesAllInstruments(
@WebParam(targetNamespace = "http://cithaeron.com/schemas", partName
= "TimeSalesAllInstrumentsRequest", name = "TimeSalesAllInstrumentsRequest")
java.lang.Object timeSalesAllInstrumentsRequest
);
TimeSalesAllInstrumentsResponse response =
client.timeSalesAllInstruments(null);
I assume I should not be passing null into the method, but what should I
pass?
-fazle