[jboss-user] [JBoss jBPM] - Re: Problem testing Hello BPEL sample
zauberlehrling
do-not-reply at jboss.com
Sun Dec 17 09:32:08 EST 2006
I have similar problems with the following environment:
1. jBoss BPEL 1.1 Beta2
2. jBoss AS 4.0.5GA
3. jwsdp-2.0
4. jdk 1.5.0_08
5. ANT 1.6.5
I've tried to call the hello-bpel-process with the following code:
public void test()
| {
| try {
| Properties properties = new Properties();
| properties.setProperty("java.naming.provider.url", "jnp://localhost:1099");
| properties.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| properties.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming.client");
| properties.setProperty("j2ee.clientName", "jbpmbpel-client");
| Service service = null;
| if (service == null) {
| InitialContext iniCtx = new InitialContext(properties);
| Object object = iniCtx.lookup("java:comp/env/service/Hello");
| service = (Service)object;
| String portTypeNS = "http://jbpm.org/examples/hello";
| Call call = service.createCall(new QName(portTypeNS, "GreeterPort"),"sayHello");
| String greeting = (String) call.invoke(new Object[] { "Olive" });
| System.out.println("Greeting: "+greeting);
| }
| } catch (Exception e) {
| e.printStackTrace();
| }
|
and I get the following exception:
javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
| at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:127)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
| at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
| at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
| at $Proxy0.lookup(Unknown Source)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at frank.DII.test(DII.java:51)
The exception is thrown by the command in line 51:
| Object object = iniCtx.lookup("java:comp/env/service/Hello");
|
If I try to contact the webservice with the following code:
| public void dii()
| {
| try {
| String endpoint = "http://localhost:8080/hello/greeter?wsdl&resource=hello.wsdl";
| QName qName = new QName(endpoint);
| ServiceFactory serviceFactory = ServiceFactory.newInstance();
| Service service = serviceFactory.createService(qName);
|
| Call call = service.createCall();
| call.setOperationName(new QName(endpoint,"sayHello"));
| call.setTargetEndpointAddress(endpoint);
|
| call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"http://schemas.xmlsoap.org/soap/encoding/");
| call.setProperty(Call.OPERATION_STYLE_PROPERTY, "rpc");
|
| Object[] arguments = new Object[] {"wo"};
| Object result = call.invoke(arguments);
| System.out.println(""+result);
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
|
I get the following exception in the server console:
| 15:02:26,791 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 1m:48s:151ms
| 15:02:59,288 WARN [HandlerWrapper] RuntimeException in handler method, transition to DOES_NOT_EXIST
| 15:02:59,288 ERROR [HandlerChainBaseImpl] RuntimeException in request handler
| java.lang.NullPointerException
| at org.jbpm.bpel.integration.server.SoapHandler.getRequestParts(SoapHandler.java:355)
| at org.jbpm.bpel.integration.server.SoapHandler.sendRequest(SoapHandler.java:299)
| at org.jbpm.bpel.integration.server.SoapHandler.handleRequest(SoapHandler.java:186)
| at org.jboss.ws.handler.HandlerWrapper.handleRequest(HandlerWrapper.java:121)
| ...
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 15:02:59,294 ERROR [SOAPFaultExceptionHelper] SOAP request exception
| java.lang.NullPointerException
| at org.jbpm.bpel.integration.server.SoapHandler.getRequestParts(SoapHandler.java:355)
| at org.jbpm.bpel.integration.server.SoapHandler.sendRequest(SoapHandler.java:299)
| ....
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 15:02:59,305 WARN [HandlerWrapper] Handler is in state DOES_NOT_EXIST, skipping Handler.handleFault for: org.jbpm.bpel.integration.server.SoapHandler at 1c60f74
|
At least this code contacted the bpel engine.
Best regards,
Frank
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994487#3994487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994487
More information about the jboss-user
mailing list