Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Process Manager (Stardust) » Web Service Application Integration Problem (Getting errors while trying to integrate the WSDL based webservice example)
Web Service Application Integration Problem [message #1058655] Tue, 14 May 2013 15:35 Go to next message
Kunal Suri is currently offline Kunal Suri
Messages: 59
Registered: April 2013
Location: Grenoble, France
Member
Hello Guy,

Greetings!

I am trying to learn how to integrate the Web Service with an activity in a Business process. I was trying to follow the example in the Wiki on Application integration.

http://wiki.eclipse.org/STP/Stardust/KnowledgeBase/Integration/Application/WebServices

I downloaded the .zip file and deployed the Converter business process on Stardust.

I did create my own WSDL as the WSDL from .zip was giving me some errors while testing it for running. Thus, I recreated my own WSDL with the same parameters.

I deployed my service on another instance of Tomcat running on port 8081 (as my Business process is deployed on 8080)

My WSDL is OK and the service runs fine. I tested it on SoapUI tool

But when I run this process from the Stardust Portal, it gives me the following errors:

15:14:32 INFO [ttp-8080-6] ActivityInstanceBean - State change for Activity instance 'InputCelsiusValue', oid: 24 (process instance = 11): Application-->Completed.
15:14:32 INFO [ttp-8080-6] ActivityInstanceBean - Remove from worklists: Activity instance 'InputCelsiusValue', oid: 24 (process instance = 11)
15:14:32 INFO [ttp-8080-6] ActivityInstanceBean - State change for Activity instance 'CelsiusToFarenheit', oid: 25 (process instance = 11): Created-->Created.
15:14:32 INFO [ttp-8080-6] ActivityInstanceBean - State change for Activity instance 'CelsiusToFarenheit', oid: 25 (process instance = 11): Created-->Application.
15:14:33 WARN [ttp-8080-6] LogUtils -
java.lang.IllegalArgumentException: InputSource must have a ByteStream or CharacterStream
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1195)
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1281)
at org.apache.cxf.jaxws.spi.ProviderImpl.readEndpointReference(ProviderImpl.java:379)
at org.eclipse.stardust.engine.extensions.jaxws.addressing.WSAddressing.toJaxwsEndpointReference(WSAddressing.java:68)
at org.eclipse.stardust.engine.extensions.jaxws.app.WebserviceApplicationInstance.invoke(WebserviceApplicationInstance.java:225)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.retrySynchronousApplication(ActivityInstanceBean.java:1486)


Could you please provide me some inputs what is going wrong or what should I change in order to run this activity successfully.

