[JBossWS] - Re: jboss 4.0.2 and SOAP attachments
by DivyaMan0j
Here, is the stack trace :
2007-03-12 20:32:29,852 ERROR [org.jboss.axis.Message] Exception:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: No cache available
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: java.lang.IllegalStateException: No cache available
at org.jboss.axis.attachments.ManagedMemoryDataSource.getInputStream(ManagedMemoryDataSource.java:104)
at javax.activation.DataHandler.getInputStream(DataHandler.java:222)
at org.jboss.axis.attachments.DimeBodyPart.send(DimeBodyPart.java:283)
at org.jboss.axis.attachments.DimeBodyPart.write(DimeBodyPart.java:232)
at org.jboss.axis.attachments.DimeMultiPart.write(DimeMultiPart.java:39)
at org.jboss.axis.attachments.AttachmentsImpl.writeContentToStream(AttachmentsImpl.java:523)
at org.jboss.axis.Message.writeTo(Message.java:583)
at org.jboss.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:1118)
at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:972)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
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 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
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:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
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:619)
org.jboss.axis.AxisFault: No cache available
at org.jboss.axis.AxisFault.makeFault(AxisFault.java:99)
at org.jboss.axis.attachments.AttachmentsImpl.writeContentToStream(AttachmentsImpl.java:527)
at org.jboss.axis.Message.writeTo(Message.java:583)
at org.jboss.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:1118)
at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:972)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
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 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
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:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
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:619)
Caused by: java.lang.IllegalStateException: No cache available
at org.jboss.axis.attachments.ManagedMemoryDataSource.getInputStream(ManagedMemoryDataSource.java:104)
at javax.activation.DataHandler.getInputStream(DataHandler.java:222)
at org.jboss.axis.attachments.DimeBodyPart.send(DimeBodyPart.java:283)
at org.jboss.axis.attachments.DimeBodyPart.write(DimeBodyPart.java:232)
at org.jboss.axis.attachments.DimeMultiPart.write(DimeMultiPart.java:39)
at org.jboss.axis.attachments.AttachmentsImpl.writeContentToStream(AttachmentsImpl.java:523)
... 26 more
Please let me know the cause and the solution for the problem.
Divya
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027412#4027412
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027412
17 years, 9 months
[JBossWS] - Re: How do I use MIME types other than text/xml
by lbrackman
ok. I got past that issue. now I am getting an exception of the following on the client side:
[java] org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://fileXfer.ws.synoran.com}SendPartRequest
This is the SEI:
@WebService(targetNamespace = "http://fileXfer.ws.synoran.com/")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
public interface FileXferEndpoint
{
public SendPartResponse sendPart(SendPartRequest request);
}
I have the XmlType annotation on the SendPartRequest message class with the @XmlMimeType("application/octet-stream") declared for the DataHandler get bean. I used the wsprovide tool to generate the wsdl and deployed the app server.
@XmlType(name="SendPartRequest", namespace = "http://fileXfer.ws.synoran.com")
public class SendPartRequest {
public SendPartRequest() {
}
public SendPartRequest(long txId, int partNum, long size, DataHandler dataHandler) {
this.txId = txId;
this.dataHandler = dataHandler;
}
...
@XmlMimeType("application/octet-stream")
public DataHandler getDataHandler() {
return dataHandler;
}
public void setDataHandler(DataHandler dataHandler) {
this.dataHandler = dataHandler;
}
Using the wsconsume tool I generated the source code for the client. The generated source code does not appear to use the wrapper classes however and requires me to supply the all the parameters that are wrapped in the SendPartRequest class to the web service method call. I can't seem to find any reference to the SendPartRequest class in any of the generated code.
Is there something that I am missing here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027279#4027279
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027279
17 years, 9 months
[JBossWS] - advice needed
by andydale
Hi,
Let me first explain that i am a beginner when it come to jboss web services, so i am sorry if this is a stupid problem.
I installed jbossws-1.2.0.GA last week to an ejb3-clustered install of jboss4.0.5.GA. I then proceeded to follow the simple step listed here http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWS181HelloWorld
I created an EJB3 (Stateless bean) like so:
@RemoteBinding(jndiBinding = "ws_remote")
| @Stateless
| @WebService
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class WebServiceTestBean implements IWebServiceTestRemote {
|
|
| @WebMethod
| @WebResult(name = "res")
| public String echo(@WebParam(name = "input_string") String pInputString) {
| System.out.println(pInputString);
| return pInputString + " :: web serviced";
| }
|
| ............
| }
And the wsdl generation for it worked. So i am now trying to access it with a simple client. I created the client using the wsconsume.sh script (with -k option) provided with jbossws. This creates the following file:
/**
| * JBossWS Generated Source
| *
| * Generation Date: Mon Mar 12 14:55:35 CET 2007
| *
| * 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.
| *
| * JAX-WS Version: 2.0
| *
| */
| @WebServiceClient(name = "WebServiceTestBeanService", targetNamespace = "http://beans.test.com/", wsdlLocation = "http://172.16.26.83:8080/test/Echo?wsdl")
| public class WebServiceTestBeanService extends Service {
|
| private final static URL WEBSERVICETESTBEANSERVICE_WSDL_LOCATION;
|
| static {
| URL url = null;
| try {
| url = new URL("http://172.16.26.83:8080/test/Echo?wsdl");
| } catch (MalformedURLException e) {
| e.printStackTrace();
| }
| WEBSERVICETESTBEANSERVICE_WSDL_LOCATION = url;
| }
|
| public WebServiceTestBeanService(URL wsdlLocation, QName serviceName) {
| super(wsdlLocation, serviceName);
| }
|
| public WebServiceTestBeanService() {
| super(WEBSERVICETESTBEANSERVICE_WSDL_LOCATION, new QName("http://beans.test.com/", "WebServiceTestBeanService"));
| }
|
|
| /**
| *
| * @return
| * returns WebServiceTestBean
| */
| @WebEndpoint(name = "WebServiceTestBeanPort")
| public WebServiceTestBean getWebServiceTestBeanPort() {
| return (WebServiceTestBean)super.getPort(new QName("http://beans.test.com/", "WebServiceTestBeanPort"), WebServiceTestBean.class);
| }
|
| }
I then try to create a WebServiceTestBeanService object, and call the getWebServiceTestBeanPort method which should return a proxy to the web service which i can call the test method "echo" with.
I am running into trouble with creating the WebServiceTestBeanService object, as i get a noClassDefFound exception, the stack trace is:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/xb/binding/ObjectModelFactory
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:108)
| at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:61)
| at javax.xml.ws.Service.<init>(Service.java:83)
| at com.test.beans.WebServiceTestBeanService.<init>(WebServiceTestBeanService.java:45)
| at com.test.beans.driver.main(driver.java:13)
|
can anybody tell me what i have done wrong.
Cheers,
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027192#4027192
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027192
17 years, 9 months