Sharepoint and tWebService/tWebServiceInput

One Star

Sharepoint and tWebService/tWebServiceInput

Hi,
I'm trying to call the GetListItems method using either tWebService or tWebServiceInput but am having some troubles.
Firstly I tried using the tWebServiceInput component with the GetList method as it only has one parameter to pass. This worked fine and I received results. Secondly I changed the method to GetListItems but receive the following error: "java.lang.RuntimeException: not know how to convert '<caml query>'". I have read on other posts that this may have to do with only being able to pass strings through tWebServiceInput's parameters.
I then tried the tWebServiceInputs advanced settings and created the required routines. The error I now get is a (401)Unauthorized error. I assume that this is to do with the windows authentication needed. I have tried searching for help on how to pass the required authentication but only seem to be able to find a whole bunch of questions and no real answers.
Lastly I tried the tWebService component but receive the following error:
Exception in component tWebService_3
org.apache.cxf.binding.soap.SoapFault: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2160)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2040)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1965)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:478)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:308)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:260)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:280)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:266)
at org.talend.ws.helper.ServiceInvokerHelper.invoke(ServiceInvokerHelper.java:234)
at org.talend.ws.helper.ServiceInvokerHelper.invoke(ServiceInvokerHelper.java:273)
at <project>.<jobname>.tFixedFlowInput_3Process(Temp_Job.java:830)
at <project>.<jobname>.runJobInTOS(Temp_Job.java:1149)
at <project>.<jobname>.main(Temp_Job.java:1023)
(which is a improvement on the 401 error I was previously getting but fixed by selecting 'Use NTLM' and inputting the required fields).
Any help on getting this all to work would be very much appreciated.
Community Manager

Re: Sharepoint and tWebService/tWebServiceInput

Hi
Can you show us the SOAP request and response definition? such as the demo webservice:
POST /webservices/weather.asmx HTTP/1.1
Host: www.deeptraining.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://litwinconsulting.com/webservices/GetWeather"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWeather xmlns="http://litwinconsulting.com/webservices/">
<City>string</City>
</GetWeather>
</soap:Body>
</soap:Envelope>
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Sharepoint and tWebService/tWebServiceInput

POST /_vti_bin/lists.asmx HTTP/1.1
Host: iqip.iqgroup.com.au
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/GetListItems"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>string</listName>
<viewName>string</viewName>
<query>string</query>
<viewFields>string</viewFields>
<rowLimit>string</rowLimit>
<queryOptions>string</queryOptions>
<webID>string</webID>
</GetListItems>
</soap:Body>
</soap:Envelope>

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<GetListItemsResult>string</GetListItemsResult>
</GetListItemsResponse>
</soap:Body>
</soap:Envelope>
Community Manager

Re: Sharepoint and tWebService/tWebServiceInput

Hi Ann
From the SOAP request and response, I see that it only return a string value, it is a simple data type , so the basic setting of tWebservicesInput sholud support your request. The job looks like:
tWebservicesInput--main--tLogRow
Define one column(String type) on schema.
When I try to open iqip.iqgroup.com.au in browser, it need a username and password, so make sure you have checked the box 'Need authentication' and type in the correct authentication.
You can try the tSoap component also.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Seven Stars

Re: Sharepoint and tWebService/tWebServiceInput

Antoinette has since left the company and I couldn't even get as far as the results she listed above with tWebServiceInput or tWebService but eventually got it working with tSoap.
One Star

Re: Sharepoint and tWebService/tWebServiceInput

Antoinette has since left the company and I couldn't even get as far as the results she listed above with tWebServiceInput or tWebService but eventually got it working with tSoap.

Does anyone found a solution?