Showing posts with label soap. Show all posts
Showing posts with label soap. Show all posts

Tuesday, March 27, 2012

Calling SSRS web services from Java using Axis

Hi,

I'm working on a project where I'll need to call the SSRS web services from a java servlet. We are using the Axis implementation of the SOAP protocol.

I've previously used SSRS web services from C#, but not from Java. Before I start this endeavor does anyone have any bits of wisdom they'd like to share that's going to make this easier?

Also, I've searched for tutorials, samples, source code, etc.. for this situation (that is, using java to call SSRS web services), but can't find anything available. Does anyone know where I can find resources such as these for this particular technology pairing?

Thanks for the help.

-M

Try WSDL2Java tool to create a java proxy to the reporting services.

The WSDL is accessible from one of these url depending on the version(2000 or 2005) and flavor (management or execution) of the service

http://<server>/reportserver/reportservice.asmx?wsdl

http://<server>/reportserver/reportservice2005.asmx?wsdl

http://<server>/reportserver/reportexecution2005.asmx?wsdl

An example on accessing .NET web services (not SSRS specific) from Java is available here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/jdni_ch08.asp

Wednesday, March 7, 2012

Call Soap SqlXML soap webservice

I setup a soap webservice using sqlxml 3.0 on our IIS server, I can
consume the webservice via "dotNET" but I am having a heck of a time
trying to make a call out of a vba project. Currently I do not have
the time to develope a new interface all in dotNET, thus the my need to
try and post to the soap object from Access2003... another idea is to
shell out to the vb.net app where I have the webservice working ... :|
Dim http As Object
Set http = CreateObject("Microsoft.XMLHTTP")
http.Open "POST", "http://localhost/ws/report", False
Call http.send("<SR =TEST /> ")
Debug.Print http.responseText
Set http = Nothing
my response for this is:
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/'
xmlns:sqltypes='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'
xmlns:sqlmessage='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/
SqlMessage'
xmlns:sqlresultstream='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/t
ypes/SqlResultStream'>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Incorrectly formatted SOAP request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>SOAP is a message protocol in XML form that you can send over HTTP. Below
you tried to send an XML only over HTTP (which you can do if your server
knows what to do with it). So if you want to avoid developing a new
interface, the easiest would probably be to create the SOAP message that you
want to send in your VB code (look at the message that is sent from the
VB.Net app or the SOAP 1.0 spec for details on what the SOAP message format
needs to look like).
Best regards
Michael
<fhtapia@.gmail.com> wrote in message
news:1130949535.378275.277320@.f14g2000cwb.googlegroups.com...
>I setup a soap webservice using sqlxml 3.0 on our IIS server, I can
> consume the webservice via "dotNET" but I am having a heck of a time
> trying to make a call out of a vba project. Currently I do not have
> the time to develope a new interface all in dotNET, thus the my need to
> try and post to the soap object from Access2003... another idea is to
> shell out to the vb.net app where I have the webservice working ... :|
> Dim http As Object
> Set http = CreateObject("Microsoft.XMLHTTP")
> http.Open "POST", "http://localhost/ws/report", False
> Call http.send("<SR =TEST /> ")
> Debug.Print http.responseText
> Set http = Nothing
> my response for this is:
> 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/'
> xmlns:sqltypes='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'
> xmlns:sqlmessage='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/type
s/SqlMessage'
> xmlns:sqlresultstream='http://schemas.microsoft.com/SQLServer/2001/12/SOAP
/types/SqlResultStream'>
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Client</faultcode>
> <faultstring>Incorrectly formatted SOAP request</faultstring>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>|||Michael,
Thanks for your help on this, so what I need is a soap envelope... I
wish I could have ran into this documentation earlier on, I also
downloaded the "soap sdk" and utilized the trace utility in order to
capture my call and get the correct soap envelop as used by dotNet here
is my variation
request = "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" &
_
"<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>" & _
" <SOAP-ENV:Body>" & _
" <SR xmlns='http://Localhost/ws/Report'>" & _
" <XmlReport>'" & strXML & "'</XmlReport>" & _
" </SR>" & _
" </SOAP-ENV:Body>" & _
"</SOAP-ENV:Envelope>"|||Glad to be of help.
Michael
"seeCoolGuy" <fhtapia@.gmail.com> wrote in message
news:1131046410.373083.163320@.g47g2000cwa.googlegroups.com...
> Michael,
> Thanks for your help on this, so what I need is a soap envelope... I
> wish I could have ran into this documentation earlier on, I also
> downloaded the "soap sdk" and utilized the trace utility in order to
> capture my call and get the correct soap envelop as used by dotNet here
> is my variation
> request = "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" &
> _
> "<SOAP-ENV:Envelope
> xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>" & _
> " <SOAP-ENV:Body>" & _
> " <SR xmlns='http://Localhost/ws/Report'>" & _
> " <XmlReport>'" & strXML & "'</XmlReport>" & _
> " </SR>" & _
> " </SOAP-ENV:Body>" & _
> "</SOAP-ENV:Envelope>"
>

