Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

consuming sharepoint services  RSS feed

 
Rangan Iyengar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i am trying to access sharepoint web services from java.
some of the services return an xml node of type "System.xml.Node"
on my client side (java) i am not able to get the xml
all i get is trying.GetListCollectionResponse$GetListCollectionResult@12884e0

i am also not able to cast the return to "org.w3c.dom.Node"
is there any other way in which i can get the returned xml in java?

regards,
Rangan
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would not be surprised is Sharepoint emits Microsoft-only SOAP. What does the Sharepoint documentation say about consuming its WS? Does it offer tools to create clients?
 
Rangan Iyengar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nope!!
they just provide examples of .Net clients...
the best part is that there are examples of C# and VB clients...
:roll:
 
Matt Zollinhofer
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a little late thread, but I have been able to connect to the web service and get information back about lists, so if you're still having problems post up and we'll get it figured out.

If by chance you've gotten through this in the past year or two and have been able to update the list I'd really appreciate some help. For some reason when I try to put things into the list I get this error:


AxisFault
faultCode: {http://www.w3.org/2003/05/soap-envelope}Receiver
faultSubcode:
faultString: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
faultActor:
faultNode:
faultDetail:
{http://schemas.microsoft.com/sharepoint/soap/}errorstring:Element <Fields> of parameter newFields is missing or invalid.
{http://schemas.microsoft.com/sharepoint/soap/}errorcode:0x82000000

 
Colin Chiew
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Matt,

Would like to get a little more information on this. I managed to get connected to the web service and got back information on ListItems. However I would like to filter the fields returned using the ViewField option. I'm using a wrapper I found here http://confluence.atlassian.com/display/CONFEXT/Sharepoint+Webservices+Wrapper but did not get what I wanted when specifying the ViewFields parameters.

Would like to find out how you managed to connect and retrieve the list.

Thanks in advance.

Colin.

 
Tom Cheek
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know how you got to viewing list info. I am about ready to throw my computer out the window. I can get a Query to work but cannot get the GetListCollection to work.

Thanks
 
itrahul soni
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rangan Iyengar when you get the object of GetListCollectionResponseGetListCollectionResult result and then invoke the method on this object like result.get_any() this statement return the MessageElement[] array, and then get the first element using messageElement[0].getAsString() the result of this statement will give you xml returned by sharepoint as a string. you can easily parst it. This method is available for all the objects return from sharepoint service do the same thing with resultresponse object return after you have invoke different service.


 
Matt Zollinhofer
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just wanted to second what itrahul soni said. When you get the response back, that's what you need to do.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!