[JBossWS] - MTOM JBossWS1.0.2 and JAX-WS2.0
by amon123
Hello.
I am developing WebService by using Jboss.
In the following environments, I want to achieve MTOM.
*Environment*
OS:WindowsXP
IDE:Eclipse3.1.1
JDK:JDK1.5.0_6
Server-Side:JBossWS1.0.2
Client-Side:JAX-WS2.0
I am adding the description of MTOM to WSDL.
<s:element minOccurs="0" maxOccurs="1" name="image" type="s:base64Binary" xmime:expectedContentTypes="image/jpeg" xmlns:xmime="http://www.w3.org/2005/05/xmlmime"/>
The client side does WSDL2Java by using wsimport.
The server side does WSDL2Java by using wstools.
And, I am adding the description of <enable-mtom>true</enable-mtom> to webservices.xml.
And, I am doing Compile and Deploy.
The error occurs if the application is executed, and the image is sent.
Please can the error able to be prevented, and advise if you do very.
*Client-side Exception Message*
XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Premature end of file.
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:251)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:78)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:93)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:83)
at com.sun.xml.ws.encoding.soap.SOAPDecoder.doMustUnderstandProcessing(SOAPDecoder.java:481)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:523)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:288)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:153)
at com.sun.xml.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:85)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:176)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:105)
at $Proxy18.sendImage(Unknown Source)
at jp.co.canon.SessionManage$SendImageThread.run(SessionManage.java:655)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Premature end of file.
at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:548)
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:59)
... 11 more
*Server-side Exception Message*
09:34:12,749 ERROR [SOAPFaultExceptionHelper] SOAP request exception
javax.xml.soap.SOAPException: Unsupported content type: Multipart/Related; start-info="text/xml";
type="application/xop+xml";
boundary="----=_Part_0_9990551.1154997252593"
at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:204)
at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:144)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:200)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at jp.co.canon.AccessFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
09:34:12,749 ERROR [SOAPFaultExceptionHelper] Error creating SOAPFault message
org.jboss.ws.WSException: Cannot obtain NamespaceRegistry, because there is no SOAPMessage associated with this context
at org.jboss.ws.soap.SOAPMessageContextImpl.getNamespaceRegistry(SOAPMessageContextImpl.java:140)
at org.jboss.ws.soap.SOAPMessageContextImpl.getSerializationContext(SOAPMessageContextImpl.java:130)
at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.toSOAPMessage(SOAPFaultExceptionHelper.java:234)
at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(SOAPFaultExceptionHelper.java:188)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:233)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at jp.co.canon.AccessFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
09:34:12,812 ERROR [StandardEndpointServlet] Error processing web service request
javax.xml.rpc.JAXRPCException: Cannot create SOAPFault message for: javax.xml.rpc.soap.SOAPFaultException: Unsupported content type: Multipart/Related; start-info="text/xml";
type="application/xop+xml";
boundary="----=_Part_0_9990551.1154997252593"
at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(SOAPFaultExceptionHelper.java:194)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:233)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at jp.co.canon.AccessFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
09:34:12,812 ERROR [[ReceiveImage]] Servlet.service() for servlet ReceiveImage threw exception
javax.xml.rpc.JAXRPCException: Cannot create SOAPFault message for: javax.xml.rpc.soap.SOAPFaultException: Unsupported content type: Multipart/Related; start-info="text/xml";
type="application/xop+xml";
boundary="----=_Part_0_9990551.1154997252593"
at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(SOAPFaultExceptionHelper.java:194)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:233)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at jp.co.canon.AccessFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963688#3963688
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963688
19 years, 9 months
[JNDI/Naming/Network] - JMS connection problem between different networks
by vabrol
Hello,
I am trying to send JMS message from a server 'InsideFirewall' behind a firewall to another server 'Outsidefirewall' in a different network and a public IP. I need to have 2 way communication setup between these servers. My problem is that I can send messages from server 'outsidefirewall' to 'Insidefirewall' but not the other way around. When I try to get a JMS connection from 'InsideFirewall' to 'outsidefirewall' , I get "java.rmi.ConnectException: Connection refused to host 'OutsideFirwall' --- connection timed out'. However, I can send messages to server 'Outsidefirewall' from few other servers all in different networks and behind firewalls.
There is no problem sending messages from 'OutSideFirewall' to 'InsideFirewall'
I have started the sever 'InsideFirewall' with -Djava.rmi.server.hostname={ip} option and opened the following ports: 1099,8093,1098,4444.Also Uil2-service.xml is configured with ConnectAddress and ConnectPort of extrnal IP.
I would really appreciate any suggestion to point me to right direction.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963687#3963687
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963687
19 years, 9 months
[Installation, Configuration & Deployment] - install error on jboss-installer4.0GA
by kindy_wu
OS :windowXP simple chinese edition
log in install.log
No custom langpack available.
com.izforge.izpack.installer.ResourceNotFoundException: Can not find Resource packsLang.xml for language engcom.izforge.izpack.installer.ResourceNotFoundException: Can not find Resource packsLang.xml for language eng
at com.izforge.izpack.installer.ResourceManager.getLanguageResourceString(ResourceManager.java:137)
at com.izforge.izpack.installer.ResourceManager.getInputStream(ResourceManager.java:154)
at com.izforge.izpack.panels.PacksPanelBase.(PacksPanelBase.java:149)
at com.izforge.izpack.panels.PacksPanel.(PacksPanel.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.izforge.izpack.installer.InstallerFrame.loadPanels(InstallerFrame.java:201)
at com.izforge.izpack.installer.InstallerFrame.(InstallerFrame.java:158)
at com.izforge.izpack.installer.GUIInstaller.loadGUI(GUIInstaller.java:387)
at com.izforge.izpack.installer.GUIInstaller.(GUIInstaller.java:123)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.izforge.izpack.installer.Installer.main(Installer.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Replacing variables in set=default
Variable set.substring(1)=null
Replacing variables in set=default
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963685#3963685
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963685
19 years, 9 months
[Security & JAAS/JBoss] - retry fails with form based authentication woth custom login
by ppradhan
I am using a custom login module which uses a web service to validate a username/password pair, along with form based authentication. Everything works ok for a valid user.
In the case of a wrong username or password, my error page displays a message with a link back to the login page.
Even if I enter the correct username/password, and the logs show my webservice returning correct roles, the login does not succeed, i.e. the empty login form is displayed again.
This does not happen if I reenter the link in the browser address page or open a new browser window.
The html form has
<meta http-equiv="Pragma" content="no-cache"> and I have tried invalidating the session as well.
The logs end with :
16:32:04,656 DEBUG [RealmBase] Username rps1 has role LOCSRV
16:32:04,656 DEBUG [AuthenticatorBase] Successfully passed all security constraints
16:32:04,656 DEBUG [StandardWrapper] Returning non-STM instance
The login module extends the UsernamePasswordLoginModule class, and overrides the initialize(), getUsersPassword(), validatePassword and getRoleSets() methods. jboss bersion 4.0.2
Any pointers?
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963683#3963683
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963683
19 years, 9 months
[JBoss Portal] - Re: Page-level parameters for requests: how to create bookma
by Antoine_h
Hello,
I am thinking of another way, that does not deal do much with servlet and deep mechanism.
if I understand well your will, you want to get some parameters before the rendering process has started, and share them with all the portlets.
For "intercepting" these parameters, you can build your own CommandFactories, derived from the one provided with jbp.
They filters the parameters that you want to share and send them, through a message store, to all the portlets that will need it.
as a message store and sharing parameter implementation, you can use the M. Osmond implementation.
see this post : http://jboss.org/index.html?module=bb&op=viewtopic&t=87442
(this feature of sharing parameters seems also to be in preparation for JSR-168 2.0 and in jbp 2.4 with the access to the portal objects nodes).
The thing is to use the messaging implementation from inside a command factory, to send messages from there instead of from the portlets.
The message must be stored with a reference to a "Session ID".
In a Portlet, it uses the PortletSessionID to send the message.
In the CommandFactory, the message may be sent in the same way, but with providing the session id (coming from the httpSessionId).
There's some work to do to adapt the messaging class, so it can do a send, with other parameters than the PortletRequest.
In the commandFactory, it seem you can retrieve the SessionID from the Invocation => Request => HttpRequest (to check really, I have just had a quick look at it).
To check : the portlet session Id must be the same as the http session id (which should be, but I am not sure the JSR ask for this... and quite sure not...)
To put your command factories in place of the one provided by jbp, you can use the service methods to unregister the ones and register yours in place off, or, more simple, replace the jboss-service.xml with yours, that say to use your classes instead of the one defined.
a lot of work, but it seems ok to work.
I would set first the Messaging Portlet implementation, and check that the session identification for messages can be the same from the one that you get from the command factory, so you can send the message from there.
then see the command factory side.
after, it should be easy. lot of setting, testing and tuning.
the advantage is not to deal with servlet stuff that much, but more "after", when the portal processes the request".
and by using the Messaging implementation, you can use it for other needs. It provide by itself a good way to manage this sharing of parameters issue, and good ideas on how to do it (multiple same portlet on one page, etc...).
hope it may help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963681#3963681
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963681
19 years, 9 months