Call Soap SqlXML soap webservice

I setup a soap webservice using sqlxml 3.0 on our IIS server, I can
consume the webservice via "dotNET" but I am having a heck of a time
trying to make a call out of a vba project. Currently I do not have
the time to develope a new interface all in dotNET, thus the my need to
try and post to the soap object from Access2003... another idea is to
shell out to the vb.net app where I have the webservice working ... :|
Dim http As Object
Set http = CreateObject("Microsoft.XMLHTTP")
http.Open "POST", "http://localhost/ws/report", False
Call http.send("<SR =TEST /> ")
Debug.Print http.responseText
Set http = Nothing
my response for this is:
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/'
xmlns:sqltypes='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'
xmlns:sqlmessage='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage'
xmlns:sqlresultstream='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream'>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Incorrectly formatted SOAP request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP is a message protocol in XML form that you can send over HTTP. Below
you tried to send an XML only over HTTP (which you can do if your server
knows what to do with it). So if you want to avoid developing a new
interface, the easiest would probably be to create the SOAP message that you
want to send in your VB code (look at the message that is sent from the
VB.Net app or the SOAP 1.0 spec for details on what the SOAP message format
needs to look like).
Best regards
Michael
<fhtapia@.gmail.com> wrote in message
news:1130949535.378275.277320@.f14g2000cwb.googlegr oups.com...
>I setup a soap webservice using sqlxml 3.0 on our IIS server, I can
> consume the webservice via "dotNET" but I am having a heck of a time
> trying to make a call out of a vba project. Currently I do not have
> the time to develope a new interface all in dotNET, thus the my need to
> try and post to the soap object from Access2003... another idea is to
> shell out to the vb.net app where I have the webservice working ... :|
> Dim http As Object
> Set http = CreateObject("Microsoft.XMLHTTP")
> http.Open "POST", "http://localhost/ws/report", False
> Call http.send("<SR =TEST /> ")
> Debug.Print http.responseText
> Set http = Nothing
> my response for this is:
> 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/'
> xmlns:sqltypes='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'
> xmlns:sqlmessage='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage'
> xmlns:sqlresultstream='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream'>
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Client</faultcode>
> <faultstring>Incorrectly formatted SOAP request</faultstring>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
|||Michael,
Thanks for your help on this, so what I need is a soap envelope... I
wish I could have ran into this documentation earlier on, I also
downloaded the "soap sdk" and utilized the trace utility in order to
capture my call and get the correct soap envelop as used by dotNet here
is my variation
request = "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" &
_
"<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>" & _
" <SOAP-ENV:Body>" & _
" <SR xmlns='http://Localhost/ws/Report'>" & _
" <XmlReport>'" & strXML & "'</XmlReport>" & _
" </SR>" & _
" </SOAP-ENV:Body>" & _
"</SOAP-ENV:Envelope>"
|||Glad to be of help.
Michael
"seeCoolGuy" <fhtapia@.gmail.com> wrote in message
news:1131046410.373083.163320@.g47g2000cwa.googlegr oups.com...
> Michael,
> Thanks for your help on this, so what I need is a soap envelope... I
> wish I could have ran into this documentation earlier on, I also
> downloaded the "soap sdk" and utilized the trace utility in order to
> capture my call and get the correct soap envelop as used by dotNet here
> is my variation
> request = "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" &
> _
> "<SOAP-ENV:Envelope
> xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>" & _
> " <SOAP-ENV:Body>" & _
> " <SR xmlns='http://Localhost/ws/Report'>" & _
> " <XmlReport>'" & strXML & "'</XmlReport>" & _
> " </SR>" & _
> " </SOAP-ENV:Body>" & _
> "</SOAP-ENV:Envelope>"
>