[JBoss-dev] [JBossWS] - Re: Problem with Deserialzing Arrays by Axis

2004-11-15 Thread sidhartha
Hi Al,
We are using the Axis classes that are bundled within JBossWS.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3855180#3855180

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3855180


---
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBossWS] - Problem with Deserialzing Arrays by Axis

2004-11-07 Thread sidhartha
Hello,

I am getting the following error:

 org.xml.sax.SAXException: SimpleDeserializer encountered a 
child element, which is NOT expected, in something it was trying 
to deserialize  

I am using AXIS 1.1,Jboss4.0 and JbossWs with doc/lit Style. 

I have written a small HelloWorld application that has one method 
'printMessage' that takes an array of 'Message'(user defined class) as an 
argument. 

Without using the array everything works fine . 
However when I add my customized type's Array I get the above error. 

Below is a summary of what was done:

STEP - 1 :- Created a impl class and Client class 
= 
---
 
HelloWorld_Impl.java 
---
 
package com.myapp; 

import java.rmi.RemoteException; 
import javax.xml.rpc.*; 
import javax.xml.rpc.server.ServiceLifecycle; 

public class HelloWorld_Impl implements HelloWorld, ServiceLifecycle 
{ 
  public String printMessage(ArrayOfMessage arrayOfMessage) 
 { 
System.out.println(In printMessage...); 
return arrayOfMessage.toString(); 
  } 
} 

---
 
HelloWorldClient.java 
---
 
package com.myapp; 

public class HelloWorldClient 
{ 
  public static void main(String args[]) throws Exception 
  { 
HelloWorldServiceLocator locator = new HelloWorldServiceLocator(); 
Message message = new Message(); 
message.setMessage(HelloWorld); 
Message array[] = { message }; 
ArrayOfMessage arrayOfMessage = new ArrayOfMessage(); 
arrayOfMessage.setMessages(array); 
locator.getHelloWorld().printMessage(arrayOfMessage); 
  } 
} 


STEP - 2 :- configured jaxrpc-mapping.xml,webservices.xml,web.xml 
== 
---
 
jaxrpc-mapping.xml 
---
 

?xml version='1.0' encoding='UTF-8' ? 
java-wsdl-mapping 
xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ns1=http://ekta.com; 
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd; 
version=1.1 
package-mapping 
package-typecom.myapp/package-type 
http://ekta.com/HelloWorld 
/package-mapping 
package-mapping 
package-typecom.myapp/package-type 
http://ekta.com 
/package-mapping 
java-xml-type-mapping 
java-typecom.myapp.ArrayOfMessage/java-type 
root-type-qnamens1:in0/root-type-qname 
qname-scopeelement/qname-scope 
/java-xml-type-mapping 
java-xml-type-mapping 
java-typejava.lang.String/java-type 
root-type-qnamens1:printMessageReturn/root-type-qname 
qname-scopeelement/qname-scope 
/java-xml-type-mapping 
/java-wsdl-mapping 


---
 
webservices.xml 
---
 

?xml version='1.0' encoding='UTF-8' ? 
webservices 
xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:impl=http://com.myapp/simple-ws4ee; 
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_web_services_1_1.xsd; 
version=1.1 

webservice-description 
webservice-description-nameHelloWorldService/webservice-description-name 
wsdl-fileWEB-INF/wsdl/hello.wsdl/wsdl-file 
jaxrpc-mapping-fileWEB-INF/jaxrpc-mapping.xml/jaxrpc-mapping-file 
port-component 
port-component-nameHelloWorld/port-component-name 
wsdl-portHelloWorld/wsdl-port 
service-endpoint-interfacecom.myapp.HelloWorld/service-endpoint-interface 
service-impl-bean 
servlet-linkHelloWorld/servlet-link 
/service-impl-bean 
/port-component 
/webservice-description 


---
 
web.xml 
---
 

?xml version=1.0 encoding=UTF-8? 
web-app 
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://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; 
version=2.4 

servlet-nameHelloWorld/servlet-name 
servlet-classcom.myapp.HelloWorld_Impl/servlet-class 

servlet-mapping 
servlet-nameHelloWorld/servlet-name 
url-pattern/services/HelloWorld/url-pattern 
/servlet-mapping 
welcome-file-list 
welcome-fileindex.html/welcome-file 
/welcome-file-list 
/web-app 


STEP 3 :- after running java2wsdl tool hello.wsdl file is created. 
=== 
---
 
hello.wsdl 
---
 

?xml version=1.0