- Home
- DevShare
- Forums
- Wiki
- Products & Services
- Downloads
- Documentation
- Webinars
- Store
- Blog
|
|||
|
Hi,
I have a really great Problem. I have written a php class which is the Webservice. The Class generates a LIST of Projects (which is another Class in php). One Project has: Id (integer), Shortname (string), Longname (string), Startdate, Enddate, Status, Description. This is the View I get in Table Mapping with the php Webservice (and ZEND WSDL Generator generated WSDL (zend eclipse 6.1)) Bilder-Hoster.net This is the View I need to get in my Table Mapping ( i used a vb.net Webservice example to test it) Bilder-Hoster.net Its a List of Projects, so PROJECT is the repeating element, and so PROJECT is the element I have to specify with XPATH in Table Mapping. Unfortunately in PHP I don`t see the Project Element, and so I can`t use it as Table Mapping which means that I canīt consume a Webservice with BIRT that produces Lists of Items. I donīt think this could be correct. Here my WSDL: <?xml version='1.0' encoding='UTF-8'?> <!-- WSDL file generated by Zend Studio. --> <definitions name="WS" targetNamespace="urn:WS" xmlns:typens="urn:WS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:WS"> <xsd:complexType name="Project"> <xsd:all> <xsd:element name="Description" type="xsd:string"/> <xsd:element name="Enddate" type="xsd:string"/> <xsd:element name="Id" type="xsd:integer"/> <xsd:element name="Longname" type="xsd:string"/> <xsd:element name="Shortname" type="xsd:string"/> <xsd:element name="Startdate" type="xsd:string"/> <xsd:element name="Status" type="xsd:string"/> </xsd:all> </xsd:complexType> <xsd:complexType name="ProjectArray"> <xsd:complexContent> <xsd:restriction base="soapenc:Array"> <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:Project[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> </xsd:schema> </types> <message name="GetProject"> <part name="Id" type="xsd:integer"/> <part name="datum" type="xsd:string"/> <part name="name" type="xsd:string"/> </message> <message name="GetProjectResponse"> <part name="GetProjectReturn" type="typens:Project"/> </message> <message name="GetProjects"> <part name="Id1" type="xsd:integer"/> <part name="datum1" type="xsd:string"/> <part name="name1" type="xsd:string"/> </message> <message name="GetProjectsResponse"> <part name="GetProjectsReturn" type="typens:ProjectArray"/> </message> <portType name="WSPortType"> <operation name="GetProject"> <documentation> Enter description here... </documentation> <input message="typens:GetProject"/> <output message="typens:GetProjectResponse"/> </operation> <operation name="GetProjects"> <documentation> Enter description here... </documentation> <input message="typens:GetProjects"/> <output message="typens:GetProjectsResponse"/> </operation> </portType> <binding name="WSBinding" type="typens:WSPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetProject"> <soap peration soapAction="urn:WSAction"/><input> <soap:body namespace="urn:WS" use="literal"/> </input> <output> <soap:body namespace="urn:WS" use="literal"/> </output> </operation> <operation name="GetProjects"> <soap peration soapAction="urn:WSAction"/><input> <soap:body namespace="urn:WS" use="literal"/> </input> <output> <soap:body namespace="urn:WS" use="literal"/> </output> </operation> </binding> <service name="WSService"> <port name="WSPort" binding="typens:WSBinding"> <soap:address location="http://localhost/ppc/soap_server.php"/> </port> </service> </definitions> PHP Server: <?php ini_set("soap.wsdl_cache","0"); ini_set("soap.wsdl_cache_enabled","0"); class WS { /** * Enter description here... * * @param int $Id * @param string $datum * @param string $name * @return Project */ function GetProject($Id,$datum,$name) { $Return = new Project(); $Return->Id = $Id; $Return->Shortname = $Return->Longname = $Return->Description = $Return->Status = $name; $Return->Startdate = $Return->Enddate = $datum; return $Return; } /** * Enter description here... * * @param int $Id * @param string $datum * @param string $name * @return Project[] */ function GetProjects($Id,$datum,$name) $Return = array(); $P1 = new Project(); $P1->Id = 1; $P1->Description = $P1->Longname = $P1->Shortname = $P1->Status = $name."1"; $P1->Startdate = $P1->Enddate = $datum; $Return[] = $P1; $P2 = new Project(); $P2->Id = 2; $P2->Description = $P2->Longname = $P2->Shortname = $P2->Status = $name."2"; $P2->Startdate = $P2->Enddate = $datum; $Return[] = $P2; $P3 = new Project(); $P3->Id = 3; $P3->Description = $P3->Longname = $P3->Shortname = $P3->Status = $name."3"; $P3->Startdate = $P3->Enddate = $datum; $Return[] = $P3; $P4 = new Project(); $P4->Id = 4; $P4->Description = $P4->Longname = $P4->Shortname = $P4->Status = $name."4"; $P4->Startdate = $P4->Enddate = $datum; $Return[] = $P4; $P5->Id = 5; $P5->Description = $P5->Longname = $P5->Shortname = $P5->Status = $name."5"; $P5->Startdate = $P5->Enddate = $datum; $Return[] = $P5; return $Return; } } $wsdl = "./WS.wsdl"; $server = new SoapServer($wsdl, array('trace' => 1)); $server->setClass("WS"); $server->handle(); class Project { /** * @var int */ public $Id; /** * @var string */ public $Shortname; /** * @var string */ public $Longname; /** * @var string */ public $Status; /** * @var string */ public $Description; /** * @var string */ public $Startdate; /** * @var string */ public $Enddate; } ?> SOAP RESPONSE PACKET (got by wireshark): <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:WS"> <SOAP-ENV:Body> <GetProjectsReturn> <ns1:Project> <Description>name1</Description> <Enddate>datum1</Enddate> <Id>1</Id> <Longname>name1</Longname> <Shortname>name1</Shortname> <Startdate>datum1</Startdate> <Status>name1</Status> </ns1:Project> <ns1:Project> <Description>name1</Description> <Enddate>datum1</Enddate> <Id>2</Id> <Longname>name1</Longname> <Shortname>name1</Shortname> <Startdate>datum1</Startdate> <Status>name1</Status> </ns1:Project> <ns1:Project> <Description>name1</Description> <Enddate>datum1</Enddate> <Id>3</Id> <Longname>name1</Longname> <Shortname>name1</Shortname> <Startdate>datum1</Startdate> <Status>name1</Status> </ns1:Project> <ns1:Project> <Description>name1</Description> <Enddate>datum1</Enddate> <Id>4</Id> <Longname>name1</Longname> <Shortname>name1</Shortname> <Startdate>datum1</Startdate> <Status>name1</Status> </ns1:Project> <ns1:Project> <Description>name1</Description> <Enddate>datum1</Enddate> <Id>5</Id> <Longname>name1</Longname> <Shortname>name1</Shortname> <Startdate>datum1</Startdate> <Status>name1</Status> </ns1:Project> </GetProjectsReturn> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Can someone help me? |
|
|||
|
first of all i hav a question : did you resolve your problem? caus' i hav the same. in my wsdl is composed of <message> elements, so complex type , both parameters and returnstypes.
BIRT dont recognize them as type and i dont know how to handle it. maybe i hav to add a xsd to BIRT or something like that.... do you hav an idea? thanks for help |
![]() |
| Thread Tools | |
| Display Modes | |
|
|