tWebServiceInput - service with parameters

One Star

tWebServiceInput - service with parameters

Hello,
I use TOS 2.1.1, with the Java language.
I don't manage to use the tWebServiceInput component with a service needing parameters.
With a web service with no parameter all is OK.
The "style and use" property is "document/literal(wrapped)" and I know it's the right value.
The error I have is :
Exception in component tWebServiceInput_1
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Exception occurred while trying to invoke service method sayHello
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Exception occurred while trying to invoke service method sayHello
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at exports_asa.test.test.tWebServiceInput_1Process(test.java:209)
at exports_asa.test.test.main(test.java:428)
{http://xml.apache.org/axis/}hostname:markab
Exception occurred while trying to invoke service method sayHello
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at exports_asa.test.test.tWebServiceInput_1Process(test.java:209)
at exports_asa.test.test.main(test.java:428)

How to solve this problem ?
Thanks
Employee

Re: tWebServiceInput - service with parameters

Hello,
You have to use the exact parameter name , and type.
Regards,
Michaël.
One Star

Re: tWebServiceInput - service with parameters

That's exactly what I do.
The parameter type is String so I use java.lang.String.class and its name is "user" so I wrote "user" in the "name" column and I give a value, for example "toto" but I have the error I described.
Highlighted
One Star

Re: tWebServiceInput - service with parameters

Here this is the WSDL :
- <wsdl:definitions xmlns:axis2="http://toto" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://toto/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://toto">
<wsdl:documentation>Hello</wsdl:documentation>
- <wsdl:types>
- <xs:schema xmlns:ns="http://toto/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://toto/xsd">
- <xs:element name="sayHello">
- <xs:complexType>
- <xs:sequence>
<xs:element name="user" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="sayHelloResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element name="return" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
- <wsdl:message name="sayHelloMessage">
<wsdl:part name="part1" element="ns0:sayHello" />
</wsdl:message>
- <wsdl:message name="sayHelloResponse">
<wsdl:part name="part1" element="ns0:sayHelloResponse" />
</wsdl:message>
- <wsdl:portType name="HelloPortType">
- <wsdl:operation name="sayHello">
<wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:sayHelloMessage" wsaw:Action="urn:sayHello" />
<wsdl:output message="axis2:sayHelloResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="HelloSOAP11Binding" type="axis2:HelloPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="sayHello">
<soap:operation soapAction="urn:sayHello" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="HelloSOAP12Binding" type="axis2:HelloPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="sayHello">
<soap12:operation soapAction="urn:sayHello" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="HelloHttpBinding" type="axis2:HelloPortType">
<http:binding verb="POST" />
- <wsdl:operation name="sayHello">
<http:operation location="sayHello" />
- <wsdl:input>
<mime:content type="text/xml" />
</wsdl:input>
- <wsdl:output>
<mime:content type="text/xml" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Hello">
- <wsdl:port name="HelloSOAP11port_http" binding="axis2:HelloSOAP11Binding">
<soap:address location="http://192.168.100.123:8080/axis2/services/Hello" />
</wsdl:port>
- <wsdl:port name="HelloSOAP12port_http" binding="axis2:HelloSOAP12Binding">
<soap12:address location="http://192.168.100.123:8080/axis2/services/Hello" />
</wsdl:port>
- <wsdl:port name="HelloHttpport" binding="axis2:HelloHttpBinding">
<http:address location="http://192.168.100.123:8080/axis2/services/Hello" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
One Star

Re: tWebServiceInput - service with parameters

I still have the problem.
Has anyone already encountered this problem and solved it?
One Star

Re: tWebServiceInput - service with parameters

Has anybody found a resolution on this. I am getting the same exception
One Star

Re: tWebServiceInput - service with parameters

I've the same problem too. Has anyone found the solution?
Community Manager

Re: tWebServiceInput - service with parameters

Hi all
If you want to set a complex type as input params or get some complex types result, you should use the 'Advanced Use' in Advanced settings tab. See 6226 and 1991.
Please try to reproduce the examples provided on component.
Let me know if you get any problems.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business