Does anyone know how to ensure a WebService/WebMethod needs to be serialized
to ensure is compatible with Reporting Services' new XML Data Source when
passing parameters to the report. I have had success on using the Report
Server WebService
http://localhost/reportserver/reportservice2005.asmx
and using the Query designer to pass the SoapAction call
<Query><SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren</SoapAction></Query>
and associating the data set parameters to the Designer GUI parameters
(which I may say is not documented well on BoL)
http://www.enGaugedTraining.com/Parameters.gif
But when using ANY OTHER WEB SERVICE that needs parameters, the parameteres
are not passed correctly to the WebMehtod, so I am thiking they are comming
in the header or as an array instead of an actual item within the SOAP
message... To bad we can't do this in the Query Designer... it is actually
SAD this was nto thought out as to be compatible with regular SOAP calls...
too bad. Ideally we would use query like the one below, and replace the fixed
values with a parameter as defined in the designer (i.e. /Reports = @.ItemParam & False as @.RecursiveParam )... maybe in Orca this can be done
right! either thru SOAP
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ListChildren
xmlns="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">
<Item>/</Item>
<Recursive>false</Recursive>
</ListChildren>
</soap:Body>
</soap:Envelope>
Or through whatever "standard' the <Query/> definition is made of!
<Query
<SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren
</SoapAction>
<Parameter>
<Name>Item</Name>
<Value>/Reports</Value>
</Parameter>
<Parameter>
<Name>Recursive</Name>
<Value>False</Value>
</Parameter>
</Query>I reported this issue in the early beta lifecycle but it seemed that it
wasn't fixed. I've tried a similar scenario recently with RTM and indeed,
the parameters are not passed. Strangely, if you trace the call, you will
see that the parameters are serialized as a part of the SOAP request but for
some reason they are dropped by the ASP.NET Web service runtime. I couldn't
find a workaround and reported the issue again.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"J. C." <J. C.@.discussions.microsoft.com> wrote in message
news:53FF7A94-1EC0-4EF3-8E45-5391B08F2779@.microsoft.com...
> Does anyone know how to ensure a WebService/WebMethod needs to be
> serialized
> to ensure is compatible with Reporting Services' new XML Data Source when
> passing parameters to the report. I have had success on using the Report
> Server WebService
> http://localhost/reportserver/reportservice2005.asmx
> and using the Query designer to pass the SoapAction call
> <Query><SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren</SoapAction></Query>
> and associating the data set parameters to the Designer GUI parameters
> (which I may say is not documented well on BoL)
> http://www.enGaugedTraining.com/Parameters.gif
> But when using ANY OTHER WEB SERVICE that needs parameters, the
> parameteres
> are not passed correctly to the WebMehtod, so I am thiking they are
> comming
> in the header or as an array instead of an actual item within the SOAP
> message... To bad we can't do this in the Query Designer... it is
> actually
> SAD this was nto thought out as to be compatible with regular SOAP
> calls...
> too bad. Ideally we would use query like the one below, and replace the
> fixed
> values with a parameter as defined in the designer (i.e. /Reports => @.ItemParam & False as @.RecursiveParam )... maybe in Orca this can be done
> right! either thru SOAP
> <?xml version="1.0" encoding="utf-16"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="">http://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <ListChildren
> xmlns="">http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">
> <Item>/</Item>
> <Recursive>false</Recursive>
> </ListChildren>
> </soap:Body>
> </soap:Envelope>
> Or through whatever "standard' the <Query/> definition is made of!
> <Query>
> <SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren
> </SoapAction>
> <Parameter>
> <Name>Item</Name>
> <Value>/Reports</Value>
> </Parameter>
> <Parameter>
> <Name>Recursive</Name>
> <Value>False</Value>
> </Parameter>
> </Query>
>|||I was wondering if there was any update on this since the product has been
released?
"Teo Lachev [MVP]" wrote:
> I reported this issue in the early beta lifecycle but it seemed that it
> wasn't fixed. I've tried a similar scenario recently with RTM and indeed,
> the parameters are not passed. Strangely, if you trace the call, you will
> see that the parameters are serialized as a part of the SOAP request but for
> some reason they are dropped by the ASP.NET Web service runtime. I couldn't
> find a workaround and reported the issue again.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "J. C." <J. C.@.discussions.microsoft.com> wrote in message
> news:53FF7A94-1EC0-4EF3-8E45-5391B08F2779@.microsoft.com...
> > Does anyone know how to ensure a WebService/WebMethod needs to be
> > serialized
> > to ensure is compatible with Reporting Services' new XML Data Source when
> > passing parameters to the report. I have had success on using the Report
> > Server WebService
> > http://localhost/reportserver/reportservice2005.asmx
> > and using the Query designer to pass the SoapAction call
> > <Query><SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren</SoapAction></Query>
> > and associating the data set parameters to the Designer GUI parameters
> > (which I may say is not documented well on BoL)
> >
> > http://www.enGaugedTraining.com/Parameters.gif
> >
> > But when using ANY OTHER WEB SERVICE that needs parameters, the
> > parameteres
> > are not passed correctly to the WebMehtod, so I am thiking they are
> > comming
> > in the header or as an array instead of an actual item within the SOAP
> > message... To bad we can't do this in the Query Designer... it is
> > actually
> > SAD this was nto thought out as to be compatible with regular SOAP
> > calls...
> > too bad. Ideally we would use query like the one below, and replace the
> > fixed
> > values with a parameter as defined in the designer (i.e. /Reports => > @.ItemParam & False as @.RecursiveParam )... maybe in Orca this can be done
> > right! either thru SOAP
> >
> > <?xml version="1.0" encoding="utf-16"?>
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="">http://www.w3.org/2001/XMLSchema">
> > <soap:Body>
> > <ListChildren
> > xmlns="">http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">
> > <Item>/</Item>
> > <Recursive>false</Recursive>
> > </ListChildren>
> > </soap:Body>
> > </soap:Envelope>
> >
> > Or through whatever "standard' the <Query/> definition is made of!
> >
> > <Query>
> > <SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren
> > </SoapAction>
> > <Parameter>
> > <Name>Item</Name>
> > <Value>/Reports</Value>
> > </Parameter>
> > <Parameter>
> > <Name>Recursive</Name>
> > <Value>False</Value>
> > </Parameter>
> > </Query>
> >
>
>|||Here is the solution to this puzzle:
http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
Let me know if you are still having problems
"Shawn" wrote:
> I was wondering if there was any update on this since the product has been
> released?
> "Teo Lachev [MVP]" wrote:
> > I reported this issue in the early beta lifecycle but it seemed that it
> > wasn't fixed. I've tried a similar scenario recently with RTM and indeed,
> > the parameters are not passed. Strangely, if you trace the call, you will
> > see that the parameters are serialized as a part of the SOAP request but for
> > some reason they are dropped by the ASP.NET Web service runtime. I couldn't
> > find a workaround and reported the issue again.
> >
> > --
> > HTH,
> > ---
> > Teo Lachev, MVP, MCSD, MCT
> > "Microsoft Reporting Services in Action"
> > "Applied Microsoft Analysis Services 2005"
> > Home page and blog: http://www.prologika.com/
> > ---
> > "J. C." <J. C.@.discussions.microsoft.com> wrote in message
> > news:53FF7A94-1EC0-4EF3-8E45-5391B08F2779@.microsoft.com...
> > > Does anyone know how to ensure a WebService/WebMethod needs to be
> > > serialized
> > > to ensure is compatible with Reporting Services' new XML Data Source when
> > > passing parameters to the report. I have had success on using the Report
> > > Server WebService
> > > http://localhost/reportserver/reportservice2005.asmx
> > > and using the Query designer to pass the SoapAction call
> > > <Query><SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren</SoapAction></Query>
> > > and associating the data set parameters to the Designer GUI parameters
> > > (which I may say is not documented well on BoL)
> > >
> > > http://www.enGaugedTraining.com/Parameters.gif
> > >
> > > But when using ANY OTHER WEB SERVICE that needs parameters, the
> > > parameteres
> > > are not passed correctly to the WebMehtod, so I am thiking they are
> > > comming
> > > in the header or as an array instead of an actual item within the SOAP
> > > message... To bad we can't do this in the Query Designer... it is
> > > actually
> > > SAD this was nto thought out as to be compatible with regular SOAP
> > > calls...
> > > too bad. Ideally we would use query like the one below, and replace the
> > > fixed
> > > values with a parameter as defined in the designer (i.e. /Reports => > > @.ItemParam & False as @.RecursiveParam )... maybe in Orca this can be done
> > > right! either thru SOAP
> > >
> > > <?xml version="1.0" encoding="utf-16"?>
> > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:xsd="">http://www.w3.org/2001/XMLSchema">
> > > <soap:Body>
> > > <ListChildren
> > > xmlns="">http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">
> > > <Item>/</Item>
> > > <Recursive>false</Recursive>
> > > </ListChildren>
> > > </soap:Body>
> > > </soap:Envelope>
> > >
> > > Or through whatever "standard' the <Query/> definition is made of!
> > >
> > > <Query>
> > > <SoapAction>http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListChildren
> > > </SoapAction>
> > > <Parameter>
> > > <Name>Item</Name>
> > > <Value>/Reports</Value>
> > > </Parameter>
> > > <Parameter>
> > > <Name>Recursive</Name>
> > > <Value>False</Value>
> > > </Parameter>
> > > </Query>
> > >
> >
> >
> >|||Here is the solution to this puzzle:
http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
Let me know if you are still having problems|||Still doesn't work for me. My namespace is http://AdventureWorks/ and query
is
<Query>
<Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
<SoapAction>http://AdventureWorks/GetOrders</SoapAction>
<ElementPath
IgnoreNamespaces="true">GetOrdersResponse/GetOrdersResult/diffgram/DocumentElement/SalesOrderHeader</ElementPath>
</Query>
The query parameter is never passed. Another issue (perhaps not RS related)
is that trying to debug the web service call in the same solution by putting
the web service in debug mode and executing the dataset query from the
Report Designer Data tab, effectively freezes the VS.NET debugger.
Strangely, if you do iisreset to unfreeze, you will be able to break into
the method just fine :-)
Here is the outgoing POST request:
POST /CustomerImage/CustomerMap.asmx HTTP/1.1
SOAPAction: http://AdventureWorks/GetOrders
Content-Type: text/xml
Host: localhost:8080
Content-Length: 264
Expect: 100-continue
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="">http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetOrders xmlns="">http://AdventureWorks/">
<CustomerID>676</CustomerID>
</GetOrders>
</soap:Body>
</soap:Envelope>
And the web service:
==========================================[WebService(Namespace = "http://AdventureWorks/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class CustomerMap : System.Web.Services.WebService {
public CustomerMap()
{
}
[WebMethod]
public CustomerOrders.SalesOrderHeaderDataTable GetOrders(int customerID)
{
CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter adapter = new
CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter();
CustomerOrders.SalesOrderHeaderDataTable orders =adapter.GetData(customerID);
return orders;
}
}
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
<Juan.Carlos.Novoa@.gmail.com> wrote in message
news:1132282722.036433.142560@.g49g2000cwa.googlegroups.com...
> Here is the solution to this puzzle:
> http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
> Let me know if you are still having problems
>|||You have an element path there that is causing problems:
it should be:
<Query>
<Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
<SoapAction>http://AdventureWorks/GetOrders</SoapAction>
</Query>
Nothing else besides adding the parameters to the DataSet and associating
them to the Report's parameters
If yuo download my sample code from here
and run it, you will see it working
http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
I've tried it with all my methods in my WebService and it works like a charm!
"Teo Lachev [MVP]" wrote:
> Still doesn't work for me. My namespace is http://AdventureWorks/ and query
> is
> <Query>
> <Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
> <SoapAction>http://AdventureWorks/GetOrders</SoapAction>
> <ElementPath
> IgnoreNamespaces="true">GetOrdersResponse/GetOrdersResult/diffgram/DocumentElement/SalesOrderHeader</ElementPath>
> </Query>
> The query parameter is never passed. Another issue (perhaps not RS related)
> is that trying to debug the web service call in the same solution by putting
> the web service in debug mode and executing the dataset query from the
> Report Designer Data tab, effectively freezes the VS.NET debugger.
> Strangely, if you do iisreset to unfreeze, you will be able to break into
> the method just fine :-)
> Here is the outgoing POST request:
> POST /CustomerImage/CustomerMap.asmx HTTP/1.1
> SOAPAction: http://AdventureWorks/GetOrders
> Content-Type: text/xml
> Host: localhost:8080
> Content-Length: 264
> Expect: 100-continue
> Connection: Keep-Alive
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="">http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <GetOrders xmlns="">http://AdventureWorks/">
> <CustomerID>676</CustomerID>
> </GetOrders>
> </soap:Body>
> </soap:Envelope>
> And the web service:
> ==========================================> [WebService(Namespace = "http://AdventureWorks/")]
> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
> public class CustomerMap : System.Web.Services.WebService {
> public CustomerMap()
> {
> }
> [WebMethod]
> public CustomerOrders.SalesOrderHeaderDataTable GetOrders(int customerID)
> {
> CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter adapter = new
> CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter();
> CustomerOrders.SalesOrderHeaderDataTable orders => adapter.GetData(customerID);
> return orders;
> }
> }
>
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> <Juan.Carlos.Novoa@.gmail.com> wrote in message
> news:1132282722.036433.142560@.g49g2000cwa.googlegroups.com...
> > Here is the solution to this puzzle:
> > http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
> > Let me know if you are still having problems
> >
>
>|||Thanks for sharing.
I can't take the ElementPath off because the web service returns an ADO.NET
dataset. And I don't think the ElementPath should have anything to do with
the actual call because it is applied on the returned results as an XPATH
expression.
Do you have a working example with a web method that returns an ADO.NET
dataset and takes a parameter?
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"J. C." <JC@.discussions.microsoft.com> wrote in message
news:101AF92C-B8C5-462D-983B-9B3216CD2B0F@.microsoft.com...
> You have an element path there that is causing problems:
> it should be:
> <Query>
> <Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
> <SoapAction>http://AdventureWorks/GetOrders</SoapAction>
> </Query>
> Nothing else besides adding the parameters to the DataSet and associating
> them to the Report's parameters
> If yuo download my sample code from here
> and run it, you will see it working
> http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
> I've tried it with all my methods in my WebService and it works like a
> charm!
> "Teo Lachev [MVP]" wrote:
>> Still doesn't work for me. My namespace is http://AdventureWorks/ and
>> query
>> is
>> <Query>
>> <Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
>> <SoapAction>http://AdventureWorks/GetOrders</SoapAction>
>> <ElementPath
>> IgnoreNamespaces="true">GetOrdersResponse/GetOrdersResult/diffgram/DocumentElement/SalesOrderHeader</ElementPath>
>> </Query>
>> The query parameter is never passed. Another issue (perhaps not RS
>> related)
>> is that trying to debug the web service call in the same solution by
>> putting
>> the web service in debug mode and executing the dataset query from the
>> Report Designer Data tab, effectively freezes the VS.NET debugger.
>> Strangely, if you do iisreset to unfreeze, you will be able to break into
>> the method just fine :-)
>> Here is the outgoing POST request:
>> POST /CustomerImage/CustomerMap.asmx HTTP/1.1
>> SOAPAction: http://AdventureWorks/GetOrders
>> Content-Type: text/xml
>> Host: localhost:8080
>> Content-Length: 264
>> Expect: 100-continue
>> Connection: Keep-Alive
>> <?xml version="1.0" encoding="utf-8"?>
>> <soap:Envelope xmlns:soap="">http://schemas.xmlsoap.org/soap/envelope/">
>> <soap:Body>
>> <GetOrders xmlns="">http://AdventureWorks/">
>> <CustomerID>676</CustomerID>
>> </GetOrders>
>> </soap:Body>
>> </soap:Envelope>
>> And the web service:
>> ==========================================>> [WebService(Namespace = "http://AdventureWorks/")]
>> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
>> public class CustomerMap : System.Web.Services.WebService {
>> public CustomerMap()
>> {
>> }
>> [WebMethod]
>> public CustomerOrders.SalesOrderHeaderDataTable GetOrders(int customerID)
>> {
>> CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter adapter = new
>> CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter();
>> CustomerOrders.SalesOrderHeaderDataTable orders =>> adapter.GetData(customerID);
>> return orders;
>> }
>> }
>>
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> <Juan.Carlos.Novoa@.gmail.com> wrote in message
>> news:1132282722.036433.142560@.g49g2000cwa.googlegroups.com...
>> > Here is the solution to this puzzle:
>> > http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
>> > Let me know if you are still having problems
>> >
>>|||If you want to create a public webservice that generates a dataset, and let
me know here is at, i will build you a report that reads of it.
A cleaner approach would be for you to convert thet dataset to an array of
objects defined in a class that represents your dataset, where a property
exist for each column, then you can iterate through your datareader, create
new instances of that class, set the properties(columns) and return an array
of objects 9rows) the report will easily be able to parse the data withouth
having to deal with the XSD definition... you are just reading the data after
alll, so who cares what the READ ONLY data types are ;-)
"Teo Lachev [MVP]" wrote:
> Thanks for sharing.
> I can't take the ElementPath off because the web service returns an ADO.NET
> dataset. And I don't think the ElementPath should have anything to do with
> the actual call because it is applied on the returned results as an XPATH
> expression.
> Do you have a working example with a web method that returns an ADO.NET
> dataset and takes a parameter?
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "J. C." <JC@.discussions.microsoft.com> wrote in message
> news:101AF92C-B8C5-462D-983B-9B3216CD2B0F@.microsoft.com...
> > You have an element path there that is causing problems:
> > it should be:
> > <Query>
> > <Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
> > <SoapAction>http://AdventureWorks/GetOrders</SoapAction>
> > </Query>
> > Nothing else besides adding the parameters to the DataSet and associating
> > them to the Report's parameters
> > If yuo download my sample code from here
> > and run it, you will see it working
> > http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
> > I've tried it with all my methods in my WebService and it works like a
> > charm!
> >
> > "Teo Lachev [MVP]" wrote:
> >
> >> Still doesn't work for me. My namespace is http://AdventureWorks/ and
> >> query
> >> is
> >>
> >> <Query>
> >> <Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
> >> <SoapAction>http://AdventureWorks/GetOrders</SoapAction>
> >> <ElementPath
> >> IgnoreNamespaces="true">GetOrdersResponse/GetOrdersResult/diffgram/DocumentElement/SalesOrderHeader</ElementPath>
> >> </Query>
> >>
> >> The query parameter is never passed. Another issue (perhaps not RS
> >> related)
> >> is that trying to debug the web service call in the same solution by
> >> putting
> >> the web service in debug mode and executing the dataset query from the
> >> Report Designer Data tab, effectively freezes the VS.NET debugger.
> >> Strangely, if you do iisreset to unfreeze, you will be able to break into
> >> the method just fine :-)
> >>
> >> Here is the outgoing POST request:
> >>
> >> POST /CustomerImage/CustomerMap.asmx HTTP/1.1
> >> SOAPAction: http://AdventureWorks/GetOrders
> >> Content-Type: text/xml
> >> Host: localhost:8080
> >> Content-Length: 264
> >> Expect: 100-continue
> >> Connection: Keep-Alive
> >>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <soap:Envelope xmlns:soap="">http://schemas.xmlsoap.org/soap/envelope/">
> >> <soap:Body>
> >> <GetOrders xmlns="">http://AdventureWorks/">
> >> <CustomerID>676</CustomerID>
> >> </GetOrders>
> >> </soap:Body>
> >> </soap:Envelope>
> >>
> >> And the web service:
> >>
> >> ==========================================> >> [WebService(Namespace = "http://AdventureWorks/")]
> >>
> >> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
> >>
> >> public class CustomerMap : System.Web.Services.WebService {
> >>
> >> public CustomerMap()
> >>
> >> {
> >>
> >> }
> >>
> >> [WebMethod]
> >>
> >> public CustomerOrders.SalesOrderHeaderDataTable GetOrders(int customerID)
> >>
> >> {
> >>
> >> CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter adapter = new
> >> CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter();
> >>
> >> CustomerOrders.SalesOrderHeaderDataTable orders => >> adapter.GetData(customerID);
> >>
> >> return orders;
> >>
> >> }
> >>
> >> }
> >>
> >>
> >> --
> >> HTH,
> >> ---
> >> Teo Lachev, MVP, MCSD, MCT
> >> "Microsoft Reporting Services in Action"
> >> "Applied Microsoft Analysis Services 2005"
> >> Home page and blog: http://www.prologika.com/
> >> ---
> >> <Juan.Carlos.Novoa@.gmail.com> wrote in message
> >> news:1132282722.036433.142560@.g49g2000cwa.googlegroups.com...
> >> > Here is the solution to this puzzle:
> >> > http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
> >> > Let me know if you are still having problems
> >> >
> >>
> >>
> >>
>
>|||In a zen moment, it dawned on me that the parameter name is case-sensitive.
It's working fine now. Thanks very much for the sample.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"J. C." <JC@.discussions.microsoft.com> wrote in message
news:2D6AF396-F2A6-4AF4-90D6-3B2C8C788160@.microsoft.com...
> If you want to create a public webservice that generates a dataset, and
> let
> me know here is at, i will build you a report that reads of it.
> A cleaner approach would be for you to convert thet dataset to an array of
> objects defined in a class that represents your dataset, where a property
> exist for each column, then you can iterate through your datareader,
> create
> new instances of that class, set the properties(columns) and return an
> array
> of objects 9rows) the report will easily be able to parse the data
> withouth
> having to deal with the XSD definition... you are just reading the data
> after
> alll, so who cares what the READ ONLY data types are ;-)
> "Teo Lachev [MVP]" wrote:
>> Thanks for sharing.
>> I can't take the ElementPath off because the web service returns an
>> ADO.NET
>> dataset. And I don't think the ElementPath should have anything to do
>> with
>> the actual call because it is applied on the returned results as an XPATH
>> expression.
>> Do you have a working example with a web method that returns an ADO.NET
>> dataset and takes a parameter?
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "J. C." <JC@.discussions.microsoft.com> wrote in message
>> news:101AF92C-B8C5-462D-983B-9B3216CD2B0F@.microsoft.com...
>> > You have an element path there that is causing problems:
>> > it should be:
>> > <Query>
>> > <Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
>> > <SoapAction>http://AdventureWorks/GetOrders</SoapAction>
>> > </Query>
>> > Nothing else besides adding the parameters to the DataSet and
>> > associating
>> > them to the Report's parameters
>> > If yuo download my sample code from here
>> > and run it, you will see it working
>> > http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
>> > I've tried it with all my methods in my WebService and it works like a
>> > charm!
>> >
>> > "Teo Lachev [MVP]" wrote:
>> >
>> >> Still doesn't work for me. My namespace is http://AdventureWorks/ and
>> >> query
>> >> is
>> >>
>> >> <Query>
>> >> <Method Namespace="http://AdventureWorks/" Name="GetOrders"/>
>> >> <SoapAction>http://AdventureWorks/GetOrders</SoapAction>
>> >> <ElementPath
>> >> IgnoreNamespaces="true">GetOrdersResponse/GetOrdersResult/diffgram/DocumentElement/SalesOrderHeader</ElementPath>
>> >> </Query>
>> >>
>> >> The query parameter is never passed. Another issue (perhaps not RS
>> >> related)
>> >> is that trying to debug the web service call in the same solution by
>> >> putting
>> >> the web service in debug mode and executing the dataset query from the
>> >> Report Designer Data tab, effectively freezes the VS.NET debugger.
>> >> Strangely, if you do iisreset to unfreeze, you will be able to break
>> >> into
>> >> the method just fine :-)
>> >>
>> >> Here is the outgoing POST request:
>> >>
>> >> POST /CustomerImage/CustomerMap.asmx HTTP/1.1
>> >> SOAPAction: http://AdventureWorks/GetOrders
>> >> Content-Type: text/xml
>> >> Host: localhost:8080
>> >> Content-Length: 264
>> >> Expect: 100-continue
>> >> Connection: Keep-Alive
>> >>
>> >> <?xml version="1.0" encoding="utf-8"?>
>> >> <soap:Envelope xmlns:soap="">http://schemas.xmlsoap.org/soap/envelope/">
>> >> <soap:Body>
>> >> <GetOrders xmlns="">http://AdventureWorks/">
>> >> <CustomerID>676</CustomerID>
>> >> </GetOrders>
>> >> </soap:Body>
>> >> </soap:Envelope>
>> >>
>> >> And the web service:
>> >>
>> >> ==========================================>> >> [WebService(Namespace = "http://AdventureWorks/")]
>> >>
>> >> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
>> >>
>> >> public class CustomerMap : System.Web.Services.WebService {
>> >>
>> >> public CustomerMap()
>> >>
>> >> {
>> >>
>> >> }
>> >>
>> >> [WebMethod]
>> >>
>> >> public CustomerOrders.SalesOrderHeaderDataTable GetOrders(int
>> >> customerID)
>> >>
>> >> {
>> >>
>> >> CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter adapter = new
>> >> CustomerOrdersTableAdapters.SalesOrderHeaderTableAdapter();
>> >>
>> >> CustomerOrders.SalesOrderHeaderDataTable orders =>> >> adapter.GetData(customerID);
>> >>
>> >> return orders;
>> >>
>> >> }
>> >>
>> >> }
>> >>
>> >>
>> >> --
>> >> HTH,
>> >> ---
>> >> Teo Lachev, MVP, MCSD, MCT
>> >> "Microsoft Reporting Services in Action"
>> >> "Applied Microsoft Analysis Services 2005"
>> >> Home page and blog: http://www.prologika.com/
>> >> ---
>> >> <Juan.Carlos.Novoa@.gmail.com> wrote in message
>> >> news:1132282722.036433.142560@.g49g2000cwa.googlegroups.com...
>> >> > Here is the solution to this puzzle:
>> >> > http://channel9.msdn.com/ShowPost.aspx?PostID=137650#solution
>> >> > Let me know if you are still having problems
>> >> >
>> >>
>> >>
>> >>
>>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment