[JBossWS] - Re: Looking to pass complex types in web service...
by PeterJ
So see the SOAP messages on the server, edit the server/xxx/conf/jboss-log4j.xml file, uncommenting the org.jboss.ws.core.MessageTrace category. To see them on the client provide a log4j config file that enables the same category.
Also, have you tried removing the "byte[] photo" field? I am guessing that it might be the cause. If it works without that, we will at least know where to focus our effort.
I was about to say "Please post your mapping.xml file.", but decided to check the options before I did so to make sure that it was not a file that was being generated. But there is no such thing as wscompile in JBoss Web Services. There is a wsconsume, wsprovide, and wsrunclient (and a wstools, but it is for the old-style web services). And based in the command line, it appears that wscompile is part of Sun's web service's implementation. You really need to sue the JBoss Web Service tools.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167088#4167088
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167088
17 years, 8 months
[JBossWS] - JBoss WS security throws javax.xml.ws.WebServiceException: o
by r12345_2003
Hi all,
I am using Jboss Web services and WS security. I have Jboss version 4.2.2 GA. My web service is implemented as a stateless EJB. The problem is when I invoke the web service from a client application, the following exception is thrown:
| javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
| org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
| org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
| org.jboss.ws.core.jaxws.client.ClientImpl.callResponseHandlerChain(ClientImpl.java:168)
| org.jboss.ws.core.CommonClient.invoke(CommonClient.java:363)
| org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
| org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
| org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
| $Proxy119.getUserDetailsFromURSID(Unknown Source)
| test.filter.base.SecurityFilter.getUserDetails(SecurityFilter.java:274)
| test.filter.base.SecurityFilter.doFilter(SecurityFilter.java:166)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| root cause
|
| org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
| org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
| org.jboss.ws.extensions.security.WSSecurityDispatcher.handleInbound(WSSecurityDispatcher.java:177)
| org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:78)
| org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient.handleInbound(WSSecurityHandlerClient.java:40)
| org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
| org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
| org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
| org.jboss.ws.core.jaxws.client.ClientImpl.callResponseHandlerChain(ClientImpl.java:168)
| org.jboss.ws.core.CommonClient.invoke(CommonClient.java:363)
| org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
| org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
| org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
| $Proxy119.getUserDetailsFromURSID(Unknown Source)
| test.filter.base.SecurityFilter.getUserDetails(SecurityFilter.java:274)
| test.filter.base.SecurityFilter.doFilter(SecurityFilter.java:166)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
|
There are no exceptions in the server log or the client logs.
When I deploy the web service on my windows box, it works fine, I get the above error only when I'm running the web service on my linux environment. This makes me think that there may be some configuration error in my linux environment. However, I checked the most likely reasons like a misconfigured login-conf.xml, or a missing jboss-wsse-server.xml or a missing jboss-wsse-client.xml and it looks fine.
Another thing to mention is the debug statements inside the web service method being invoked are printed, however the control doesnt return to the client. Does anyone have any idea what is going on? Any help would be greatly appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167042#4167042
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167042
17 years, 8 months
[JBossWS] - Re: Looking to pass complex types in web service...
by dakk
Wow... ok I am apparently SLOW. I thought you were providing a solution! I didn't see my previous post (which obviously has hidden XML)! Here is the XML for running wscompile:
Btw, is there a way to see the XML that is being sent? Not that I could remedy the problem, but the stub code that wscompile is generating is compiled. I prefer to be able to instrument this so I can see what xml it is passing around.
Thanks!!
Norm
| <target name="run-wscompile" depends="prepare">
| <exec executable="C:/Sun/jwsdp-2.0/jaxrpc/bin/wscompile.bat">
| <arg value="-classpath" />
| <arg value="${build.dir}/classes" />
| <arg value="-gen:both" />
| <arg value="-f:rpcliteral" />
| <arg value="-mapping" />
| <arg value="${src.dir}/myService/meta/mapping.xml" />
| <arg value="-d" />
| <arg value="${src.dir}/myService/server/wsdl" />
| <arg value="${src.dir}/myService/server/config.xml" />
| </exec>
| </target>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167040#4167040
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167040
17 years, 8 months
[JBossWS] - Newbie question : What does it mean...
by xinhua
Hi all,
I have a Jboss WS which handles 50,000 SOAP requests everyday. Almost every 10,000 requests i got an Exception:
ERROR org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS - SOAP request exception
| org.jboss.ws.core.CommonSOAPFaultException: Read timed out
| at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:93)
| at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:280)
| at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:195)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:447)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
|
I know it is an Exception about "Read Time", but , read what??? read request from client or something comes from server? What could it be?
Lots of thanks in advance for any explanation/help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166948#4166948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166948
17 years, 8 months
[JBossWS] - Re: Looking to pass complex types in web service...
by dakk
Thanks for your help! Norm
The class is:
========
import java.util.Date;
/**
*
* @author dakk
*/
public class DataRecord implements java.io.Serializable {
public String fileName;
public byte[] photo; //as an array of base64-encoded bytes
public Float salary;
public Float d2;
public Float d3;
public Float d4;
public Date date;
public Integer empID;
public Float d5;
public DataRecord() {}
public String toString() {
return "Data Record Filename="+this.fileName;
}
}
Here is the run:
===================================
init:
deps-jar:
compile-single:
run-single:
Contacting webservice at http://localhost:8080/myservlet/MyServletInterface?wsdl
Exception in thread "main" deserialization error: unexpected XML reader state. expected: END but found: START: date
at com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.deserialize(LiteralResponseSerializer.java:331)
at com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInvokerImpl.java:350)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:103)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:486)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:121)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:85)
at $Proxy0.getDataRecord(Unknown Source)
at MyClient.main(MyClient.java:48)
CAUSE:
unexpected XML reader state. expected: END but found: START: date
at com.sun.xml.rpc.streaming.XMLReaderUtil.verifyReaderState(XMLReaderUtil.java:51)
at com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.internalDeserialize(LiteralResponseSerializer.java:373)
at com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.deserialize(LiteralResponseSerializer.java:327)
at com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInvokerImpl.java:350)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:103)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:486)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:121)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:85)
at $Proxy0.getDataRecord(Unknown Source)
at MyClient.main(MyClient.java:48)
Java Result: 1
BUILD SUCCESSFUL (total time: 17 seconds)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166755#4166755
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166755
17 years, 8 months