Hi,
interesting that you mention this.
In fact the original WSDL provided to me had this:
<wsdl:message name="MntcHistory">
<wsdl:part name="parameters" element="ns0:MntcHistory"/>
</wsdl:message>
<wsdl:message name="MaintenanceHistory">
<wsdl:part name="parameters" element="ns1:MaintenanceHistory"/>
</wsdl:message>
However this resulted in the following error:
org.apache.axis2.AxisFault: The binding operation LeaseBaseClientOp is
RPC/literal. The message parts for this operation must use the type
attribute as specificed by WS-I Basic Profile specification (4.4.1).
Message part, parameters, violatesthis rule. Please remove the element
attribute and use the type attribute.
Hence I changed it to what is below, giving me a valid WSDL, but with the
aforementioned strange object model.
Is there another way to adapt the WSDL to make it valid?
Any ideas?
Thanks,
Steven
From:
Andreas Veithen <[email protected]>
To:
[email protected]
Date:
26/05/2010 17:42
Subject:
Re: Cannot see logic in WSDL2Java generated with ADB
Could be because the WSDL defines the message as follows:
<wsdl:part name="parameters" type="ns1:MaintenanceHistory"/>
But MaintenanceHistory is not a type; it's an element.
Andreas
On Wed, May 26, 2010 at 17:07, Steven De Groote
<[email protected]> wrote:
> Hi all,
>
> I'm struggling to find out how to use the generated code by axis2.
> I have a wsdl file (see below) from where I generated the server code.
>
> Everything fine so far, but I am struggling a bit with a particular
part.
> Basically, this WS should return one item of MaintenanceHistory.
>
> LBClientOpResponse response = new LBClientOpResponse();
> MaintenanceHistory mh = new MaintenanceHistory();
>
> So I thought: response.setMaintenanceHistory(mh), but it appears that
> response only has setParameters(OMElement).
> I'm wondering why that is, and what I need to do to get my
> MaintenanceHistory into the response.
>
> I hope it's clear enough to help me out.
> It would be greatly appreciated!
>
> Thanks,
> Steven
>
>
>
>
> The wsdl looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
> xmlns:tns="http://Master.LBGetMntcHistory.Remarketing.x.com"
> xmlns:ns0="http://Input.LBGetMntcHistory.remarketing.x.com"
> xmlns:ns1="http://Output.LBGetMntcHistory.remarketing.x.com"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="LBMntcHistory"
> targetNamespace="http://Master.LBGetMntcHistory.Remarketing.x.com">
> <wsdl:types>
> <xsd:schema xmlns =
> "http://Input.LBGetMntcHistory.remarketing.x.com"
> targetNamespace =
> "http://Input.LBGetMntcHistory.remarketing.x.com"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="unqualified"
> attributeFormDefault="unqualified">
> <xsd:element name="FleetID" type="xsd:string"/>
> <xsd:element name="CountryID" type="xsd:string"/>
> <xsd:element name="RegID" type="xsd:string"/>
> <xsd:element name="CompanyID" type="xsd:string"/>
> <xsd:element name="ChassisID" type="xsd:string"/>
> <xsd:element name="FleetDetails">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="FleetID"/>
> <xsd:element ref="CountryID"/>
> <xsd:element ref="RegID"
> minOccurs="0"/>
> <xsd:element ref="CompanyID"
> minOccurs="0"/>
> <xsd:element ref="ChassisID"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="MntcHistory">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element
ref="FleetDetails"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> <xsd:schema xmlns =
> "http://Output.LBGetMntcHistory.remarketing.x.com"
> targetNamespace =
> "http://Output.LBGetMntcHistory.remarketing.x.com"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified">
> <xsd:element name="Date" type="xsd:string"/>
> <xsd:element name="Mileage" type="xsd:string"/>
> <xsd:element name="StatusCD" type="xsd:string"/>
> <xsd:element name="Operation" type="xsd:string"/>
> <xsd:element name="Details">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="Detail"
> maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="FleetID" type="xsd:string"/>
> <xsd:element name="RegID" type="xsd:string"/>
> <xsd:element name="MaintenanceHistory">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="FleetID"/>
> <xsd:element ref="RegID"/>
> <xsd:element
ref="LstUpdateDate"/>
> <xsd:element
ref="MntcWorkHistory"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="LstUpdateDate" type="xsd:string"/>
> <xsd:element name="MntcWorkHistory">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="MntcWork"
> maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="MntcWork">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="Date"/>
> <xsd:element ref="Mileage"/>
> <xsd:element ref="StatusCD"/>
> <xsd:element ref="LineItems"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="LineItems">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="LineItem"
> maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="LineItem">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="Operation"/>
> <xsd:element ref="Details"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="Detail" type="xsd:string"/>
> </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="MntcHistory">
> <wsdl:part name="parameters" type="ns0:MntcHistory"/>
> </wsdl:message>
> <wsdl:message name="MaintenanceHistory">
> <wsdl:part name="parameters" type="ns1:MaintenanceHistory"/>
> </wsdl:message>
> <wsdl:portType name="portType">
> <wsdl:operation name="LBClientOp">
> <wsdl:input message="tns:MntcHistory"/>
> <wsdl:output message="tns:MaintenanceHistory"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="intfwsLBClientEndpoint0Binding"
type="tns:portType">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="LBClientOp">
> <soap:operation style="rpc"
soapAction="/Processes/LBClientOp"/>
> <wsdl:input>
> <soap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://Input.LBGetMntcHistory.remarketing.x.com"/>
> </wsdl:input>
> <wsdl:output>
> <soap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://Output.LBGetMntcHistory.remarketing.x.com"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="intfLBClient-service">
> <wsdl:port name="intfwsLBClientEndpoint0"
> binding="tns:intfwsLBClientEndpoint0Binding">
> <soap:address
> location="http://localhost:8080/Processes/intfwsLBClientEndpoint0"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]