[JBossWS] - Can't get wstools to work for multiple endpoints in JBossWS
by dmitri_furman
Hello,
I am trying to deploy multiple session ejb's as webservices. As of JBoss 1.0.3 new append flag was added to configuration:
<webservices ejb-link="BenefitsValidationService" append="true"/>
While using this flag webservices.xml is not overwritten which is exactly the behavior that I need. However, the name space is only specified for the first service. While deploying this webservice JBoss throws exception complaining about not being able to find elements in the namespace specified. Below are the configuration files that I use and the webservices.xml file that gets produced.
If anyone knows of the workaround for this issue I would really appreciate hearing about it. Thank you.
Address Validation (1st service) configuration:
<java-wsdl>
<namespaces target-namespace="http://edv.etenet.com/AddressValidationService"
type-namespace="http://edv.etenet.com/AddressValidationService/types"/>
<webservices ejb-link="AddressValidationService" append="true"/>
</java-wsdl>
BenefitsValidation (2nd service) configuration:
<java-wsdl>
<namespaces target-namespace="http://edv.etenet.com/BenefitsValidationService"
type-namespace="http://edv.etenet.com/BenefitsValidationService/types"/>
<webservices ejb-link="BenefitsValidationService" append="true"/>
</java-wsdl>
Resulting webservices.xml file. Please note xmlns:impl='http://edv.etenet.com/AddressValidationService' specified. JBoss Assumes that it can find BenefitsValidationService also in xmlns:impl. Wstools does not create a different namespace:
<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://edv.etenet.com/AddressValidationService' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
<webservice-description>
<webservice-description-name>AddressValidationService</webservice-description-name>
<wsdl-file>META-INF/wsdl/AddressValidationService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/AddressValidationService-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>AddressValidationServiceSEIPort</port-component-name>
<wsdl-port>impl:AddressValidationServiceSEIPort</wsdl-port>
<service-endpoint-interface>com.psc.edv.avs.ejb.AddressValidationServiceSEI</service-endpoint-interface>
<service-impl-bean>
<ejb-link>AddressValidationService</ejb-link>
</service-impl-bean>
</port-component>
</webservice-description>
<webservice-description>
<webservice-description-name>BenefitsValidationService</webservice-description-name>
<wsdl-file>META-INF/wsdl/BenefitsValidationService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/BenefitsValidationService-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>BenefitsValidationServiceSEIPort</port-component-name>
<wsdl-port>impl:BenefitsValidationServiceSEIPort</wsdl-port>
<service-endpoint-interface>com.psc.edv.bvs.ejb.BenefitsValidationServiceSEI</service-endpoint-interface>
<service-impl-bean>
<ejb-link>BenefitsValidationService</ejb-link>
</service-impl-bean>
</port-component>
</webservice-description>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980401#3980401
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980401
17 years, 8 months
[JBossWS] - web services client
by koriel
I want to implement a user authentication service using web services..so I have these classes
| package server.webservices;
|
| import javax.ejb.Local;
| import javax.ejb.Remote;
|
| @Local
| @Remote
| public interface LoginService
| {
| public boolean Authenticate(String userid,String passid);
| }
|
| package server.webservices;
|
| import javax.ejb.Local;
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
|
|
| @Stateless
| @Local( { LoginService.class } )
| @Remote( { LoginService.class } )
|
| @WebService(name = "LoginService",
| serviceName = "LoginService",
| endpointInterface = "server.webservices.LoginServiceSEI"
| )
| public class LoginServiceBean implements LoginService
| {
|
| @WebMethod
| public boolean Authenticate(String userid, String passid)
| {
| //testing
| return true;
| }
|
|
| }
|
| package server.webservices;
|
| import java.rmi.Remote;
| import java.rmi.RemoteException;
|
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| import org.jboss.annotation.ejb.RemoteBinding;
| import org.jboss.ws.annotation.PortComponent;
|
| @WebService(name = "LoginService",
| serviceName = "LoginService"
| // See JSR-181 for exact details: http://jcp.org/aboutJava/communityprocess/mrel/jsr181/index.html
| )
|
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
| use = SOAPBinding.Use.LITERAL,
| parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
|
| /*
| * BossWS propriatary annotations
| */
| @RemoteBinding(jndiBinding = "/ejb3/EJBLoginServiceSEI")
| @PortComponent(transportGuarantee="NONE",
| contextRoot = "/",
| urlPattern="/server/soap/LoginService")
| public interface LoginServiceSEI extends Remote
| {
|
|
| public boolean Authenticate(String userid,String passid) throws RemoteException;
| }
|
so I use wstools.sh to generate the client classes and I have four classes
| /*
| * JBossWS WS-Tools Generated Source
| *
| * Generation Date: Thu Oct 12 14:16:24 CEST 2006
| *
| * This generated source code represents a derivative work of the input to
| * the generator that produced it. Consult the input for the copyright and
| * terms of use that apply to this source code.
| */
|
| package client.webservices.client;
|
|
| public class Authenticate
| {
|
| protected java.lang.String string_1;
|
| protected java.lang.String string_2;
| public Authenticate(){}
|
| public Authenticate(java.lang.String string_1, java.lang.String string_2){
| this.string_1=string_1;
| this.string_2=string_2;
| }
| public java.lang.String getString_1() { return string_1 ;}
|
| public void setString_1(java.lang.String string_1){ this.string_1=string_1; }
|
| public java.lang.String getString_2() { return string_2 ;}
|
| public void setString_2(java.lang.String string_2){ this.string_2=string_2; }
|
| }
|
| /*
| * JBossWS WS-Tools Generated Source
| *
| * Generation Date: Thu Oct 12 14:16:24 CEST 2006
| *
| * This generated source code represents a derivative work of the input to
| * the generator that produced it. Consult the input for the copyright and
| * terms of use that apply to this source code.
| */
|
| package client.webservices.client;
|
| public class AuthenticateResponse
| {
|
| protected boolean result;
| public AuthenticateResponse(){}
|
| public AuthenticateResponse(boolean result){
| this.result=result;
| }
| public boolean isResult() { return result ;}
|
| public void setResult(boolean result){ this.result=result; }
|
| }
|
| /*
| * JBossWS WS-Tools Generated Source
| *
| * Generation Date: Thu Oct 12 14:16:24 CEST 2006
| *
| * This generated source code represents a derivative work of the input to
| * the generator that produced it. Consult the input for the copyright and
| * terms of use that apply to this source code.
| */
| package client.webservices.client;
| public interface LoginService_PortType extends java.rmi.Remote
| {
|
| public client.webservices.client.AuthenticateResponse authenticate(client.webservices.client.Authenticate authenticate) throws java.rmi.RemoteException;
| }
|
| /*
| * JBoss, the OpenSource EJB server
| * Distributable under LGPL license. See terms of license at gnu.org.
| */
|
| //Auto Generated by jbossws - Please do not edit!!!
|
| package client.webservices.client;
|
|
| import javax.xml.rpc.*;
|
|
| public interface LoginService_Service extends javax.xml.rpc.Service
| {
|
| public client.webservices.client.LoginService_PortType getLoginServicePort() throws ServiceException;
|
| }
|
so my question is how can I use those clients classes to implement a request in an ejb3.0 bean class. A small example would be great...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980393#3980393
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980393
17 years, 8 months
[JBossWS] - Re: JBossWS Plugin for JBossIDE / Eclipse
by RomeuFigueira
Hi there, I'm using a fresh install of JBossIDE 2.0 Beta 2 along with JBossAS 4.0.5 to which I've added the JDK5 version of JBossWS.
While trying to do the following step: Context Menu - Jboss Ws - Publish as Web Service, I'm getting the following:
Running JBossWS wstools for [ProvisioningService]
| directory: C:\Temp\workspaceJboss\ProvisioningService
| command: cmd.exe /C C:\Temp\jboss-4.0.5.GA\bin\wstools.bat -cp build/classes -config C:\DOCUME~1\ROMEU_~1\LOCALS~1\Temp\wstools-config42134.xml -dest C:\Temp\workspaceJboss\ProvisioningService\src\gen
| ========================================================================="
| .
| WSTools Environment
| .
| JBOSS_HOME: C:\Temp\jboss-4.0.5.GA\bin\\..
| .
| JAVA: C:\Program Files\Java\jdk1.5.0_07\bin\java
| .
| JAVA_OPTS:
| .
| ========================================================================="
| .
| Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
| at java.lang.ClassLoader.defineClass1(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
| at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
| at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
| at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.ws.tools.helpers.ToolsHelper.loadClass(ToolsHelper.java:369)
| at org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGeneration(ToolsHelper.java:110)
| at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
| at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
| at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
Now it seems to be a conflict of java Versions, but I cannot seem to find out why.
Can you help me on this one?
Thanks,
Romeu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980101#3980101
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980101
17 years, 8 months