[JBossWS] - how to modify a client so that it works with rpc instead of
by peiguo
On server side, I changed the style annotation of my service: from RPC to DOCUMENT. The client side stopped working. When I first started writing this post, I found teh client side imports javax.xml.rpc.*. i searched through J2EE API and there is no javax.xml.document.
How should I modify my client code? Why is the API's not consistent for those two styles?
| package org.jboss.tutorial.webservice.client;
|
| import org.jboss.tutorial.webservice.bean.Calculator;
|
| import javax.xml.namespace.QName;
| import javax.xml.rpc.Service;
| import javax.xml.rpc.ServiceFactory;
| import java.net.URL;
| import java.io.File;
|
| public class Client
| {
| public static void main(String[] args) throws Exception
| {
| URL url = new URL("http://localhost:8080/tutorial/CalculatorBean?wsdl");
|
| ServiceFactory factory = ServiceFactory.newInstance();
| Service service = factory.createService(url, null);
|
| Calculator calculator = (Calculator) service.getPort(Calculator.class);
|
| System.out.println("" + calculator.add(Integer.parseInt(args[0]), Integer.parseInt(args[1]), args[2]));
| System.out.println("" + calculator.subtract(Integer.parseInt(args[0]), Integer.parseInt(args[1])));
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147684#4147684
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147684
16 years, 10 months
[JBoss jBPM] - New application brewing, need some advice
by johncarl81
Hey guys,
So, I need some advice on starting my latest application. Basically, it is a user management system, based on an 'ARF' (application request form) that we use at our company. It has a pretty simple workflow of approvals and notifications that it runs through with one caveat, the workflow probably will change, and additional ARFs will be added to the application for routing and management. I was looking at a variety of workflow engines for this and jBPM stood out among the crowd.
I am thinking that I can just implement a couple of base modules, for the approval processes (who approves what) with a couple other editing and applying roles steps to the process and tie it all together with jBPM.
Does this sound reasonable? Or should I consider some more options?
Thanks for your input.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147678#4147678
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147678
16 years, 10 months
[JBossWS] - ant tests errors: SOAP request exception
by soch
Ran the ant tests on the native jaxws installation.
Saw following errors on the JBOSS AS. Is this normal.
C:\jbossws-3.0.1-native-2.0.4.GA\jbossws-native-dist>ant tests
...
15:03:10,254 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.2.GA/server/default/data/wsdl/jaxws-samples-exception.w
ar/ExceptionEndpointImplService41482.wsdl
15:03:11,364 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.RuntimeException: oh no, a runtime exception occured.
at org.jboss.test.ws.jaxws.samples.exception.server.ExceptionEndpointImpl.throwRuntimeException(ExceptionEndpointImpl.java:3
9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
...
15:03:11,770 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
javax.xml.ws.soap.SOAPFaultException: this is a fault string!
at org.jboss.test.ws.jaxws.samples.exception.server.ExceptionEndpointImpl.throwSoapFaultException(ExceptionEndpointImpl.java
:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
...
& some more simillar SOAP exceptions.
On the client side the ant tests threw following failures:
[junit] Corrupt JPEG data: 1 extraneous bytes before marker 0xc4
[junit] Test org.jboss.test.ws.jaxws.samples.xop.doclit.XOPBareTestCase FAILED
[junit] Running org.jboss.test.ws.jaxws.samples.xop.doclit.XOPHandlerTestCase
[junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 4.313 sec
15:05:00,791 INFO [TestEndpointImpl] echo: Hello
15:05:00,838 INFO [TestEndpointImpl] echo: Hello
15:05:00,854 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://webmethod.samples.jaxws.ws.test.jboss.org/}TestEndpointPort does not co
ntain operation meta data for: {http://webmethod.samples.jaxws.ws.test.jboss.org/}noWebMethod
at org.jboss.ws.core.server.ServiceEndpointInvoker.getDispatchDestination(ServiceEndpointInvoker.java:468)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147674#4147674
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147674
16 years, 10 months
[JBossWS] - Exception making a Webservice call
by amit.sfbay
I am calling a Webservice from the JBoss web container and I am getting the exception given below. The Webservice is deployed in a Websphere server on another box, but this looks like a client side exception to me. What I did was - I used wsconsume to generate the client side stubs from the WSDL and put the jar in web-inf/lib and used it from a servlet.
Any help will be appreciated.
Caused by: javax.xml.ws.soap.SOAPFaultException: Transport level information does not match with SOAP Message namespace URI
at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:69)
at org.jboss.ws.core.jaxws.binding.SOAP12BindingJAXWS.throwFaultException(SOAP12BindingJAXWS.java:117)
at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147670#4147670
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147670
16 years, 10 months