[JBossWS] - Re: error RuntimeModelerException: runtime modeler error: Wr
by Fantagir
Thanks for replay so quickly.
My environment is:
Eclipse and JbossIDE for Eclipse
Jboss 4.0.5 GA
JDK 1.5
JWSDP 2.0
And the code of my client is this:
package webservice;
|
| import java.net.URL;
|
| import javax.xml.namespace.QName;
| import javax.xml.ws.Service;
|
| import util.DatePalabra;
|
| import com.lasalle.util.resources.CollectionProperties;
|
|
| public class MainDevPalabra {
|
| public static void main( String[] args ) throws Exception {
| if( args.length < 1 )
| {
| System.out.println( "Usage: Palabra name" );
| System.exit( 0 );
| }
|
| String argument = args[ 0 ];
|
| DatePalabra dp = new DatePalabra();
|
| //CollectionProperties propietats = new CollectionProperties();
| String urlstr = CollectionProperties.getPropiedad("serviceD.url");
| String nameServiceStr = CollectionProperties.getPropiedad("serviceD.name");
| String namespaceServiceStr = CollectionProperties.getPropiedad("serviceD.namespace");
|
| System.out.println( "Contacting webservice at " + urlstr );
|
| URL url = new URL(urlstr);
|
| //se indican el namespace en el que se encuentra el servicio y su nombre
| //(esto se puede ver en el WSDL)
| QName qname = new QName(namespaceServiceStr,
| nameServiceStr);
|
| Service service = Service.create(url, qname);
|
|
| IContar age = ( IContar) service.getPort( IContar.class );
|
| System.out.println( "age.age(" + argument + ")" );
| dp = (DatePalabra) age.darCuenta(argument);
| System.out.println( "output longitud:" + dp.getLongitud() );
| System.out.println( "output palabra:" + dp.getPalabra() );
| }
|
|
| }
Well, I use the interface that I write in the before.
I'll take a look at the page you tell me.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090968#4090968
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090968
18 years
[JBossWS] - error RuntimeModelerException: runtime modeler error: Wrappe
by Fantagir
Hi!
I've develop a Web Service and its client. I run the WebService and when I run the client appears the next error:
com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class webservice.jaxws.DarCuenta is not found. Have you run APT to generate them?
It's necessary to run APT? When I have to run it? There isn't any way of implements and run the WebService and the client without use the APT?
The code of my WebService:
package service;
|
| import java.rmi.Remote;
| import java.rmi.RemoteException;
|
| import javax.jws.WebMethod;
| import javax.jws.WebResult;
| import javax.jws.WebService;
| import javax.jws.WebParam;
|
| import util.DatePalabra;
|
| @WebService(
| name="IContar", // wsdl:portType
| targetNamespace="urn:service" //wsdl:targetNamespace
| )
| public interface IContar extends Remote {
|
| @WebMethod
| @WebResult(name="IContar_darCuentaResponse")
| public DatePalabra darCuenta(@WebParam(name = "name") String name) throws RemoteException;
| }
|
package service;
|
| import java.rmi.RemoteException;
|
| import javax.jws.WebMethod;
| import javax.jws.WebResult;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| import util.DatePalabra;
|
| @WebService(
| serviceName="Contar", // wsdl:service
| portName= "IContarPort", //wsdl:port name=... binding=...
| endpointInterface = "service.IContar", //nombre de la interficie del WebService
| targetNamespace="urn:service", //wsdl:targetNamespace
| wsdlLocation = "WEB-INF/wsdl/Contar.wsdl" //nombre y ubicación en el proyecto del fichero .wsdl
| )
| @SOAPBinding(
| style=SOAPBinding.Style.RPC,
| use=SOAPBinding.Use.LITERAL
| )
| public class Contar implements IContar{
|
| public DatePalabra darCuenta(String name) throws RemoteException {
| DatePalabra dp = new DatePalabra();
| dp.setLongitud(Integer.toString(name.length()));
| dp.setPalabra(name);
| return dp;
| }
|
| }
|
Thanks for all.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090953#4090953
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090953
18 years
[JBossWS] - JBossWS-2.0.1.GA SOAP 1.2 Web service Problem/issue
by govindaattal
Hi All,
I was creating Web service with SOAP 1.2 binding
bottom-up approach....
| @WebService(name="DLSOAP12Service", targetNamespace="ws.soap12.dlservice" )
| @SOAPBinding(style=SOAPBinding.Style.DOCUMENT)
| @BindingType(value="http://www.w3.org/2003/05/soap/bindings/HTTP/")
| public class DLSOAP12Service
| {
| public String echoString(String input)
| {
| return input;
| }
| }
|
In JBOSS when I looked at the corresponding WSDL in the list of registered service endpoints, I found that the binding with which web service was exposed was of SOAP 1.1
'http://schemas.xmlsoap.org/wsdl/soap/'
I later found from messages on conosle that though according to WSDL web service was exposed with SOAP 1.1 Binding it actually expected SOAP 1.2 envelopes in the messages.
|
| 11:14:58,791 WARN [SOAP12BindingJAXWS] Expected SOAP-1.2 envelope, but got: http://schemas.xmlsoap.org/soap/envelope/
|
|
When client invoked web service with messages in SOAP 1.2 envelopes JBOSS server cmd console didn't gave any warning messages...
Please correct if my observations can be disregarded.
When I created web service in a top-down approach using wsconsume task, it gave me following message
|
| C:\jboss-4.0.5.GA\bin>wsconsume.bat -k e:\SOAP12\DLServiceSOAP12.wsdl
| parsing WSDL...
|
|
| [WARNING] Ignoring SOAP port "DLServiceSOAP12": it uses non-standard SOAP 1.2 binding.
| You must specify the "-extension" option to use this binding.
| line 613 of file:/e:/SOAP12/DLServiceSOAP12.wsdl
|
| [WARNING] Service "DLServiceSOAP12" does not contain any usable ports. try running wsimport with -extension switch.
| line 611 of file:/e:/SOAP12/DLServiceSOAP12.wsdl
|
| generating code...
| ....
| ....
| ....
|
It didnot generate Webservice endpoint interface and client class at all! I was unable to figure out how should I put use of the 'WARNING' that wsconsume tool gave me!
Thanks & Regards,
Govinda Attal.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090889#4090889
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090889
18 years