BusinessObjects Board

Unable to import web service method using adapter datastore

Hello,

We’re trying to connect to a web service created with SAP PI. Since the endpoint is an HTTP address instead of an HTTPS we try to connect to the web service through an Adapter Datastore instead of a Web service Datastore.

In SoapUI, we can use both the WSDL and the URL of the WSDL to send a request to the web service and get a response. This can be done from the laptop where the Designer resides as well as from the server where the JobServer is installed.

In our environment, the DS web server (r3adqta1) is separated from the JobServer (rsadqt01).

In the Data Services Management Console, we created a web service Adapter.

In the Designer, we created a Adapter Datastore, selected our JobServer and the newly created Adapter and entered the user name and password.

Data Services accepts the URL for the WSDL, but when we try to open the Datastore, we get an error: “Cannot browse external metadata for adapter instance at r3adqt01:3500”.

When we open the same URL in a browser, it shows the expected WSDL.

When we create an Adapter Datastore and use the direct location of the WSDL (a copy, stored on the file system where it can be reached by the JobServer), we can open the Datastore and see the metadata.

But when we try to import the method, we again get an error: “<unable to connect socket for URL ‘http://r3adqt01:8080/webservice/SIOS_OphalenkvkDaaServicesSios_OphalenkvkDatap2.kvkGetDossierRequest0.xsd’ …”

The name of the xsd seems odd, but is equal to the xsd that is created on my local machine in the folder <LINK_DIR>\ext\webservice. However, the server address is wrong, since it points to the JobServer instead of the DS web server.

On my local machine, we’ve copied the DataServices.html file from the DS web server and placed it in <LINK_DIR>\ext. IT contains:

<META HTTP-EQUIV=Refresh CONTENT= "0; URL= http://r3adqta1:8080/DataServices/">

We also had a look on the axis2.xml file, but nothing was configured there.

It seems that the JobServer is being referenced where the DS web server should have been, but we don’t know where that information should be stored.

Can anybody tell us what’s going wrong and how we can configure/manipulate our environment in order to be able to connect to the web service?

Kind regards,
Gerald

PS. We’re running Designer version 14.0.2.322 and JobServer version 14.0.2.462.
metadata.jpg
second_error.jpg
first_error.jpg


GeraldKeizer :netherlands: (BOB member since 2008-02-14)

any reason you want to use Adapter Datastore and not WebService Datastore ?

if your webserver and job server are on different machine then you will not be able to use the adapter, the reason for this is when you import functions from a WSDL DS will dump the dependent schemas (xsd) used by the WSDL to LINK_DIR\ext\webservice folder and replace the schemaLocation of the XSD’s used in WSDL with the DS WebServer location, the webserver location is read from DataServices.html file

