cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with date-time format field - while calling webservice from XI

Former Member
0 Kudos

Hi

I have a scenario in which I use the XI SOAP receiver adapter to call a webservice that is residing on another server.

I imported the WSDL for the web service into XI. The data feed for the Webservice call is coming from a ABAP client proxy.

Now, there is a xsd-datatype date-time field - that is one of the parameters of the webservice to be called.

When I test the webservice on a standalone mode ( on its server ), I test its functioning with an arbitrary value for the date-time field - say 11/06/2005 11:00:01 AM along with some other parameter values for the webservice.When invoked , the webservice does what its supposed to do - updates a SQL server DB in the background - the date-time is updated properly as a part of the database record inserted into the DB table.

Now, in XI, in the ABAP proxy-webservice mapping, I hardcode this date-time target field value ( with a CONSTANT )in the WSDL structure to the one I tested the webservice on a standalone mode i.e 11/06/2005 11:00:01 AM . Surprisingly , I get an SOAP adapter error message -System Error in RWB- Adapter monitoring message. In SXMB_MONI - the message is successfully processed - i.e passed to the adapter.

The following is the error message :

*************************************************

<b>soap fault: Server was unable to read request. --> There is an error in XML document (1, 2332). --> String was not recognized as a valid</b>

*************************************************

Obviously the above message is coming from the webservice call - the XI adapter is calling the webservice with a wrong date-time value....other than the one I passed in the mapping. In SXMB_MONI, I can see the mapped XML document that is passed to the adapter - that XML document contains the date-time that I had hardcoded for the target field - 11/06/2005 11:00:01 AM

Does anyone had this date-time field updation experience with XI SOAP adapter or another other XI adapter ( JDBC ?? )

Thank you in advance for your time and help.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member189324
Contributor
0 Kudos

Hi Karhtik,

Check the Data Type for date and time in the WSDL. If it is declared as string it is ok, but if they are declared as of type Date or Time, then you have to check you Proxy structure type.

Rather than sending the constant values from your proxy code, why dont you send them as the regular input values, and change those values in the message mapping if the format does not match with your SQL Table format.

Thanks

Prasad

Former Member
0 Kudos

Prasad

Appreciate your getting back to me.

In the WSDL, the xsd data type for the date-time field is xsd:dateTime ( not a string )

I have a corresponding source field in my o/b message interface ( out of which the client proxy is generated on the R/3 system )- that is of type xsd:DateTime

But I find that in the generated proxy structure ( that is generated out of the above mentioned message interface ), the corresponding field is set to a string data type . Could this be causing the problem ? I am not sure what you mean when you say - 'check the Proxy structure type'?

Also, currently , just for testing,

1) I am setting the value of this field from the calling ABAP application - that calls the async proxy method - by concatenating sy-datum & sy-uzeit . This gives a value for the field before mapping - for eg 20051107063001 ( YYYYMMDDHHMMSS format )

2)and then in the message mapping , I am setting the field value to the required format - that required by the webservice and the one that works when fed to the webservice in a standalone -screen testing mode.

This format is YYYY-MM-DD HH:MM:SS (2005-11-05 06:30:01)

This date value in this format is very much accepted by the webservice when tested in a standalone mode.

I checked the target XML message - after mapping - in XI's SXMB_MONI. The date value is exactly as described above. But still I get this SOAP adapter error message with the invalid date-time error...whereas it works when the webservice is screen tested on its server.

Would appreciate your further input on this...

Former Member
0 Kudos

Prasad

Got this problem fixed now !!! I put a technical context object java function for TIME_SENT and mapped the CONSTANT output of this function to the datetime field of the webservice - and the webservice call went through fine without problems !!!

Thanks for your input.