[jboss-user] [JBossWS] - How do I use MIME types other than text/xml

lbrackman do-not-reply at jboss.com
Fri Mar 9 14:38:35 EST 2007


I am trying to use MTOM to send attachments.  I am using wstools to generate all components from an endpoint.  I successfully run a test with a text/xml type but I cannot use any others types including text/plain or application/octect.  The following is my endpoint and config file:

endpoint - 

public interface FileXferEndpoint extends Remote {

  public String sendPart(Long txId, Integer partNum, Long size, DataHandler data) throws RemoteException;
}

config file -


  <java-wsdl>
    
    
    <namespaces target-namespace="http://fileXfer.ws.synoran.com/"
	    type-namespace="http://fileXfer.ws.synoran.com/types"/>
    
    <webservices servlet-link="FileXferWS"/>
  </java-wsdl>


Environment:
JBoss 4.0.5.GA
Java 1.5(5.0)
JbossWS 2.0

I always get the following error:
 failed; nested exception is:
     [java]     org.jboss.ws.core.jaxrpc.binding.BindingException: Mime type application/octet not allowed for parameter DataHandler_4 allowed types are [text/xml]
     [java]     at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:522)
     [java]     at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:273)
     [java]     at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:151)
     [java]     at $Proxy0.sendPart(Unknown Source)


I would like to be able to send */* types.  How is this done?  Any samples would be appreciated.  Also, where can I get the schema for the configuration file and a better explanation on how to use wstools?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026729#4026729

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026729



More information about the jboss-user mailing list