cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming WebService from PI in Sourcing

Former Member
0 Kudos

Hi Experts,

We are using SAP Sourcing v10 and have a requirement where we need to consume WebService from PI application and send some of the data from SAP Sourcing.

We have checked with our basis team and they have confirmed that netweaver application server is using SAP JVM 6.

The PI has provided us with wsdl file. We have extracted java files using wsdl2java of Apache CXF and then compiled the java files using jdk6 and prepared a jar.

But when basis is trying to deploy the jar on the server they are encountering the error - "The given archive file is not a valid Java EE or SAP specific application."

We have checked and there are no compilation errors and jar is also prepared successfully.

Can anyone provide more inputs on what might be wrong here.

Thanks.

Regards,

Kunal Kandoi

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190023
Contributor
0 Kudos

Hi Kunal,

My suggestion is to rollback to the standard deployment of Sourcing (no custom jar in SCA) and use the approach below to add/use your custom jar:

Regards,

Bogdan

Former Member
0 Kudos

Hi Bogdan,

Thanks for the quick response.

Could you please confirm on below points:

1) Can we prepare the jar with any jdk or it has to be the same jdk version as on Sourcing Server?

2) Do we need any other permissions to access the path (where jar is copied on Sourcing Server) through script.

I would give this approach a try and it should defninitely save loads of time.

Thanks again.

Regards,

Kunal Kandoi

former_member190023
Contributor
0 Kudos

Hi Kunal,

1) Your jar should be compiled for Java 6 (Sourcing runtime version). In all modern IDEs you can compile to any lower compliance level without installing anything. AKA you can have Java8 JDK and compile your project for Java6 compliance.

2) Only requirement is that the OS user running the Sourcing app should have read access to that file. If you ask basis to place the file using that same user you will have no issues.

One additional comment:

- I've not tested the scenario with packed library jars (aka your code is using other libraries and they are exported inside your custom jar). Anyway this should work fine; but if it doesn't you can compile without libraries and load them separately in your script.

Regards,

Bogdan

Former Member
0 Kudos

Thanks a lot Bogdan.

Will give it a try.

Regards,

Kunal Kandoi

Former Member
0 Kudos

Hi Bogdan,

I tried implementing the approach you suggested for using custom Jar files and we were successfully able to establish the connectivity with PI and send the data across. We implemented our code in this way only. Till now we were testing the code as tool bar script only.

But the final requirement is that the code be executed as Scheduled Task using Explicitly Called Script. While trying to execute the code as Scheduled Task, we are getting the namespace error. Means the code is not able to find the class we are trying to import. I think the user for a Scheduled Task is Daemon user and somehow looks like the class path is not being set.

Could you please provide some pointers on how to resolve this error. We have delivery date coming up and got stuck at this last moment.

Your inputs would really help in resolving the issue.

Thanks.

Regards,

Kunal Kandoi