cancel
Showing results for 
Search instead for 
Did you mean: 

Sybase ESP Studio - integrating own webservice does not work

Former Member
0 Kudos

Hi all,

my colleague has written his own little webservice that generates random temperature data and we are now trying to integrate this webservice across the Web Service SOAP Input Adapter in Sybase ESP Studio. After configuring the Web Service SOAP Input Adapter we created (via schema discovery) an input stream with inline schema, run the project within Sybase ESP Studio but we get no data displayed. You can see our modeled process in Sybase ESP Studio in the attached file ("Project Sybase") and the output in ("Run Project").

Biggest problem is that we don't know what to configure exactly in the adapter_config.file. We have marked the tags were we are unsure what to write with "<??????????????>" comments. (see "adapter_config").

Also in the mappings file (we called it "TempMapping.xml") we have the following content and don't know if thats correct:

<columnMappings>

  <mapping adapterField="getRandomTempResponse._return" espCol="getRandomTempResponse__return"/>

</columnMappings>

Outside Sybase ESP Studio our webservice is running and generates data (we have tested that via "SoapUI").

Does anyone know what the problem could be?

Thanks in advance & regards,

Andreas & Maik

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

You really need to provide the project's "frameworkadapter.log" file in order for us to see what is going on.  This adapter runs as a separate process from the project itself so it writes to that log file rather than the "esp_server.log" (which is what we see in the "Run Project.PNG" screen capture.

As far as the questions in the adapter_config.xml file.  This adapter was built with the Adapter Toolkit.  The Adapter Toolkit has three types of modules (transporters, formatters and espconnectors):

    Event Stream Processor Adapter Toolkit

The adapter_config.xml parameters for this adapter are documented here:

   http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01615.0514/doc/html/cgo1376338716093...

1) The "InstanceName" such as "StockTraderServiceTransporter" is just a generic name to identify and give meaning to that module.

2) The "Next" parameter such as "StockTraderServicePublisher" tells the adapter which module comes next.

3) The "webservice" parameter needs the "name" attribute to identify the name of the web service you want the adapter to connect to (appears to be "GetTemperature" in your case).

4) The "request" parameter needs the "action" attribute which specifies the action performed by the Web service operation that is being called.

5) <Module type="espconnector"> - One of the three types of modules.  An espconnector is a module that publishes to an ESP project or subscribes from the ESP project.  This looks fine and isn't something that should be changed.

6) <Name>EspPublisher</Name> - Name of the module as defined in the modulesdefine.xml file. Don't change this either.

7) Since the "ProjectName" and "StreamName" of the "EspPublisherParameters" are commented out, the adapter should be running in "managed" mode meaning the adapter is started and stopped by the project itself in the "ATTACH ADAPTER" CCL clause.  When "ProjectName" and "StreamName" are commented out, the adapter does not look at the "EspProjects" section because that is all derived from the CCL.

As for the mappings file, I am not sure if that is correct or not.  From your previous posting, I wasn't clear on what was wrong with the "stockTraderMappings.xml" file and why it needed to be modified (I did not have to modify mine).  I don't know what it looked like before and after.  Perhaps there was some kind of localization issue (I'm running everything on a standard U.S. English locale).

The two things that I think might need to be modified in the adapter_config.xml file:

1) Change the back slashes to forward slashes on the "mappingFile" parameter:

    <mappingFile>C:\Sybase\ESP-5_1\adapters\webservices\examples\Temperature\TempMapping.xml</mappingFile>

2) Change the "workingDir" parameter to a valid directory on your PC (and also use forward slashes):

     <workingDir>/tmp/adapter/soap</workingDir>

If the adapter can't find the mapping file, there should be an error in the "frameworkadapter.log" file.

Thanks,

Neal

Former Member
0 Kudos

Hello Neal,

we changed the two parameters as described but could still not get the project run, now we again receive "NULL" values as in the StockTrader project.

Therefore, we think it could be a problem with the Mappings XML File. We are not sure what to enter here for his webservice.

We sent you an email with the whole WebService, maybe you can have a look over it and if required we could do a webex. But only if you have time and it is ok for you.

Thanks a lot for your help.

Regards, Andreas and Maik

Former Member
0 Kudos

Hi Neal,

just want to inform you that the integration of the own webservice worked now.

This is how my colleague could solve the issue:

He followed these two guides:

1) Program webservice with the help of axis2 : Eclipse WTP Tutorials - Creating Bottom Up Web Service via Apache Axis2

2) Create an .aar file for the webservice : https://www.eclipse.org/webtools/community/education/web/t320/Deploying_a_web_service.pdf

Finally you have to put that .aar file into the folder: tomcat\webapps\axis2\WEB-INF\services

Then the integration in Sybase Studio worked.

Hope that helps others to solve similar issues.

Regards, Andreas

Answers (0)