[JBossWS] - Re: How do you set the transfer-encoding
by bf109e
Hi,
I think I have a similar problem.
I'm just starting to learn JBoss and J2EE.
I just inherited a huge Web project running on JBoss. Part of this inheritance is the truckload of bugs, of course.
My problem is:
The server always serves up pages with the charset set to "Shift_JIS", even if the JSP pages explicitly states that the pages should have UTF-8 charset and encoding.
Hence, once the pages are served, if you do a view-source, you'll see all the JSP code stating UTF-8 as the charset+encoding.
However, if you submit a form, the parameters in the URI are all encoded in SJIS, thereby causing never-ending probelms on the server side.
What do I need to do to make the pages served as UTF-8? Are there any configuration settings I need to override?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972494#3972494
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972494
19 years, 7 months
[JBossWS] - org.jboss.ws.WSException: Cannot obtain java type mapping fo
by tim.cockle
Hi All,
I hope you can help me as I have been knocking me head against a wall for a couple of days now. I can seem to get a simple hello service working for document/literal.
The problem is this I have a simple SLSB which I am using as a web service:
| package myejbws;
|
| import java.rmi.RemoteException;
|
| import javax.ejb.EJBException;
| import javax.ejb.SessionBean;
| import javax.ejb.SessionContext;
|
| import javax.ejb.CreateException;
|
| /**
| * @ejb.bean name="Hello"
| * display-name="Name for Hello"
| * description="Description for Hello"
| * jndi-name="ejb/Hello"
| * type="Stateless"
| * view-type="all"
| *
| */
| public class HelloBean implements SessionBean {
|
| public void setSessionContext(SessionContext ctx)
| throws EJBException,
| RemoteException {
| System.out.println("HelloBean.setSessionContext");
| }
|
| public void ejbRemove() throws EJBException, RemoteException {
| System.out.println("HelloBean.ejbRemove");
|
| }
|
| public void ejbActivate() throws EJBException, RemoteException {
| System.out.println("HelloBean.ejbActivate");
|
| }
|
| public void ejbPassivate() throws EJBException, RemoteException {
| System.out.println("HelloBean.ejbPassivate");
|
| }
|
| /**
| * Default create method
| *
| * @throws CreateException
| * @ejb.create-method
| */
| public void ejbCreate() throws CreateException {
| System.out.println("HelloBean.ejbCreate");
| }
|
| /**
| *
| * @ejb.interface-method view-type="all"
| * @param name
| * @return
| * @throws EJBException
| * @throws RemoteException
| */
| public String sayHello(String name) {
| System.out.println("HelloBean.sayHello("+name+")");
| return "Hello " +name+" from HelloBean";
| }
|
I have used the SWTool with the following config:
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <configuration xmlns="www.aware-services.co.uk/ws">
| <java-wsdl>
| <service name="HelloService"
| style="document"
| endpoint="myejbws.HelloEndpoint"/>
| <namespaces target-namespace="www.aware-services.co.uk/ws/hello"
| type-namespace="www.aware-services.co.uk/ws/hello/types"/>
| <mapping files="jaxrpc-mapping.xml"/>
| <webservices ejb-link="Hello"/>
| </java-wsdl>
| </configuration>
|
If I set the style to rpc all deploys fine and the client works as well.
However when I change the style to document, create and compile the additional class created by the WSTool, it deploys but I get the following error from the client:
anonymous wrote :
| tim@Monkey:~/workspace/TestWSEJB$ ant run-client
| Buildfile: build.xml
|
| ejbdoclet:
| [ejbdoclet] 0 [main] INFO XDocletMain.start - Running
| [ejbdoclet] 214 [main] INFO XDocletMain.start - Running
| [ejbdoclet] 221 [main] INFO XDocletMain.start - Running
| [ejbdoclet] 225 [main] INFO XDocletMain.start - Running
| [ejbdoclet] 229 [main] INFO XDocletMain.start - Running
| [ejbdoclet] 235 [main] INFO XDocletMain.start - Running <service-endpoint/>
| [ejbdoclet] 239 [main] INFO XDocletMain.start - Running
| [ejbdoclet] 302 [main] INFO XDocletMain.start - Running
|
| compile:
|
| run-client:
| [java] Welcome
| [java] Contacting webservice at http://Monkey:8080/hello/Hello?wsdl
| [java] set up service...
| [java] log4j:WARN No appenders could be found for logger (org.jboss.ws.metadata.JSR109ClientMetaDataBuilder).
| [java] log4j:WARN Please initialize the log4j system properly.
| [java] org.jboss.ws.WSException: Cannot obtain java type mapping for: {www.aware-services.co.uk/ws/hello/types}sayHello
| [java] at org.jboss.ws.metadata.JSR109MetaDataBuilder.buildParameterMetaDataDoc(JSR109MetaDataBuilder.java:442)
| [java] at org.jboss.ws.metadata.JSR109MetaDataBuilder.setupOperationsFromWSDL(JSR109MetaDataBuilder.java:193)
| [java] at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:207)
| [java] at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:122)
| [java] at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:78)
| [java] at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
| [java] at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| [java] at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| [java] at myclient.HelloWsEjbClient.main(Unknown Source)
|
| BUILD SUCCESSFUL
| Total time: 4 seconds
|
I have looked in the WSDL and the mappings files and they look fine. The WSDL is as follows:
|
| <definitions name="HelloService" targetNamespace="www.aware-services.co.uk/ws/hello">
|
| <types>
|
| <schema targetNamespace="www.aware-services.co.uk/ws/hello/types">
|
| <complexType name="sayHello">
|
| <sequence>
| <element name="String_1" nillable="true" type="string"/>
| </sequence>
| </complexType>
|
| <complexType name="sayHelloResponse">
|
| <sequence>
| <element name="result" nillable="true" type="string"/>
| </sequence>
| </complexType>
| <element name="sayHello" type="tns:sayHello"/>
| <element name="sayHelloResponse" type="tns:sayHelloResponse"/>
| </schema>
| </types>
|
| <message name="HelloEndpoint_sayHello">
| <part element="ns1:sayHello" name="parameters"/>
| </message>
|
| <message name="HelloEndpoint_sayHelloResponse">
| <part element="ns1:sayHelloResponse" name="result"/>
| </message>
|
| <portType name="HelloEndpoint">
|
| <operation name="sayHello">
| <input message="tns:HelloEndpoint_sayHello"/>
| <output message="tns:HelloEndpoint_sayHelloResponse"/>
| </operation>
| </portType>
|
| <binding name="HelloEndpointBinding" type="tns:HelloEndpoint">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
| <operation name="sayHello">
| <soap:operation soapAction=""/>
|
| <input>
| <soap:body use="literal"/>
| </input>
|
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
|
| <service name="HelloService">
|
| <port binding="tns:HelloEndpointBinding" name="HelloEndpointPort">
| <soap:address location="http://Monkey:8080/hello/Hello"/>
| </port>
| </service>
| </definitions>
|
The same thing happens if you use RPC but I pass back a non standard class (such as MyDataObject).
HeLp!!!! (Please)
Tim
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972492#3972492
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972492
19 years, 7 months
[Installation, Configuration & Deployment] - EJB3.0 compliant JBoss Server version
by MadanSri
Pls let me know if JBoss 4.0.4 CR2 supports EJB3.0.
I have updated JBoss4.0.1sp1 to JBoss4.0.4 CR2 using patch EJB 3.0 RC6.
but still i get following errors while deploying my EJB3.0 jars
Bean : FileDetailsServiceBO
Section: 10.6.2
Warning: The entity bean's class must implement, directly or indirectly, the jav
ax.ejb.EntityBean interface.
12:11:59,663 WARN [verifier] EJB spec violation:
Bean : FileDetailsServiceBO
Section: 10.6.2
Warning: The entity bean class must be defined as public and abstract.
12:11:59,663 WARN [verifier] EJB spec violation:
Bean : FileDetailsServiceBO
Section: 10.6.1
Warning: The Bean Provider must provide a remote interface and a remote home int
erface or a local interface and a local home interface for the bean.
12:11:59,663 ERROR [MainDeployer] could not create deployment: file:/D:/Program
Files/JBoss/jboss-4.0.1sp1/server/default/deploy/FileDetails.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
d, see above for error messages.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972491#3972491
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972491
19 years, 7 months
[Installation, Configuration & Deployment] - File not found Error while starting JBOSS
by priytamaj
while starting jboss, I am getting error as : I would be greatful if somebody tries to solve this issue.
---------------------------START ERROR-------------------------------------------
11:17:57,750 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
11:17:58,500 ERROR [STDERR] java.io.FileNotFoundException: C:\jboss\bin\config\security.properties (The system cannot find the path specified)
11:17:58,500 ERROR [STDERR] at java.io.FileInputStream.open(Native Method)
11:17:58,500 ERROR [STDERR] at java.io.FileInputStream.(FileInputStream.java:106)
11:17:58,500 ERROR [STDERR] at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
11:17:58,500 ERROR [STDERR] at com.sun.enterprise.iiop.POAEJBORB.(POAEJBORB.java:78)
11:17:58,531 ERROR [STDERR] at java.lang.Class.forName0(Native Method)
11:17:58,531 ERROR [STDERR] at java.lang.Class.forName(Class.java:219)
11:17:58,531 ERROR [STDERR] at org.omg.CORBA.ORB.create_impl(ORB.java:295)
11:17:58,531 ERROR [STDERR] at org.omg.CORBA.ORB.init(ORB.java:336)
11:17:58,531 ERROR [STDERR] at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:138)
11:17:58,531 ERROR [STDERR] at com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
11:17:58,531 ERROR [STDERR] at com.sun.enterprise.naming.SerialInitContextFactory.(SerialInitContextFactory.java:31)
11:17:58,531 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
11:17:58,531 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
11:17:58,531 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
11:17:58,546 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
11:17:58,546 ERROR [STDERR] at java.lang.Class.newInstance0(Class.java:308)
11:17:58,546 ERROR [STDERR] at java.lang.Class.newInstance(Class.java:261)
11:17:58,546 ERROR [STDERR] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
11:17:58,546 ERROR [STDERR] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
11:17:58,546 ERROR [STDERR] at javax.naming.InitialContext.init(InitialContext.java:219)
11:17:58,546 ERROR [STDERR] at javax.naming.InitialContext.(InitialContext.java:175)
11:17:58,546 ERROR [STDERR] at org.jboss.naming.NamingService.startService(NamingService.java:224)
11:17:58,546 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
11:17:58,546 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
11:17:58,562 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
11:17:58,562 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:17:58,562 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
11:17:58,562 ERROR [STDERR] at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
11:17:58,562 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
11:17:58,562 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
11:17:58,562 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
11:17:58,562 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
11:17:58,562 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
11:17:58,562 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
11:17:58,578 ERROR [STDERR] at $Proxy0.start(Unknown Source)
11:17:58,578 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:414)
11:17:58,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:17:58,578 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:17:58,578 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:17:58,578 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
11:17:58,578 ERROR [STDERR] at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
11:17:58,578 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
11:17:58,578 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
11:17:58,578 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
11:17:58,578 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
11:17:58,578 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
11:17:58,578 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
11:17:58,578 ERROR [STDERR] at $Proxy4.start(Unknown Source)
11:17:58,578 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
11:17:58,593 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:829)
11:17:58,593 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
11:17:58,593 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
11:17:58,593 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:588)
11:17:58,593 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:17:58,593 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:17:58,593 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:17:58,593 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
------------------------------------------------------
However I cannot find config folder in c:\jboss\bin directory. I would like to know that where this congiguration is done while deploying jboss?
Thanks and Regards,
Priytama
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972486#3972486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972486
19 years, 7 months