when Designer imports the function metadata it will be able to find the xsd since it’s available through DS WebServer (http://dswebserverhost:port/webservices/abc.xsd)

in your case since webserver and job server are on different machine do the following
copy DataServices.html file on the jobServer machine in LINK_DIR\ext folder, this will tell teh job server the URL of the webserver, else I think it will use the local machine as WS Host

try to import the function it will fail with missing xsd error, but the xsd will be created on job server machine in LINK_DIR\ext\webserver folder, copy all these xsd’s to webserver machine on the same location and now try to import the function


manoj_d (BOB member since 2009-01-02)

Hello Manoj,

Thanks for your answer and suggestions and sorry for my late reply (holidays).

We followed the steps you suggested and seem to get a bit closer to the solution.

We did have an html file called DataServices.html in the folder <LINK_DIR>\ext on the JobServer, but it contained an URL that pointed to itself (the JobServer) intstead of the DS web server. We updated the file. Besides, we copied the xsd’s that were stored on the JobServer to the same location on the DS web server…

Now we are able to import the web services function in the Datastore.

The next step was to see if the function, when called from within a data flow, would give the expected result.

Unfortunately we ran into the next problem; authentication. When we run a data flow that calls the web service function, we get an error:
Error calling function <SIOS_OphalenkvkData>: <Web Services client unable to create a SOAP request to send to the server. Error: Transport error: 401 Error: Unauthorized>…

However, we are doubting whether we should continu and try to make the solution with the adapter datastore work adequate, or we should switch strategies and try to make it work using the webservice datastore, instead.

Do you have any suggestions?


GeraldKeizer :netherlands: (BOB member since 2008-02-14)

Transport error: 401 Error: Unauthorized error will happen when your webservice requires authorization and you are not passing the username and password required for this

in the datastore advanced property you will see the option to pass the HTTP Basic Authentication username and password, enter those values and job should run fine


manoj_d (BOB member since 2009-01-02)

Hello,

In SoapUI (version 4.5.1) I’m using the same wsdl. When I choose the the http endpoint, enter the username and password and set the Authentication Type to “Preemptive”, I get a response when sending a request.

In DS, I enter the same username and password in the advanced, but have no option to change the Authentication Type (I don’t know exactly what it does). However, I (still) get the error: “Transport error: 401 Error: Unauthorized”.

I entered screenshots of the property settings in DS as well as in SoapUI…

Are there any additional suggestions?
DS Datastore Properties.png
SoapUI Properties.png


GeraldKeizer :netherlands: (BOB member since 2008-02-14)

try the following
in the adapter configuration add the following to the Additional JVM args
-Dhttpclient.authentication.preemptive=true

Restart the adapter instance


manoj_d (BOB member since 2009-01-02)

Hello Manoj,

I entered the additional JVM arg (see screenshot) and restarted the adapter instance as well as the real-time service… but unfortunately, it did not solve the problem, yet (although I think it is needed to make it work in the end).

I checked out the adapter instance logs. I see the following in the trace log (complete trace log attached):

11/1/12 8:23:46 AM Thread[Thread-5,5,main] 	Receive message: BrokerMessage(
_e.ErrorsTo=com.acta.adapter.Manager
_e.Timestamp=Thu Nov  1 08:23:46 2012

When I start a DS job that calls the web service, the first log entry added to the trace log is:


_e.SourceTimeoutLength=10000
_e.MessageID=1973
_e.Destination=adapter.WebServiceSAPPI
_e.MessageType=MSG_ADAPTER_STATUS
_e.ReplyTo=com.acta.adapter.Manager
_e.CorrelationID=1972_com.acta.adapter.Manager
_e.Source=com.acta.adapter.Manager)
11/1/12 9:03:40 AM Thread[Thread-10,5,main] 	Receive message:  BrokerMessage(
_e.ErrorsTo=com.acta.adapter..client.dataAndMetadata_364
_e.Timestamp=Thu Nov  1 09:03:40 2012

Also, a log entry has been added to the error log:


11/1/12 9:03:40 AM 	Web Services client unable to create a SOAP request to send to server.  Error: Transport error: 401 Error: Unauthorized

I don’t know why the SOAP request can not be created. Has it something to do with ErrorsTo=com.acta.adapter.Manager, or is it an authentication problem?

It does not matter what username/password (valid or invalid) I enter in the Adapter Datastore, in conjunction with the request to the webservice. The result is always the same. Should I enter the username and password as JVM args for the webservice adapter, too? If yes, can you tell me how I have to enter them?

Kind regards and I’m looking forwards to see the next reply.
Adapter Instance.zip (48.0 KB)


GeraldKeizer :netherlands: (BOB member since 2008-02-14)

looks like it’s not taking the command line option or it can’t be passed as command line option

have you filed a case with support for this ? I can make the changes for setting the preemptive authentication and test in your env


manoj_d (BOB member since 2009-01-02)

Our OSS number for this case is 954220 / 2012…


GeraldKeizer :netherlands: (BOB member since 2008-02-14)

Hi Gerald, Manoj,

by any chance did you find a resolution to this issue?

thanks
icytrue


icytrue (BOB member since 2006-04-10)

what is the error you are running into ? the above reported issue was resolved I think

do you also have a ticket open with SAP ? if yes, what is the number ?


manoj_d (BOB member since 2009-01-02)