You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
I've got a rather simple PHP code that I'd like to do with Talend:
$client = new SoapClient('http://www.myhost.com/api/v2_soap?wsdl=1');
$sessionId = $client->login('mysoapadmin', 'mypass');
$params = array('filter' => array(
array('key' => 'status', 'value' => 'pending'),
array('key' => 'customer_is_guest', 'value' => '1')
));
$result = $client->salesOrderList($sessionId, $params);
print_r ($result);
$client->endSession($sessionId);I tried this one:
http://www.talendforge.org/tutorials/tu … ;idTuto=46
but I'm a bit confused - why do I use a WebService component if there is a SOAP component?
Do I use a WebService or a WebServiceInput?
How do I setup the parameters for the login? In a context?
How about the parameter for the OrderList request?
It seems to be really difficult to get an output with Talend with WebServices (did some stuff with Databases and Files before which was kind of easier :-S ).
Thanks
Chris
Offline

Hi Chris
According to your PHP code, I think you might use tWebService or tWebServiceInput to accomplish your requirement.
Please select the option "Need authentication" on tWebService or tWebServiceInput and then type username and password.
Besides, tWebService is easier to use which can retrieve Port Name and Operation automatically.
Please download the document TalendOpenStudio_Components_RG_51b_EN and get instruction&scenarios about these webservice components. It is not too difficult to use.
Regards,
Pedro
Offline

Thanks for your quick answer.
I tried tWebService which worked nice with retrieving the methods.
After selecting the login method I set up the two parameters username and apiKey and the loginReturn (which should be a Session ID that I need to use).
Unfortunately I receive an error:
Starte Job MagentoConnection am 17:32 19/07/2012.
[statistics] connecting to socket on port 4079
[statistics] connected
Exception in component tWebService_1
java.lang.reflect.UndeclaredThrowableException
at $Proxy32.bind(Unknown Source)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:280)
at org.talend.webservice.helper.ServiceInvokerHelper.createClient(ServiceInvokerHelper.java:142)
at org.talend.webservice.helper.ServiceInvokerHelper.getClient(ServiceInvokerHelper.java:134)
at org.talend.webservice.helper.ServiceInvokerHelper.invoke(ServiceInvokerHelper.java:234)
at magentoinvoicing.magentoconnection_0_1.MagentoConnection.tWebService_1Process(MagentoConnection.java:596)
at magentoinvoicing.magentoconnection_0_1.MagentoConnection.runJobInTOS(MagentoConnection.java:908)
at magentoinvoicing.magentoconnection_0_1.MagentoConnection.main(MagentoConnection.java:767)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
... 8 more
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy33.error(Unknown Source)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:286)
at com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java:77)
at com.sun.xml.xsom.impl.parser.ParserContext$2.error(ParserContext.java:202)
at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(ParserContext.java:180)
at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.java:170)
at com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java:125)
at com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:100)
at com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:131)
at com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:226)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:519)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:236)
... 13 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
... 25 more
Caused by: java.lang.RuntimeException: Error compiling schema from WSDL at {file:/tmp/wsdl1342690377908/mainWSDL.wsdl}: undefined simple or complex type 'typens:associativeMultiArray'
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.error(DynamicClientFactory.java:624)
... 30 more
Caused by: org.xml.sax.SAXParseException: undefined simple or complex type 'typens:associativeMultiArray'
at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(ParserContext.java:176)
... 20 more
[statistics] disconnected
Job MagentoConnection endet am 17:33 19/07/2012. [exit code=1]Any idea on how I can get this working?
Last edited by hammerwd (2012-07-19 11:43:41)
Offline

Hi
I have reproduced this issue.
And here you can see a related issue.
http://jira.talendforge.org/browse/TDI-18573
Please report it on BugTracker. It seems that it recurs.
Regards,
Pedro
Offline

Hi
I don't think so.
The best way is to create a new issue.
Or the developer may not notice it.
http://jira.talendforge.org/secure/Dashboard.jspa
Regards,
Pedro
Offline
Pages: 1