Thanks,
Kunal
Re: Web Service Application Integration Problem [message #1058662 is a reply to message #1058655] Tue, 14 May 2013 15:55 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal Suri
Messages: 59
Registered: April 2013
Location: Grenoble, France
Member
Hello guys,

Could you please let me know if it is possible to attach my WSDL file and the example xpdl file (or any other attachments)in the forum?

I just wanted to know if this feature of 'attaching files' exists so that you can see if there might be some issue with the changes I did to WSDL or XPDL file.

I normally create a WSDL and then generate the Java classes (Axis 1.2) in top down manner. I have deployed the service and it returned me the messages properly.

Please do let me know in case you require these files to help me solve this issue.

Thanks,
Kunal
Re: Web Service Application Integration Problem [message #1058763 is a reply to message #1058662] Tue, 14 May 2013 23:47 Go to previous messageGo to next message
Gudrun Koko is currently offline Gudrun Koko
Messages: 9
Registered: January 2013
Junior Member
Hi Kunal,

Stardust novice myself yet issue might be with JAX-WS being expected by the Stardust engine rather than Axis-2.

Gudrun
Re: Web Service Application Integration Problem [message #1058837 is a reply to message #1058763] Wed, 15 May 2013 11:07 Go to previous messageGo to next message
Vikram Kodak is currently offline Vikram Kodak
Messages: 57
Registered: October 2011
Member
Kunal,

Can you send across the xpdl along with the webservice implementation/changes that you have done to vikram.kodak@sungard.com
Re: Web Service Application Integration Problem [message #1058877 is a reply to message #1058837] Wed, 15 May 2013 14:00 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal Suri
Messages: 59
Registered: April 2013
Location: Grenoble, France
Member
Dear Vikram,

I have sent you the mail as you had asked.

Thanks,
Kunal
Re: Web Service Application Integration Problem [message #1059318 is a reply to message #1058877] Fri, 17 May 2013 13:56 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal Suri
Messages: 59
Registered: April 2013
Location: Grenoble, France
Member
Hi Vikram,

Greetings!

I am trying to create my experimental setup based on Stardust and for the same I need to run some activities in stardust that call the externally deployed web services.

I tried to learn how to connect the Activity in stardust to an external webserver via WSDL file from the example mentioned in Stardust wiki. http://wiki.eclipse.org/STP/Stardust/KnowledgeBase/Integration/Application/WebServices

I downloaded and used the XPDL and WSDL from the example give in .zip file

The zip file has the XPDL and the new WSDL.

I am using Eclipse Helios, WSO2 carbon studio to create the Java skeleton class using Axis 1.2 from the new WSDL. Then I am deploying it on the Tomcat Server 7.0.37 and using the WSDL link.

I tested the WSDL in SOAPUI tool and it returns the message properly.

The WSDL is being loaded properly in the Application but when I deploy it gives and error like:

15:14:32 INFO [ttp-8080-6] ActivityInstanceBean - State change for Activity instance 'InputCelsiusValue', oid: 24 (process instance = 11): Application-->Completed.
15:14:32 INFO [ttp-8080-6] ActivityInstanceBean - Remove from worklists: Activity instance 'InputCelsiusValue', oid: 24 (process instance = 11)
15:14:32 INFO [ttp-8080-6] ActivityInstanceBean - State change for Activity instance 'CelsiusToFarenheit', oid: 25 (process instance = 11): Created-->Created.
15:14:32 INFO [ttp-8080-6] ActivityInstanceBean - State change for Activity instance 'CelsiusToFarenheit', oid: 25 (process instance = 11): Created-->Application.
15:14:33 WARN [ttp-8080-6] LogUtils -
java.lang.IllegalArgumentException: InputSource must have a ByteStream or CharacterStream
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1195)
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1281)
at org.apache.cxf.jaxws.spi.ProviderImpl.readEndpointReference(ProviderImpl.java:379)
at org.eclipse.stardust.engine.extensions.jaxws.addressing.WSAddressing.toJaxwsEndpointReference(WSAddressing.java:68)
at org.eclipse.stardust.engine.extensions.jaxws.app.WebserviceApplicationInstance.invoke(WebserviceApplicationInstance.java:225)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.retrySynchronousApplication(ActivityInstanceBean.java:1486)

I just went through the docmunetation again and saw this :

Using Classes Generated With Axis
Up to release 4.5, Infinity was using the axis 1.2 library to invoke a Web Service. Since then Infinity uses a JAX-WS based library because it offers a broader choice of implementing libraries. The engine now invokes abstract JAX-WS Web services, independent of the underlying JAX-WS implementation.
If you are a developer, you need to take care of the following:
1. If you have used the old Web Service application type with mapped classes generated using axis 1.2, these classes are no longer valid for use with JAX-WS. You must generate new classes using JAXB 2.x. However, the new property pages do contain an option for automatically generation of mapped classes in the current project source folder.
2. In general, classes generated with JAX-WS are not compatible with the classes generated by Axis. When you switch between the technologies, don't forget to regenerate the classes using the selected technology.
However, this does not apply when using xml templates.

Do you think the error is due to the fact that I am using Axis 1.2 to create java skeleton?

Any pointers will be of great help as I am running short on time for completing my experiments .

I am really thankful for you time and support!

Best Regards,
Kunal.
Re: Web Service Application Integration Problem [message #1059319 is a reply to message #1059318] Fri, 17 May 2013 13:56 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal Suri
Messages: 59
Registered: April 2013
Location: Grenoble, France
Member
Hi Vikram,

Greetings!

Sorry to disturb you again but I was trying to figure out if the error was due to Axis 1.2 based web service.

1. I tried to make an Apache Cxf webservice (JAX-WS) thinking that may be last time I was getting an error due to using of Axis 1.2. based web services.

2. I created a web service using Apache Cxf 2.7.4 (last web service was based on Axis 1.2) . To create this web service I used the eclipse tools ( not through command line). I used the converter.java file (added in this mail) and used the bottom up approach to create a WSDL . < The converter.java file that I downloaded from Stardust link - http://wiki.eclipse.org/images/b/b2/Stardust_Integration_Application_WebServices_Converter.zip>

3. I ran the service and it gave successful results in Soap UI tool. I ran this on the Tomcat 7.0.37 server that is embedded in my Eclipse tool. (I have included the WebConvertor.zip package in this mail that has the convertor.java file and the WSDL that was created).

4. I am using the same XPDL file as in the .zip package from Stardust.

5. But after I ran the Business Process in Stardust it gave me the same error as I was getting for the Axis based service.

18:39:33 INFO [Thread5 ] ForkingDebugInterceptor - --> forked: org.eclipse.stardust.engine.core.runtime.internal.SynchUserSessionToDiskAction@1dd2466a
18:39:33 INFO [ttp-8080-1] ActivityInstanceBean - State change for Activity instance 'InputCelsiusValue', oid: 29 (process instance = 15): Application-->Completed.
18:39:33 INFO [ttp-8080-1] ActivityInstanceBean - Remove from worklists: Activity instance 'InputCelsiusValue', oid: 29 (process instance = 15)
18:39:33 INFO [Thread5 ] ForkingDebugInterceptor - <-- forked.
18:39:33 INFO [ttp-8080-1] ActivityInstanceBean - State change for Activity instance 'CelsiusToFarenheit', oid: 30 (process instance = 15): Created-->Created.
18:39:33 INFO [ttp-8080-1] ActivityInstanceBean - State change for Activity instance 'CelsiusToFarenheit', oid: 30 (process instance = 15): Created-->Application.
18:39:34 WARN [ttp-8080-1] LogUtils -
java.lang.IllegalArgumentException: InputSource must have a ByteStream or CharacterStream
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1195)
.
.
.
.
.
.
.
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
18:39:34 WARN [ttp-8080-1] AuditTrailLogger - java.lang.IllegalArgumentException: InputSource must have a ByteStream or CharacterStream (User: motu (Realm: carnot) (Of the Universe, Master))
18:39:34 INFO [ttp-8080-1] ProcessInstanceBean - State change for Process instance = 15 (Process Definition: CelsiusToFarenheit): Active-->Interrupted.
18:39:34 INFO [ttp-8080-1] AuditTrailLogger - Process instance interrupted. (User: motu (Realm: carnot) (Of the Universe, Master))
18:39:34 INFO [ttp-8080-1] ActivityInstanceBean - State change for Activity instance 'CelsiusToFarenheit', oid: 30 (process instance = 15): Application-->Interrupted.
18:39:34 WARN [ttp-8080-1] AuditTrailLogger - Activity thread interrupted at 'Activity: Celsius To Farenheit', reason: java.lang.IllegalArgumentException: InputSource must have a ByteStream or CharacterStream (User: motu (Realm: carnot) (Of the Universe, Master))
18:39:34 INFO [ttp-8080-1] FiFoJobManager - Enqueued job org.eclipse.stardust.engine.spring.threading.Job@5fb04e9. Scheduled queue length is now 1
18:39:34 INFO [Thread1 ] FiFoJobManager - Adding job org.eclipse.stardust.engine.spring.threading.Job@5fb04e9. Active jobs queue length is now 1
18:39:34 INFO [Thread6 ] Parameters - CARNOT version: 1.0.0.46
18:39:34 INFO [Thread6 ] ForkingDebugInterceptor - --> forked: Process interruption janitor, pi = 15
18:39:34 INFO [Thread6 ] ForkingDebugInterceptor - <-- forked


Please let me know your thoughts on this? Surely there is some point that I might be missing and your help would be really appreciated in my current situation.

Thanks for your time!

Best Regards,
Kunal.
Re: Web Service Application Integration Problem [message #1059323 is a reply to message #1059319] Fri, 17 May 2013 14:01 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal Suri
Messages: 59
Registered: April 2013
Location: Grenoble, France
Member
Hi Vikram,

Greetings!

I did some other hit and trials and found some interesting outcomes that I wanted to share with you all.

Step 1. I tried to create a new test project TestConvertorService and a new process (xpdl file) as I felt that there might be some issues with the xpdl in the .zip file from the Stardust wiki (link in the chain of mails below).

Step 2. I tried to use the service that was created by Apache Cxf running on tomcat on the New Process (TestConvertorService) and it gave me an warning.

If I ignore this warning and proceed with my deployment of the New XPDL File, the step that calls this external service gives and error like:

Error while running a the Service on Tomcat and calling it from the newly created Xpdl file doing the same thing as that in the .zip file from Stardust wiki.

14:21:23 INFO [tp-8080-10] ActivityInstanceBean - State change for Activity instance 'InputTempData', oid: 47 (process instance = 22): Application-->Completed.
14:21:23 INFO [tp-8080-10] ActivityInstanceBean - Remove from worklists: Activity instance 'InputTempData', oid: 47 (process instance = 22)
14:21:23 INFO [tp-8080-10] ActivityInstanceBean - State change for Activity instance 'CallWebApplcaition', oid: 48 (process instance = 22): Created-->Created.
14:21:23 INFO [tp-8080-10] ActivityInstanceBean - State change for Activity instance 'CallWebApplcaition', oid: 48 (process instance = 22): Created-->Application.
14:21:23 WARN [tp-8080-10] LogUtils -
java.lang.NullPointerException
at org.eclipse.stardust.engine.extensions.jaxws.app.WebserviceApplicationInstance.createRequestMessage(WebserviceApplicationInstance.java:536)
at org.eclipse.stardust.engine.extensions.jaxws.app.WebserviceApplicationInstance.invoke(WebserviceApplicationInstance.java:220)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.retrySynchronousApplication(ActivityInstanceBean.java:1486)
.
.
.
.
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
14:21:23 WARN [tp-8080-10] AuditTrailLogger - java.lang.NullPointerException (User: motu (Realm: carnot) (Of the Universe, Master))
14:21:23 INFO [tp-8080-10] ProcessInstanceBean - State change for Process instance = 22 (Process Definition: ConvertorBP): Active-->Interrupted.
14:21:23 INFO [tp-8080-10] AuditTrailLogger - Process instance interrupted. (User: motu (Realm: carnot) (Of the Universe, Master))
14:21:23 INFO [tp-8080-10] ActivityInstanceBean - State change for Activity instance 'CallWebApplcaition', oid: 48 (process instance = 22): Application-->Interrupted.
14:21:23 WARN [tp-8080-10] AuditTrailLogger - Activity thread interrupted at 'Activity: Call WebApplcaition', reason: java.lang.NullPointerException: null (User: motu (Realm: carnot) (Of the Universe, Master))
14:21:23 INFO [tp-8080-10] FiFoJobManager - Enqueued job org.eclipse.stardust.engine.spring.threading.Job@1e1ff0f3. Scheduled queue length is now 1

This is different from the error I was getting the last time. (Can be seen from the below mails).

Step 3. As, we are also doing some tests by running Services on ESB, we thought to give this Service that we ran on the ESB a try and call it from Stardust in the New crated project and Xpdl (TestConvertorService).

Because as per the logic, I just need to provide a WSDL and the tool automatically generates the classes in 'src' folder. All I am supposed to do is map the in and out data (Please correct me otherwise)

Step 4. We used the wsdl that was generated by running Apache Cxf web service on the Fuse ESB (that is based on Apace ServiceMix) and did the same normal process of providing the WSDL path and then mapping the variables (It again automatically generates the classes)

I am really glad to say that my process (same that was giving warning and error with Tomcat based Apache Cxf) ran successfully and gave me the results using the service deployed on the Fuse ESB(Apache ServiceMix ESB).

Step 5. I then tried to use the Service form ESB to run on the WebServicesAppExample.xpd, thinking it might run there too, but it gave me the same error as before i.e

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
14:45:17 WARN [ttp-8080-4] AuditTrailLogger - java.lang.IllegalArgumentException: InputSource must have a ByteStream or CharacterStream (User: motu (Realm: carnot) (Of the Universe, Master))
14:45:17 INFO [ttp-8080-4] ProcessInstanceBean - State change for Process instance = 23 (Process Definition: CelsiusToFarenheit): Active-->Interrupted.

The overall summary:

1. I am able to run my tests scenario using WSDL of convertor service (ws-cxf) from local ESB on the newly created project and business process xpdl ( i.e ConvertorBP.xpdl) but the same fails for the WebServicesAppExample.xpd. with the same error saying AuditTrailLogger - java.lang.IllegalArgumentException: InputSource must have a ByteStream or CharacterStream

Thus, as of now my testing environment is working (with services running on ESB) but I still wanted to bring this issue to your notice.

Thanks a lot for your time!

Regards,
Kunal.
Re: Web Service Application Integration Problem [message #1059500 is a reply to message #1059323] Mon, 20 May 2013 03:25 Go to previous message
Robert Emsbach is currently offline Robert Emsbach
Messages: 118
Registered: October 2011
Location: Singapore
Senior Member

Kunal,

yes, as you saw in the documentation, the WS stacks are not compatible. Is this a legacy web service? Any specific reason why you used Axis 1.2? Nowadays JAX-WS is the standard. If this is new development the I would definitely discourage you from using Axis.

The second example you created uses the newer web service stack - and apparently that worked well. The reason that this service is not working with the older process model is probably that the old model uses another web service application type than the new model you created.

Anyway, I understand your problem is solved. Let me know if not.

Best regards

Robert

[Updated on: Mon, 20 May 2013 03:34]

Report message to a moderator

Previous Topic:Business Process Monitoring
Next Topic:Stardust Tutorial Page Down
Goto Forum:
  


Current Time: Fri Sep 19 13:51:05 GMT 2014

Powered by FUDForum. Page generated in 0.01996 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software