[jbossws-users] [JBossWS] - type mapping error on String.Array

siddharthags do-not-reply at jboss.com
Tue Jan 2 04:15:48 EST 2007


I tried to find some topic similar to this but was not successful hence posting this to see if someone can help. I am running JBoss4.05 GA with the JWS1.04 against a 1.5 JVM. 

I have a web service that has the following configuration for wstool

<java-wsdl>
		
		<namespaces target-namespace="http://org.foo/wsg" type-namespace="http://org.foo/wsg/types"/>
		
		<webservices servlet-link="Test"/>
	</java-wsdl>

interface has a method called getFoo(String input):String[] that returns strings. I generated the artifacts on the server side using wstools and it generated the mapping file. The file does not have anything that relates to the String.Array type

<?xml version="1.0" encoding="UTF-8"?>
<java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
	<package-mapping>
		<package-type>org.foo.wsg</package-type>
		http://org.foo/wsg
	</package-mapping>
	<java-xml-type-mapping>
		<java-type>org.foo.wsg.UserException</java-type>
		<root-type-qname xmlns:typeNS="http://org.foo/wsg/types">typeNS:UserException</root-type-qname>
		<qname-scope>complexType</qname-scope>
		<variable-mapping>
			<java-variable-name>defaultMessage</java-variable-name>
			<xml-element-name>defaultMessage</xml-element-name>
		</variable-mapping>
		<variable-mapping>
			<java-variable-name>errorCode</java-variable-name>
			<xml-element-name>errorCode</xml-element-name>
		</variable-mapping>
		<variable-mapping>
			<java-variable-name>message</java-variable-name>
			<xml-element-name>message</xml-element-name>
		</variable-mapping>
	</java-xml-type-mapping>
	<exception-mapping>
		<exception-type>org.foo.wsg.UserException</exception-type>
		<wsdl-message xmlns:exMsgNS="http://org.foo/wsg">exMsgNS:UserException</wsdl-message>
	</exception-mapping>
	<service-interface-mapping>
		<service-interface>org.foo.wsg.TestService</service-interface>
		<wsdl-service-name xmlns:serviceNS="http://org.foo/wsg">serviceNS:TestService</wsdl-service-name>
		<port-mapping>
			<port-name>TestPort</port-name>
			<java-port-name>TestPort</java-port-name>
		</port-mapping>
	</service-interface-mapping>
	<service-endpoint-interface-mapping>
		<service-endpoint-interface>org.foo.wsg.Test</service-endpoint-interface>
		<wsdl-port-type xmlns:portTypeNS="http://org.foo/wsg">portTypeNS:Test</wsdl-port-type>
		<wsdl-binding xmlns:bindingNS="http://org.foo/wsg">bindingNS:TestBinding</wsdl-binding>
		<service-endpoint-method-mapping>
			<java-method-name>getFoo</java-method-name>
			<wsdl-operation>getFoo</wsdl-operation>
			<method-param-parts-mapping>
				<param-position>0</param-position>
				<param-type>java.lang.String</param-type>
				<wsdl-message-mapping>
					<wsdl-message xmlns:wsdlMsgNS="http://org.foo/wsg">wsdlMsgNS:Test_getFoo</wsdl-message>
					<wsdl-message-part-name>String_1</wsdl-message-part-name>
					<parameter-mode>IN</parameter-mode>
				</wsdl-message-mapping>
			</method-param-parts-mapping>
			<wsdl-return-value-mapping>
				<method-return-value>java.lang.String[]</method-return-value>
				<wsdl-message xmlns:wsdlMsgNS="http://org.foo/wsg">wsdlMsgNS:Test_getFooResponse</wsdl-message>
				<wsdl-message-part-name>result</wsdl-message-part-name>
			</wsdl-return-value-mapping>
		</service-endpoint-method-mapping>
	</service-endpoint-interface-mapping>
</java-wsdl-mapping>


when I try to use a client that I built using the wstools with the client configuration given as
<wsdl-java file="WEB-INF/wsdl/TestService.wsdl">
		
	</wsdl-java>

I get the following error on trying to bring up Jboss when this war is being deployed 
03:01:56,295 WARN  [JSR109ServerMetaDataBuilder] Cannot obtain SEI mapping for: org.foo.Test
03:01:56,305 ERROR [MainDeployer] Could not create deployment: file:/D:/Program Files/jboss/server/default/deploy/test.war/
org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://org.foo/wsg/types}String.Array

any pointers at why this is happening?


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

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



More information about the jbossws-users mailing list