[jboss-user] [JBossWS] - Exception while deploying a webservice with attachment (star

mnsharif do-not-reply at jboss.com
Sat Nov 11 14:12:59 EST 2006


Hi All

I am trying to create a webservice that can receive an attachment alongwith a few other parameters. I am starting from a WSDL file and i am specifying attachments using mime content element as shown in the code below:

<definitions
  |     name = "Gasherbrum"
  |     targetNamespace = "http://org.jboss.test.webservice/samples2"
  |     xmlns:tns = "http://org.jboss.test.webservice/samples2"
  |     xmlns = "http://schemas.xmlsoap.org/wsdl/"
  |     xmlns:ns2 = "http://org.jboss.test.webservice/samples2/types"
  |     xmlns:mime = "http://schemas.xmlsoap.org/wsdl/mime/"
  |     xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
  |     xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/">
  |     <types>
  |         <schema
  |             targetNamespace = "http://org.jboss.test.webservice/samples2/types"
  |             xmlns:tns = "http://org.jboss.test.webservice/samples2/types"
  |             xmlns:soap11-enc = "http://schemas.xmlsoap.org/soap/encoding/"
  |             xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
  |             xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/"
  |             xmlns = "http://www.w3.org/2001/XMLSchema">
  |             <complexType name = "paraListType">
  |                 <sequence>
  |                     <element
  |                         name = "username"
  |                         type = "string"
  |                         nillable = "true"/>
  |                     <element
  |                         name = "password"
  |                         type = "string"
  |                         nillable = "true"/>
  |                     <element
  |                         name = "operationName"
  |                         type = "string"
  |                         nillable = "true"/>
  |                     <element
  |                         name = "inputXML"
  |                         type = "string"
  |                         nillable = "true"/>
  |                 </sequence>
  |             </complexType>
  |             <complexType name = "responseType">
  |                 <sequence>
  |                     <element
  |                         name = "result"
  |                         type = "string"
  |                         nillable = "true"/>
  |                 </sequence>
  |             </complexType>
  |             <element name = "paraList2" type = "tns:paraListType"/>
  |             <element name = "responseXML" type = "tns:responseType"/>
  |         </schema>
  |     </types>
  |     <message name = "attachRequest">
  |         <part name = "parameters" element = "ns2:paraList2"/>
  |         <part name = "attachmentContents" type = "xsd:string"/>
  |     </message>
  |     <message name = "attachResponse">
  |         <part name = "result" element = "ns2:responseXML"/>
  |     </message>
  |     <portType name = "TransmulatorInterface">
  |         <operation name = "invokeAttach">
  |             <input message = "tns:attachRequest"/>
  |             <output message = "tns:attachResponse"/>
  |         </operation>
  |     </portType>
  |     <binding name = "TransmulatorInterfaceBinding" type = "tns:TransmulatorInterface">
  |         <soap:binding transport = "http://schemas.xmlsoap.org/soap/http" style = "document"/>
  |         <operation name = "invokeAttach">
  |             <input>
  |                 <mime:multipartRelated>
  |                     <mime:part>
  |                         <soap:body use = "literal"/>
  |                     </mime:part>
  |                     <mime:part>
  |                         <mime:content part = "attachmentContents" type = "text/plain"/>
  |                     </mime:part>
  |                 </mime:multipartRelated>
  |             </input>
  |             <output>
  |                 <mime:multipartRelated>
  |                     <mime:part>
  |                         <soap:body use = "literal"/>
  |                     </mime:part>
  |                 </mime:multipartRelated>
  |             </output>
  |         </operation>
  |     </binding>
  |     <service name = "Gasherbrum">
  |         <port name = "TransmulatorInterfacePort" binding = "tns:TransmulatorInterfaceBinding">
  |             <soap:address location = "REPLACE_WITH_ACTUAL_URL"/>
  |         </port>
  |     </service>
  | </definitions>
  | 


This WSDL generates SEI without any problems and get deploed easily on tomcat using JWSDP1.6, but when i tried the same WSDL file and tried to generate SEI through wscmopile and tried to deploy on JBoss, i get the following deployment exception:

22:11:09,354 WARN  [JavaWsdlMapping] Cannot find jaxrpc-mapping for type: {http://www.w3.org/2001/XMLSchema}string
  | 22:11:09,354 ERROR [MainDeployer] Could not create deployment: file:/D:/jboss-4.0.4.GA/server/default/deploy/alhamd.war
  | org.jboss.ws.WSException: Cannot obtain java/xml type mapping for: {http://www.w3.org/2001/XMLSchema}string
  |         at org.jboss.ws.deployment.JSR109MetaDataBuilder.buildParameterMetaDataDoc(JSR109MetaDataBuilder.java:513)
  |         at org.jboss.ws.deployment.JSR109MetaDataBuilder.setupOperationsFromWSDL(JSR109MetaDataBuilder.java:200)
  |         at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:223)
  |         at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:78)
  |         at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:80)
  |         at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(DeployerInterceptorJSE.java:74)
  |         at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.jav
  | a:180)
  |         at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  |         at $Proxy31.create(Unknown Source)
  |         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  |         at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  |         at $Proxy8.deploy(Unknown Source)
  |         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  |         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:26
  | 3)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
  | 
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
  | 

I cant seem to figure out what the problem is!

Is it that attachments are not supported in JBoss (i am using 4.0.4 with jbossws as add-on)?? or are they not supported when starting from WSDL file? Or am i ignoring something here?



Any clues in this regard would be highly appreciated.


Regards,
mnsharif

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

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



More information about the jboss-user mailing list