Home
Analytics
BIRT 2.3 WS problem
Miro
Hello. <br />
<br />
I have a problem making a web service(WS) dataset in BIRT 2.3.<br />
I just can't see the structure of the object which I'm trying to send across the WS. Everything worked correctly in BIRT 2.2 . <br />
<br />
I think the best explanation of my problem will be to show you some screenshots. Please see the attachment.<br />
<br />
The object which I'm trying to send:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public class PersonDAO {
private String firstname;
private String surname;
public PersonDAO(String firstfirstname, String surname){
this.firstname = firstfirstname;
this.surname = surname;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
}
</pre>
<br />
The WSDL generated by Axis:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://test.birt.fes.softec.sk"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://test.birt.fes.softec.sk"
xmlns:intf="http://test.birt.fes.softec.sk"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema
targetNamespace="http://test.birt.fes.softec.sk"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PersonDAO">
<sequence>
<element name="firstname" nillable="true" type="xsd:string"/>
<element name="surname" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<element name="getPersonReturn" type="impl:PersonDAO"/>
</schema></wsdl:types>
<wsdl:message name="getPersonResponse">
<wsdl:part element="impl:getPersonReturn" name="getPersonReturn"/>
</wsdl:message>
<wsdl:message name="getPersonRequest">
</wsdl:message>
<wsdl:portType name="TestPortType">
<wsdl:operation name="getPerson">
<wsdl:input message="impl:getPersonRequest" name="getPersonRequest"/>
<wsdl:output message="impl:getPersonResponse" name="getPersonResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestPortSoapBinding" type="impl:TestPortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getPerson">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getPersonRequest">
<wsdlsoap:body namespace="http://test.birt.fes.softec.sk" use="literal"/>
</wsdl:input>
<wsdl:output name="getPersonResponse">
<wsdlsoap:body namespace="http://test.birt.fes.softec.sk" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestService">
<wsdl:port binding="impl:TestPortSoapBinding" name="TestPort">
<wsdlsoap:address location="http://localhost:9080/crm_essp/epsoapadaptor/services/TestPort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</pre>
================================================<br />
<br />
What am I doing wrong?<br />
<br />
Miroslav B.<br />
<br />
Sorry for my bad english.
Find more posts tagged with
Comments
Tianli
In 2.2, WS Driver is trying to get the response by the sending SOAP Request directly. In 2.3 the response is getting from the WSDL file. becase the WSDL file defined the schema of the SOAP Response, so the driver will get the response structure first by WSDL. In 2.3 if the WSDL's response structure is not what the user wants, user can define a soap response schema by himself and specify it in WS Dataset and driver will get the response structure by this user defined schema.
Miro
Thank you for the response.
Yes it really works if I specify the response as an xml schema. Its even possible to generate a response, save it to an xml file, on the SOAP response screen select the option "Use external sample data file" and use this xml file instead of the xml schema.
But both this solutions are very inconvenient, because every time the dataset changes I have to modify the schema, or generate a new sample response. And the second problem is, that if I use more datasets, I need to have more schemes or more sample responses.
I would really like to know what should I do to get the structure of the response only from the wsdl.
hhermos
Hi Miro i need your help... I'm creating a birt report using a webservice create with axis2, but didn´t work. Can you help me with some photos of the configurations of the data source and data set.
Sorry for my bad English
Regards.
hhermos
Miro
Hello hhermos,
could you please specify more precisely where is the problem? When you create the data source and try to ping it, do you get a response?
My order of creating data source:
1. Write the needed java classes
2. Generate the wsdl
3. Save the wsdl on disk.
4. In Birt -> create a new Web services data source, insert the correct path into the WSDL Descriptor field, insert the correct link into the SOAP End point field.
After this, if your server is running, you should be able to ping it.
What version of Birt are you using?
Regards,
Miro
jonwill
Hi,
i have the same problem or similary. I have a Webservice as datasource which offer me a list of functions i can invoque to full my dataset. But the result of one Function is a Array of String. For another its a List of Many kinds of objects...
how can i do to parse my result and to get it right in a dataset..??
Thank for your help
john