Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Problem with namespace on web service parameters
Problem with namespace on web service parameters [message #882490] Wed, 06 June 2012 11:01 Go to next message
Paul Ramsden is currently offline Paul Ramsden
Messages: 79
Registered: February 2011
Location: BW, Germany
Member
As mentioned in my previous thread I am using BIRT to fetch data from a web service I provide on a websphere app server.

I configured BIRT to call the service and set default values for the method parameters but all the values arrive as nulls and no data is returned.

On investigation I saw that the parameters all have namespace qualifiers like this:

<SOAP-ENV:Envelope
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Body>
		<m:StaffAttending xmlns:m="http://www.avms.firm.com/ReportService/">
			<m:username xsi:type="xsd:string">paul_ramsden@firm.com</m:username>
			<m:language xsi:type="xsd:string">en</m:language>
			<m:mmsFairId xsi:type="xsd:int">22</m:mmsFairId>
			<m:where xsi:type="xsd:string"></m:where>
			<m:sort xsi:type="xsd:string"></m:sort>
		</m:StaffAttending>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


I then used SoapUI to test the web service. I used exactly the same wsdl file to configure the service and noted that the request sent to the service did not use namespaces on the parameters. The service returned data.

So I then took the request generated by BIRT and pasted it into SoapUI and it failed. I removed the namespaces from the parameters, tried again and it succeeded. Using the request below the first parameter arrives as null and the rest are ok.

<SOAP-ENV:Envelope
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Body>
		<m:StaffAttending xmlns:m="http://www.avms.firm.com/ReportService/">
			<m:username>paul_ramsden@firm.com</m:username>
			<language>en</language>
			<mmsFairId>22</mmsFairId>
		</m:StaffAttending>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Why does BIRT generate a different request to SoapUI (and also the websphere service explorer)? Is there anything I can do to influence the way BIRT generated requests or how websphere decodes requests?
Re: Problem with namespace on web service parameters [message #882598 is a reply to message #882490] Wed, 06 June 2012 16:12 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Paul,

I believe it picks the prefix up from the target namespace in your wsdl.

Jason

On 6/6/2012 11:01 AM, Paul Ramsden wrote:
> As mentioned in my previous thread I am using BIRT to fetch data from a
> web service I provide on a websphere app server.
>
> I configured BIRT to call the service and set default values for the
> method parameters but all the values arrive as nulls and no data is
> returned.
>
> On investigation I saw that the parameters all have namespace qualifiers
> like this:
>
> <SOAP-ENV:Envelope
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> <SOAP-ENV:Body>
> <m:StaffAttending xmlns:m="http://www.avms.firm.com/ReportService/">
> <m:username xsi:type="xsd:string">paul_ramsden@xxxxxxxx</m:username>
> <m:language xsi:type="xsd:string">en</m:language>
> <m:mmsFairId xsi:type="xsd:int">22</m:mmsFairId>
> <m:where xsi:type="xsd:string"></m:where>
> <m:sort xsi:type="xsd:string"></m:sort>
> </m:StaffAttending>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> I then used SoapUI to test the web service. I used exactly the same wsdl
> file to configure the service and noted that the request sent to the
> service did not use namespaces on the parameters. The service returned
> data.
>
> So I then took the request generated by BIRT and pasted it into SoapUI
> and it failed. I removed the namespaces from the parameters, tried again
> and it succeeded. Using the request below the first parameter arrives as
> null and the rest are ok.
>
>
> <SOAP-ENV:Envelope
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> <SOAP-ENV:Body>
> <m:StaffAttending xmlns:m="http://www.avms.firm.com/ReportService/">
> <m:username>paul_ramsden@xxxxxxxx</m:username>
> <language>en</language>
> <mmsFairId>22</mmsFairId>
> </m:StaffAttending>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> Why does BIRT generate a different request to SoapUI (and also the
> websphere service explorer)? Is there anything I can do to influence the
> way BIRT generated requests or how websphere decodes requests?
Previous Topic:Excel Report Error
Next Topic:Filtering crosstab data by dates
Goto Forum:
  


Current Time: Wed Jul 30 17:17:59 EDT 2014

Powered by FUDForum. Page generated in 0.01437 seconds