You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Steven De Groote <St...@sofico.be> on 2010/05/26 17:07:39 UTC
Cannot see logic in WSDL2Java generated with ADB
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>
Steven De Groote
Web & Business Intelligence Solutions
Sofico NV
Technologiepark 1, B-9052 Zwijnaarde (Belgium)
Tel +32 (0) 9 210 80 40 - Fax +32 (0) 9 210 80 41
Web www.sofico.be - Email steven.degroote@sofico.be
The information in this email is intended only for the addressee(s) named
above. Access to this email by anyone else is unauthorised. If you are not
the intended recipient of this message any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may
be unlawful. Email transmission cannot be guaranteed to be secure or error
free as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. Sofico does not accept
liability for any losses resulting from infected email transmissions.
Please note that any views expressed in this email may be those of the
originator and do not necessarily reflect those of this organisation.
Re: Cannot see logic in WSDL2Java generated with ADB
Posted by Steven De Groote <St...@sofico.be>.
Hi,
thanks for all the help.
I finally managed to find the problem and (slightly) modified the WSDL
file.
I now have this binding:
<wsdl:binding name="intfwsLBClientEndpoint0Binding" type=
"tns:portType">
<soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="LBClientOp">
<soap:operation soapAction="/Processes/LBClientOp"/>
<wsdl:input>
<soap:body use="encoded" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" namespace="
http://Input.LBGetMntcHistory.remarketing.x.com" parts="parameters"/>
</wsdl:input>
<wsdl:output>
<soap:body use="encoded" encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" namespace="
http://Output.LBGetMntcHistory.remarketing.x.com" parts="parameters"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
Previously, the soap:operation element also had an attribute style="rpc",
which I started to find strange since soap:binding specifies "document".
After removing that, I get the datamodel I expected to see, and the WS is
functioning properly.
Thanks,
Steven
From:
Leif Rilbe <le...@leifrilbe.com>
To:
java-user@axis.apache.org
Date:
27/05/2010 12:29
Subject:
Re: Cannot see logic in WSDL2Java generated with ADB
Hi Steven,
Are you sure that RPC/literal binding is correct for your service?
I think the document/literal wrapped binding is the most WS-I compliant
variant. Seems you received the wsdl from someone else? Maybe ask if the
specified binding is correct? For a document style binding you can keep
the element attribute in the message part.
To summarize: maybe change the binding instead of the message part spec?
Kind regards,
/Leif
Steven De Groote wrote:
> 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 <an...@gmail.com>
> To: java-user@axis.apache.org
> 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
> <St...@sofico.be> 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
> <http://master.lbgetmntchistory.remarketing.x.com/>"
> > xmlns:ns0="http://Input.LBGetMntcHistory.remarketing.x.com
> <http://input.lbgetmntchistory.remarketing.x.com/>"
> > xmlns:ns1="http://Output.LBGetMntcHistory.remarketing.x.com
> <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
> <http://master.lbgetmntchistory.remarketing.x.com/>">
> > <wsdl:types>
> > <xsd:schema xmlns =
> > "http://Input.LBGetMntcHistory.remarketing.x.com
> <http://input.lbgetmntchistory.remarketing.x.com/>"
> > targetNamespace =
> > "http://Input.LBGetMntcHistory.remarketing.x.com
> <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
> <http://output.lbgetmntchistory.remarketing.x.com/>"
> > targetNamespace =
> > "http://Output.LBGetMntcHistory.remarketing.x.com
> <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
> <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
> <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: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: Cannot see logic in WSDL2Java generated with ADB
Posted by Leif Rilbe <le...@leifrilbe.com>.
Hi Steven,
Are you sure that RPC/literal binding is correct for your service?
I think the document/literal wrapped binding is the most WS-I compliant
variant. Seems you received the wsdl from someone else? Maybe ask if the
specified binding is correct? For a document style binding you can keep
the element attribute in the message part.
To summarize: maybe change the binding instead of the message part spec?
Kind regards,
/Leif
Steven De Groote wrote:
> 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 <an...@gmail.com>
> To: java-user@axis.apache.org
> 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
> <St...@sofico.be> 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
> <http://master.lbgetmntchistory.remarketing.x.com/>"
> > xmlns:ns0="http://Input.LBGetMntcHistory.remarketing.x.com
> <http://input.lbgetmntchistory.remarketing.x.com/>"
> > xmlns:ns1="http://Output.LBGetMntcHistory.remarketing.x.com
> <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
> <http://master.lbgetmntchistory.remarketing.x.com/>">
> > <wsdl:types>
> > <xsd:schema xmlns =
> > "http://Input.LBGetMntcHistory.remarketing.x.com
> <http://input.lbgetmntchistory.remarketing.x.com/>"
> > targetNamespace =
> > "http://Input.LBGetMntcHistory.remarketing.x.com
> <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
> <http://output.lbgetmntchistory.remarketing.x.com/>"
> > targetNamespace =
> > "http://Output.LBGetMntcHistory.remarketing.x.com
> <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
> <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
> <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: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: Cannot see logic in WSDL2Java generated with ADB
Posted by Steven De Groote <St...@sofico.be>.
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 <an...@gmail.com>
To:
java-user@axis.apache.org
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
<St...@sofico.be> 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: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: Cannot see logic in WSDL2Java generated with ADB
Posted by Andreas Veithen <an...@gmail.com>.
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
<St...@sofico.be> 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>
>
> Steven De Groote
> Web & Business Intelligence Solutions
> Sofico NV
> Technologiepark 1, B-9052 Zwijnaarde (Belgium)
> Tel +32 (0) 9 210 80 40 - Fax +32 (0) 9 210 80 41
> Web www.sofico.be - Email steven.degroote@sofico.be
>
> The information in this email is intended only for the addressee(s) named
> above. Access to this email by anyone else is unauthorised. If you are not
> the intended recipient of this message any disclosure, copying, distribution
> or any action taken in reliance on it is prohibited and may be unlawful.
> Email transmission cannot be guaranteed to be secure or error free as
> information could be intercepted, corrupted, lost, destroyed, arrive late or
> incomplete, or contain viruses. Sofico does not accept liability for any
> losses resulting from infected email transmissions. Please note that any
> views expressed in this email may be those of the originator and do not
> necessarily reflect those of this organisation.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org