[JBossWS] - Re: jaxrpc Array problem
by odin69
So here is my next question. I have the following Value type on the client-side created from a wsdl using wsconsume.
| package com.seitenbau.test.Client;
|
| import java.util.ArrayList;
| import java.util.List;
| import javax.xml.bind.annotation.XmlAccessType;
| import javax.xml.bind.annotation.XmlAccessorType;
| import javax.xml.bind.annotation.XmlElement;
| import javax.xml.bind.annotation.XmlType;
|
|
| @XmlAccessorType(XmlAccessType.FIELD)
| @XmlType(name = "CustomerData", propOrder = {
| "city",
| "givenname",
| "password",
| "phonenumber",
| "products",
| "street",
| "surname",
| "zipCode"
| })
| public class CustomerData implements java.io.Serializable {
|
| @XmlElement(required = true, nillable = true)
| protected String city;
| @XmlElement(required = true, nillable = true)
| protected String givenname;
| @XmlElement(required = true, nillable = true)
| protected String password;
| protected int phonenumber;
| @XmlElement(type = Integer.class)
| protected List<Integer> products;
| @XmlElement(required = true, nillable = true)
| protected String street;
| @XmlElement(required = true, nillable = true)
| protected String surname;
| @XmlElement(required = true, nillable = true)
| protected String zipCode;
|
| public String getCity() {
| return city;
| }
| public void setCity(String value) {
| this.city = value;
| }
| public String getGivenname() {
| return givenname;
| }
| public void setGivenname(String value) {
| this.givenname = value;
| }
| public String getPassword() {
| return password;
| }
| public void setPassword(String value) {
| this.password = value;
| }
| public int getPhonenumber() {
| return phonenumber;
| }
| public void setPhonenumber(int value) {
| this.phonenumber = value;
| }
| public List<Integer> getProducts() {
| if (products == null) {
| products = new ArrayList<Integer>();
| }
| return this.products;
| }
| public String getStreet() {
| return street;
| }
| public void setStreet(String value) {
| this.street = value;
| }
| public String getSurname() {
| return surname;
| }
| public void setSurname(String value) {
| this.surname = value;
| }
| public String getZipCode() {
| return zipCode;
| }
| public void setZipCode(String value) {
| this.zipCode = value;
| }
|
| }
|
Now I have the problem that by invoking the web service the customerData information is given back fine but on client side I get an UndeclaredThrowableException. Right now I don't know why this happens and i am really stuck I hope someone might be able to help me. in the following there is the wsdl. The error occurs by invoking the getCustomerData operation. Well thanks in advance i hope someone comes up with s.th.
<?xml version="1.0" encoding="UTF-8"?>
| <definitions name='ND_CELLPHONE' targetNamespace='http://test' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://test' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types>
| <schema targetNamespace='http://test' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://test' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
| <complexType name='CustomerData'>
| <sequence>
| <element name='city' nillable='true' type='string'/>
| <element name='givenname' nillable='true' type='string'/>
| <element name='password' nillable='true' type='string'/>
| <element name='phonenumber' type='int'/>
| <element maxOccurs='unbounded' minOccurs='0' name='products' type='int'/>
| <element name='street' nillable='true' type='string'/>
| <element name='surname' nillable='true' type='string'/>
| <element name='zipCode' nillable='true' type='string'/>
| </sequence>
| </complexType>
| </schema>
| </types>
| <message name='IND_CellphoneService_checkForNumberExistence' xmlns='http://schemas.xmlsoap.org/wsdl/'>
| <part name='int_1' type='xsd:int'/>
| <part name='String_2' type='xsd:string'/>
| </message>
| <message name='IND_CellphoneService_checkForNumberExistenceResponse'>
| <part name='result' type='xsd:int'/>
| </message>
| <message name='IND_CellphoneService_getCustomerData'>
| <part name='int_1' type='xsd:int'/>
| </message>
| <message name='IND_CellphoneService_getCustomerDataResponse'>
| <part name='result' type='tns:CustomerData'/>
| </message>
| <message name='IND_CellphoneService_setEditFlag'>
| <part name='int_1' type='xsd:int'/>
| </message>
| <message name='IND_CellphoneService_setEditFlagResponse'>
| <part name='result' type='xsd:boolean'/>
| </message>
| <portType name='IND_CellphoneService'>
| <operation name='checkForNumberExistence' parameterOrder='int_1 String_2'>
| <input message='tns:IND_CellphoneService_checkForNumberExistence'/>
| <output message='tns:IND_CellphoneService_checkForNumberExistenceResponse'/>
| </operation>
| <operation name='getCustomerData' parameterOrder='int_1'>
| <input message='tns:IND_CellphoneService_getCustomerData'/>
| <output message='tns:IND_CellphoneService_getCustomerDataResponse'/>
| </operation>
| <operation name='setEditFlag' parameterOrder='int_1'>
| <input message='tns:IND_CellphoneService_setEditFlag'/>
| <output message='tns:IND_CellphoneService_setEditFlagResponse'/>
| </operation>
| </portType>
| <binding name='IND_CellphoneServiceBinding' type='tns:IND_CellphoneService'>
| <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
| <operation name='checkForNumberExistence'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://test' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://test' use='literal'/>
| </output>
| </operation>
| <operation name='getCustomerData'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://test' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://test' use='literal'/>
| </output>
| </operation>
| <operation name='setEditFlag'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://test' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://test' use='literal'/>
| </output>
| </operation>
| </binding>
| <service name='ND_CELLPHONE'>
| <port binding='tns:IND_CellphoneServiceBinding' name='IND_CellphoneServicePort'>
| <soap:address location='http://localhost:8080/services/ND_PRODUCTS'/>
| </port>
| </service>
| </definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132053#4132053
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132053
16 years, 10 months
[JBossWS] - JbossWs for Jboss 4.0.5 and JDK1.4
by tami
Hi ,
I am using Jboss 4.0.5,and JDK 1.4 environment in my project to develop a Jboss Web Service Client. The Client code involves Jboss Ws Eventing and Ws Addressing fundas.Following Jars JBOSSWS14-Core.jar,JBOSS-JAXWS14.jar,JBOSSWS14-Client.jar,JAXAPI-jar were included in the path.
The code gets compiled successfuly but at run time its giving an Exception java.noclassdeffound Error for "javax.xml.bind.annotation.XmlAccessType".
The above package is newly added in JAXB-API.jar of JAXB2.0/JWSDP2.0 which uses JDK1.5. JAXB-API.jar of JAXB1.0 is compiled with JDK1.4 but it does not have the above package.But My project uses Jdk1.4 and I have downloaded all JBossws14 jars from Jbossws1.2.0Sp1.zip which uses JDK1.4.
I wonder then how the jar refers to a package "javax.xml.bind.annotation.XmlAccessType" which is present in JAXB-API.jar compiled with Jdk1.5. Is there any way to Use JBossws with Jdk1.4??Please help with an answer.
Thanks in Advance,
tami
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132029#4132029
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132029
16 years, 10 months
[JBossWS] - jaxrpc Array problem
by odin69
Hello,
I have created a web service which returns a non-standard value type to the invoking app. I used the wsconsume tool to create the client side files from the wsdl.
My Problem right now is that my value type named customerData contains an int_array which causes problems on the client side. In the class CustomerData the in_array is defined as follows:
private int[] products; + setters and getters
on the client-side the wsconsume tool generates the follwoing:
public List<Integer> getProducts() {
| if (products == null) {
| products = new ArrayList<Integer>();
| }
| return this.products;
| }
the web service is invoked with:
CustomerData cdCell = ND_CELLPHONE_STUB.getCustomerData(phoneNumber);
when I use the generated customerData file I get an error, but when I am using the orig. CustomerData file from the service everything is ok. I am a little bit stuck right now. Am I doing something wrong generating the client-side classes?
thx
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131859#4131859
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131859
16 years, 10 months