I have requirement to use webservice to send data to target system, my input source is flat file (.csv). While importing webservice method itself I got error message, so I followed manual xml meta data importer to import the data, it imported all columns with Varchar of length 255. I had peek to view the xml message, it looks good. I have 5 columns of data type of int and small int in the service xsd, those columns has valid integer value or blank. But DS is throwing below error:
APT_CombinedOperatorController,0: Fatal Error: Fatal: 0026`:`com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception: <ns1:Fault xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/1 ... aultstring xml:lang="en-US" xmlns:xml="http://www.w3.org/XML/1998/namespace">The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:Touch. The InnerException message was 'There was an error deserializing the object of type WinwatcherBL.Import_TouchLog. The value '' cannot be parsed as the type 'Int32'.'. Please see InnerException for more details.</faultstring><detail><ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07 ... rviceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException i:nil="true"/><Message>Input string was not in a correct format.</Message><StackTrace> at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Xml.XmlConverter.ToInt32(String value)</StackTrace><Type>System.FormatException</Type></InnerException><Message>The value '' cannot be parsed as the type 'Int32'.</Message><StackTrace> at System.Xml.XmlConverter.ToInt32(String value)
WS client error "Input String was not in a correct form
Moderators: chulett, rschirm, roy
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
Stripped of the DataStage-specific information what you're seeing here is a regular SOAP fault. Consult the documentation for the web service you're invoking to identify the known SOAP faults that it generates and their likely causes and remedies.
Try invoking from a different utility such as SOAPui (which is downloadable for free).
Stripped of the DataStage-specific information what you're seeing here is a regular SOAP fault. Consult the documentation for the web service you're invoking to identify the known SOAP faults that it generates and their likely causes and remedies.
Try invoking from a different utility such as SOAPui (which is downloadable for free).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Definitely get to know the service via a tool such as SOAP ui so that you are very familiar with what it expects and what it returns.
Another very useful test is to use a Server Job....even if only for testing the web service. The WSTransformer can be fully "traced" in a Server Job....(at the run dialog for the job, go to tracing, select your wsStage on the left and all four check boxes on the right)...you will get a volumninous trace in the ds log ...and in the very middle of that trace, it will show you the xml being sent "out" and the xml being received "in". A powerful debugging aid as you work thru this.
Ernie
Another very useful test is to use a Server Job....even if only for testing the web service. The WSTransformer can be fully "traced" in a Server Job....(at the run dialog for the job, go to tracing, select your wsStage on the left and all four check boxes on the right)...you will get a volumninous trace in the ds log ...and in the very middle of that trace, it will show you the xml being sent "out" and the xml being received "in". A powerful debugging aid as you work thru this.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Thank you for your response. I was able to download SOAP UI and was able to test it.. but for some reason I have 2 fields in WSDL Schema that has char type definition but when I try to pass a char 'M' and 'U', it is trying to convert to int32"..
specifically blows while tries to convert to int32 only for fields Touchcode and TouchMethod in the XML
do you guys know the reason
xsd:
<xs:complexType name="Import_TouchLog">
- <xs:sequence>
<xs:element minOccurs="0" name="CNum" type="xs:int" />
<xs:element minOccurs="0" name="DID" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="DivID" type="xs:short" />
<xs:element minOccurs="0" name="ErrorDescription" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="FollowUpDate" nillable="true" type="xs:dateTime" />
<xs:element minOccurs="0" name="Imported" nillable="true" type="ser:char" />
<xs:element minOccurs="0" name="ImportedDateTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="MarketID" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="Notes" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="OpportunityID" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="TouchCode" type="ser:char" />
<xs:element minOccurs="0" name="TouchDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="TouchID" type="xs:int" />
<xs:element minOccurs="0" name="TouchLogDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="TouchMethod" type="ser:char" />
<xs:element minOccurs="0" name="TouchTypeID" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="UserID" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
specifically blows while tries to convert to int32 only for fields Touchcode and TouchMethod in the XML
do you guys know the reason
xsd:
<xs:complexType name="Import_TouchLog">
- <xs:sequence>
<xs:element minOccurs="0" name="CNum" type="xs:int" />
<xs:element minOccurs="0" name="DID" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="DivID" type="xs:short" />
<xs:element minOccurs="0" name="ErrorDescription" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="FollowUpDate" nillable="true" type="xs:dateTime" />
<xs:element minOccurs="0" name="Imported" nillable="true" type="ser:char" />
<xs:element minOccurs="0" name="ImportedDateTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="MarketID" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="Notes" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="OpportunityID" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="TouchCode" type="ser:char" />
<xs:element minOccurs="0" name="TouchDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="TouchID" type="xs:int" />
<xs:element minOccurs="0" name="TouchLogDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="TouchMethod" type="ser:char" />
<xs:element minOccurs="0" name="TouchTypeID" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="UserID" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
...I'd probably dig deeper in the wsdl and any associated xsd's...find the namespace "ser" and look closely at the definition of the the "char" type.........maybe there are answers there.
...also, for fun, just make your own copy of this wsdl and change those types to xs:string.....import that and see what happens.
Ernie
...also, for fun, just make your own copy of this wsdl and change those types to xs:string.....import that and see what happens.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
