cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service and JDBC

Former Member
0 Kudos

Hi,

I did an SOAP -> XI -> JDBC process and it works. Now I would like to do the same with another database table and I failed. I did the same I did before, but XI response with a time out message. I just added the like-statement. Could be there the mistake?

<b>Request Source</b>

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:MT_Software_request xmlns:ns0="http://namespace">

<softwareID>22</softwareID>

</ns0:MT_Software_request>

<b>Request JDBC:</b>

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:MT_Software_DB_request xmlns:ns0="http://namespace">

- <STATEMENT>

- <TABLENAME action="SELECT">

<TABLE>myTable</TABLE>

- <access>

<softwareID />

<softwarename />

<version />

<manufacturer />

<language />

<lastname />

<firstname />

<department />

<grading />

<price />

<description />

<softwarecategory />

<country />

</access>

- <key1>

<softwareID compareOperation="LIKE">%22%</softwareID>

</key1>

</TABLENAME>

</STATEMENT>

</ns0:MT_Software_DB_request>

<b>Response JDBC:</b>

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Call Adapter

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIAdapterFramework</SAP:Category>

<SAP:Code area="MESSAGE">GENERAL</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'myTable' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '22'.</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

<b>Response Source</b>

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Call Adapter

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="INTERNAL">PL_TIMEOUT</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Timeout condition of pipeline reached</SAP:Stack>

<SAP:Retry>N</SAP:Retry>

</SAP:Error>

Could it be, that there are problems with data type? In XI everything is xsd:string, but the database has a smallint for softwareID.

I could not handle with the error message "Incorrect syntax near..".

<u>Testing web services</u>

I'm not able to install XML Spy or another freeware/shareware tool in my company. Does anybody knew a simple method to test a web service?

Got anyone a java class with authentification to SAP for testing it??

Thanks

Chris

Message was edited by: Christian Riekenberg

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

use the tool shown in this blog to test your webservices,

/people/community.user/blog/2006/09/19/xi-webservice-studio--a-plain-jane-soap-tool

As for the DB problem, Can you try this and see if it works?

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:MT_Software_DB_request xmlns:ns0="http://namespace">

- <STATEMENT>

- <TABLENAME action="SELECT">

<TABLE>myTable</TABLE>

- <access>

<softwareID />

<softwarename />

<version />

<manufacturer />

<language />

<lastname />

<firstname />

<department />

<grading />

<price />

<description />

<softwarecategory />

<country />

</access>

- <key1>

<softwareID compareOperation="LIKE"><b>22%</b></softwareID>

</key1>

</TABLENAME>

</STATEMENT>

</ns0:MT_Software_DB_request>

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Also confirm if the Column Name in your DB table is ,

softwareID .

And, also check for the datatype. Is it Varchar or is it a number? If number then you need to use the attribute, <b>hasQuot= NO</b>

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

I tried it, but without success I will test the

tools for testing web service tomorrow, thanks.

The data type ist definitiv a number. So it could be, that I am not able to check with LIKE. But how can I test a number like 22102006 if I have only first two numbers?? With a * ?? (like this : 22*)?

thanks

chris

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

If it is a number, then you will eed to use the attribute hasQuot= No .

Also, for numbers I dont think a pattern search is possible. Am not a SQL expert though and an SQL guy can surely help as to how this can be done.

Regards,

Bhavesh

Former Member
0 Kudos

That was the solution of the problem.

With hasQuot I can check for a number, but only

for the complete number, no wildcards.

So 10 points for you

Only the link for testing web services is unsatisfied because the tools have to be installed or need other tools. I hoped that someone got a java programm or so for testing web services.

Thanks

chris

Answers (0)