[JBossWS] - Re: Web Service client side
by abdujaparov
Hi, I've searched but I don't uderstand much. I have the service name, the operation name and parameters of the operation and I want invoke the operation.
I've found this code of an axis dynamic client, I've created it but when I meke the call to web service I receive this error:
| Exception in thread "main" AxisFault
| faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
| faultSubcode:
| faultString: For input string: ""
| faultActor:
| faultNode:
| faultDetail:
| {http://xml.apache.org/axis/}stackTrace:For input string: ""
| .....
| .....
|
in the client while jboss give me this error:
| 17:13:27,275 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://tesi/}TesiPort does
| not contain operation meta data for: fattoriale
| at org.jboss.ws.core.server.ServiceEndpointInvoker.getDispatchDestinatio
| n(ServiceEndpointInvoker.java:457)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpoin
| tInvoker.java:176)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHan
| dlerImpl.java:408)
| ....
| ....
| ....
My client code is the following:
| String endpoint = "http://127.0.0.1:8080/Tesi";
| Service service = new Service();
| Call call = (Call) service.createCall();
| call.setTargetEndpointAddress(new java.net.URL(endpoint));
| call.setOperationName("fattoriale");
| call.addParameter("arg0", XMLType.XSD_INT, ParameterMode.IN);
| call.setReturnType(XMLType.XSD_DOUBLE);
| Object[] param = new Object[] {new Integer(6)};
| Double risultato = (Double)call.invoke(param);
| System.out.println(risultato);
|
How do I have to modify in this code?
I've looked for jax-ws but I don't understand anything.
Thanks, bye bye.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100754#4100754
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100754
17Â years, 2Â months
[JBoss Seam] - Re: Seam Text: message format
by mars1412
well, I asked it on a JSF forum - no reply
however, I wrote a simple sample application with JSF on JBoss without SEAM and it worked as expected (but I used jsp instead of facelets)
anyway
I just debugged into the SEAM source and found out, that the problem is, that the messages component (org.jboss.seam.international.Messages) calls SeamResourceBundle.getString() which in turn calls Interpolator.interpolate() before returning the string
so I wrote another simple SEAM example:
| String source = "{0,number,#.#}";
| String interpolated = Interpolator.instance().interpolate(source);
| System.out.println("soruce: '"+source+"'");
| System.out.println("interpolated: '"+interpolated+"'");
|
which prints the following output on stdout:
anonymous wrote :
| 17:02:00,133 INFO [STDOUT] soruce: '{0,number,#.#}'
| 17:02:00,133 INFO [STDOUT] interpolated: '{0}'
|
next test was to create a simple java file, that does following:
| String expr = "{0,number,#.##}";
| String value = new MessageFormat(expr, java.util.Locale.getDefault()).format(null);
| System.out.println("expr : "+expr);
| System.out.println("value: "+value);
|
which results in:
anonymous wrote :
| expr : {0,number,#.##}
| value: {0}
|
so now I know why it does not work, but I'm not sure what to do about it.
| * Is it a problem of the JRE?
| it seems strange to me that format() changes my string, although I do not pass any parameters..
| * Or should Seam's Interpolator.interpolate() not call
| MessageFormat.format() if there are no parameters?
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100752#4100752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100752
17Â years, 2Â months