|
|
Re: How to define mapping for JAXWS web service call [message #1085680 is a reply to message #1085571] |
Tue, 13 August 2013 08:09 |
|
Ravindejit,
1. Did you import the request and response types of the operation from your WSDL as strucutured data types? (import type from URL, can aslo be on the local file system)
2. Then you create two structured data using those two types.
3. Map the request structured data into the activity that your WS application type is connected to, to the request access point.
4. Map the response (access point) from the activity that your WS application type is connected to to the response structured data.
Does this help?
Regards
Rob
|
|
|
Re: How to define mapping for JAXWS web service call [message #1085779 is a reply to message #1085680] |
Tue, 13 August 2013 11:06 |
Ravinderjit Singh Messages: 22 Registered: August 2013 |
Junior Member |
|
|
Rob,
1. No I was not doing it this way, Thanks for your instructions.
I think I am making progress here.
Earlier it used to complain about 'Invalid Access point', but now my first activity got completed successfully.
Still getting error for activity which call WSDL.
Here is the stacktrace.
16:27:47 INFO [ttp-8080-8] ActivityInstanceBean - State change for Activity instance 'InputValue', oid: 7 (process instance = 5): Application-->Completed.
16:27:47 INFO [ttp-8080-8] ActivityInstanceBean - Remove from worklists: Activity instance 'InputValue', oid: 7 (process instance = 5)
16:27:47 INFO [ttp-8080-8] ActivityInstanceBean - State change for Activity instance 'CallWSDL', oid: 8 (process instance = 5): Created-->Created.
16:27:47 INFO [ttp-8080-8] ActivityInstanceBean - State change for Activity instance 'CallWSDL', oid: 8 (process instance = 5): Created-->Application.
16:27:47 WARN [ttp-8080-8] ApplicationException -
org.xml.sax.SAXParseException; systemId: file:///C:/eclipse-kepler/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.eclipse.stardust.engine.core.runtime.utils.XmlUtils.parseSource(XmlUtils.java:816)
at org.eclipse.stardust.engine.core.runtime.utils.XmlUtils.parseString(XmlUtils.java:756)
at org.eclipse.stardust.engine.core.runtime.utils.XmlUtils.parseString(XmlUtils.java:731)
at org.eclipse.stardust.engine.extensions.jaxws.app.WebserviceApplicationInstance.setInAccessPointValue(WebserviceApplicationInstance.java:643)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.processInDataMappings(ActivityInstanceBean.java:1569)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.invokeApplication(ActivityInstanceBean.java:1405)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.invokeApplication(ActivityInstanceBean.java:1223)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.invoke(ActivityInstanceBean.java:1020)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.doStartActivity(ActivityInstanceBean.java:1010)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityInstanceBean.start(ActivityInstanceBean.java:971)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityThread.runCurrentActivity(ActivityThread.java:748)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityThread.run(ActivityThread.java:330)
at org.eclipse.stardust.engine.core.runtime.beans.ActivityThread.schedule(ActivityThread.java:118)
at org.eclipse.stardust.engine.core.runtime.audittrail.management.ActivityInstanceUtils.complete(ActivityInstanceUtils.java:363)
at org.eclipse.stardust.engine.core.runtime.beans.WorkflowServiceImpl.complete(WorkflowServiceImpl.java:905)
at org.eclipse.stardust.engine.core.runtime.beans.WorkflowServiceImpl.complete(WorkflowServiceImpl.java:790)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.stardust.engine.core.runtime.beans.interceptors.CallingInterceptor.invoke(CallingInterceptor.java:29)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.core.runtime.beans.interceptors.POJOExceptionHandler.invoke(POJOExceptionHandler.java:30)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.core.runtime.beans.interceptors.RuntimeExtensionsInterceptor.invoke(RuntimeExtensionsInterceptor.java:34)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.core.runtime.beans.interceptors.GuardingInterceptor.invoke(GuardingInterceptor.java:55)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.core.runtime.beans.interceptors.AbstractLoginInterceptor.performCall(AbstractLoginInterceptor.java:171)
at org.eclipse.stardust.engine.core.runtime.beans.interceptors.AbstractLoginInterceptor.invoke(AbstractLoginInterceptor.java:109)
at org.eclipse.stardust.engine.api.spring.SpringBeanLoginInterceptor.invoke(SpringBeanLoginInterceptor.java:67)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.api.spring.SpringSessionInterceptor.doWithDataSource(SpringSessionInterceptor.java:143)
at org.eclipse.stardust.engine.api.spring.SpringSessionInterceptor.access$000(SpringSessionInterceptor.java:48)
at org.eclipse.stardust.engine.api.spring.SpringSessionInterceptor$1.doInConnection(SpringSessionInterceptor.java:87)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341)
at org.eclipse.stardust.engine.api.spring.SpringSessionInterceptor.invoke(SpringSessionInterceptor.java:81)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.api.spring.SpringConfigurationInterceptor.invoke(SpringConfigurationInterceptor.java:101)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.core.runtime.beans.interceptors.PropertyLayerProviderInterceptor.invoke(PropertyLayerProviderInterceptor.java:129)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.core.runtime.beans.interceptors.DebugInterceptor.invoke(DebugInterceptor.java:55)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.api.spring.SpringTxInterceptor$1.doInTransaction(SpringTxInterceptor.java:66)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.eclipse.stardust.engine.api.spring.SpringTxInterceptor.invoke(SpringTxInterceptor.java:51)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.execute(MethodInvocationImpl.java:68)
at org.eclipse.stardust.engine.core.runtime.beans.InvocationManager.invoke(InvocationManager.java:53)
at com.sun.proxy.$Proxy123.complete(Unknown Source)
at org.eclipse.stardust.engine.api.spring.WorkflowServiceBean.complete(WorkflowServiceBean.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.stardust.engine.api.spring.SpringServiceFactory$SpringServiceInvocationHandler.invoke(SpringServiceFactory.java:178)
at com.sun.proxy.$Proxy123.complete(Unknown Source)
at org.eclipse.stardust.ui.web.processportal.common.PPUtils.complete(PPUtils.java:438)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean.completeCurrentActivityContinue(ActivityDetailsBean.java:1478)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean.access$1000(ActivityDetailsBean.java:138)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean$7.handleEvent(ActivityDetailsBean.java:1455)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean.retrieveOutDataMappingContinue(ActivityDetailsBean.java:1694)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean.retrieveOutDataMapping(ActivityDetailsBean.java:1675)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean.completeCurrentActivity(ActivityDetailsBean.java:1440)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean.processActivityInstance(ActivityDetailsBean.java:1552)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean.showMappedDocumentWarningAndProcessActivity(ActivityDetailsBean.java:1606)
at org.eclipse.stardust.ui.web.processportal.view.ActivityDetailsBean.completeAction(ActivityDetailsBean.java:1424)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
at javax.faces.component.UICommand.broadcast(UICommand.java:89)
at org.eclipse.stardust.ui.web.common.app.tags.TabScopedComponent.broadcast(TabScopedComponent.java:148)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:50)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:169)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:110)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:65)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:51)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:62)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:107)
at com.icesoft.faces.webapp.http.servlet.BlockExpiredSessionRequests.service(BlockExpiredSessionRequests.java:53)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:204)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
16:27:47 WARN [ttp-8080-8] AuditTrailLogger - org.eclipse.stardust.common.error.PublicException: : Content is not allowed in prolog. (User: motu (Realm: carnot) (Of the Universe, Master))
16:27:47 INFO [ttp-8080-8] ProcessInstanceBean - State change for Process instance = 5 (Process Definition: Process Definition 1): Active-->Interrupted.
16:27:47 INFO [ttp-8080-8] AuditTrailLogger - Process instance interrupted. (User: motu (Realm: carnot) (Of the Universe, Master))
16:27:47 INFO [ttp-8080-8] ActivityInstanceBean - State change for Activity instance 'CallWSDL', oid: 8 (process instance = 5): Application-->Interrupted.
16:27:48 WARN [ttp-8080-8] AuditTrailLogger - Activity thread interrupted at 'Activity: Call WSDL', reason: org.eclipse.stardust.common.error.PublicException: : Content is not allowed in prolog. (User: motu (Realm: carnot) (Of the Universe, Master))
Ravinderjit
|
|
|
Re: How to define mapping for JAXWS web service call [message #1085793 is a reply to message #1085779] |
Tue, 13 August 2013 11:33 |
Ravinderjit Singh Messages: 22 Registered: August 2013 |
Junior Member |
|
|
Rob,
This is the Application section getting generated in .xpdl file.
Do you see something wrong here ?
<Applications>
<Application Id="HelloWS" Name="HelloWS">
<ExternalReference location="[url]http://localhost:9090/ws/hello?wsdl[/url]" xref="getHelloWorldAsString" namespace="HelloWorldImplPort"/>
<ExtendedAttributes>
<ExtendedAttribute Name="CarnotExt">
<carnot:Application Oid="53" Type="webservice">
<carnot:ApplicationContexts/>
<carnot:AccessPoints>
<carnot:AccessPoint Oid="54" Id="carnot:engine:endpointAddress" Name="Endpoint Address" Direction="IN" Type="serializable">
<carnot:Attributes>
<carnot:Attribute Name="carnot:engine:className" Value="java.lang.String"/>
<carnot:Attribute Name="carnot:engine:browsable" Value="true" Type="boolean"/>
</carnot:Attributes>
</carnot:AccessPoint>
<carnot:AccessPoint Oid="55" Id="parameters" Name="parameters" Direction="IN" Type="plainXML">
<carnot:Attributes>
<carnot:Attribute Name="carnot:engine:browsable" Value="true" Type="boolean"/>
</carnot:Attributes>
</carnot:AccessPoint>
<carnot:AccessPoint Oid="56" Id="parameters" Name="parameters" Direction="OUT" Type="plainXML"/>
</carnot:AccessPoints>
<carnot:Attributes>
<carnot:Attribute Name="carnot:engine:visibility" Value="Public"/>
<carnot:Attribute Name="synchronous:retry:enable" Value="false" Type="boolean"/>
<carnot:Attribute Name="carnot:engine:wsdlUrl" Value="[url]http://localhost:9090/ws/hello?wsdl[/url]"/>
<carnot:Attribute Name="carnot:engine:wsServiceName" Value="[url]{http://jaxws.ws.example.com/}HelloWorldImplService[/url]"/>
<carnot:Attribute Name="carnot:engine:wsPortName" Value="HelloWorldImplPort"/>
<carnot:Attribute Name="carnot:engine:wsOperationName" Value="getHelloWorldAsString"/>
<carnot:Attribute Name="carnot:engine:wsSoapProtocol" Value="SOAP 1.1 Protocol"/>
<carnot:Attribute Name="carnot:engine:wsInputOrder" Value="parameters"/>
<carnot:Attribute Name="carnot:engine:wsOutputOrder" Value="parameters"/>
</carnot:Attributes>
</carnot:Application>
</ExtendedAttribute>
</ExtendedAttributes>
</Application>
</Applications>
Ravinderjit
[Updated on: Wed, 14 August 2013 11:23] Report message to a moderator
|
|
|
|
|
Re: How to define mapping for JAXWS web service call [message #1086333 is a reply to message #1085914] |
Wed, 14 August 2013 05:07 |
|
Ravinderjit,
it usually work without generating classes in the way I described above. Import the required request and response types as structured data types and use data based on those types as in and out data.
Is that what you did when you got the
org.xml.sax.SAXParseException; systemId: file:///C:/eclipse-kepler/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
?
This seems to be a very low level error that does not involve Stardust code. The xml processor has an issue parsing the xml.
What could be the reason for that? Can you ensure the XML is 100% valid? What is the first character in the file? (Would it be possible to share that file?)
Does the error change if you copy the type into the model when importing it instead of importing it be reference?
Regards
Rob
|
|
|
|
Re: How to define mapping for JAXWS web service call [message #1087036 is a reply to message #1086536] |
Thu, 15 August 2013 03:42 |
|
Ravinderjit,
please try to refresh all the settings and see if there are any validation warning on your data mappings or your application activity.
I think we cannot upload files to the Eclipse forum. Can you share it via dropbox or so? Or you can email it to ippDOTenablingATsunagrdDOTcom.
Rob
|
|
|
|
|
Re: How to define mapping for JAXWS web service call [message #1091869 is a reply to message #1089889] |
Thu, 22 August 2013 04:05 |
|
Ravinderjit,
I downloaded the projects, but did not deploy both of them. To reduce possible error source and to be quicker I
- used hello.wsdl and mocked the service with SOAP UI under the same url (http://localhost:9090/ws/hello?WSDL)
- created a plain vanilla RAD project
- added the hello.xsd from your project to the project's src folder so the modeler could resolve the references to the structured types
- opened your process model, made sure the WSDL loaded without errors from the unchanged URL
- double checked data mappings on the activiy (made no changes)
- started my server and deployed the model
- logged in an ran the process
- stepped through the process.
The request reached SOAP UI successfully and the response was correctly processed by the engine and displayed in the second manual activity.
Could you try if the same works for you?
If yes, in the next step can you replace the service mock with the actual service you generated (no other changes) and see if it still works?
Regards
Rob
[Updated on: Thu, 22 August 2013 04:24] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03284 seconds