BTW I an trying at this moment the getPallets() method...  The calss that 
generated the WS is:package com.avon.mx.reaco.services;

import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedProperty;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;

import com.avon.mx.reaco.persistence.dto.PalletDTO;
import com.avon.mx.reaco.persistence.dto.ShipmentRejectionDTO;
import com.avon.mx.reaco.persistence.dto.WSCartonDTO;
import com.avon.mx.reaco.persistence.service.HandHeldPersistanceService;
@WebService(serviceName="handHeldScannerService",
            endpointInterface="/handHeldScannerService",
            targetNamespace="http://com.xxxx.services";)
public class HandHeldScannerService implements HandHeldScannerServiceI {
        
    @Autowired
    @ManagedProperty(value="#{handHeldService}")
    private HandHeldPersistanceService handHeldService;
    
    @Override
    @WebMethod(operationName="getScannedLabels")
    public int getScannedLabels(@WebParam(name="labels")String[] labels) {
        return labels.length;
    }

    @Override
    @WebMethod(operationName="getPallets")
    public String[] getPallets( @WebParam(name="shipment") String shipment) {
        List<String> result= new ArrayList<String>();
        List<PalletDTO> pallets = new ArrayList<PalletDTO>();
        try{
            pallets = handHeldService.getPallets(shipment);
        }catch(Exception exc){
            exc.printStackTrace();
        }
        for(PalletDTO item: pallets){
            result.add(item.getIdPallet());
        }
        return (String[])result.toArray();
    }

    @Override
    @WebMethod(operationName="getCartoons")
    public List<WSCartonDTO> getCartons(@WebParam(name="pallet") String pallet){
        List<WSCartonDTO> result= new ArrayList<WSCartonDTO>();
        try{
            result = handHeldService.getCartons(pallet);
        }catch(Exception exc){
            exc.printStackTrace();
        }
        
        return result;
    }
    
    @Override
    @WebMethod(operationName="getRejectionCatalog")
    public List<ShipmentRejectionDTO> getRejectionCatalog() {
        List<ShipmentRejectionDTO> result= new 
ArrayList<ShipmentRejectionDTO>();
        try{
            result = handHeldService.getRejectionStatusList();
        }catch(Exception exc){
            exc.printStackTrace();
        }
        
        return result;
    }

}
And the services.xml contains:<service name="handHeldScannerService">
        <description>
            Handheld Service
        </description>
        
         <parameter name="ServiceClass" 
locked="false">com.avon.mx.reaco.services.HandHeldScannerService
        </parameter>            
        <parameter 
name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier</parameter>
    </service>Thanks in advance and greetingsCarlos de Luna

 
      De: Carlos de Luna Saenz <cdelunasa...@yahoo.com.mx>
 Para: "java-user@axis.apache.org" <java-user@axis.apache.org> 
 Enviado: Lunes, 24 de noviembre, 2014 8:26:54
 Asunto: Re: JSR172
   
The client runs in Windows CE CReMe and will be a awt/swing based client. the 
WTK was used to generate the JSR172 stubs but (as i mentioned) there has been 
other "stubs generators" used and all with the same result. the JDK for JME 3.4 
and even the one from JMe 8 was used as well as the NetBeans 8 was included. 
The WSDL generated by the service by axis is:<wsdl:definitions 
targetNamespace="http://com.avon.services";>
    <wsdl:documentation>handHeldScannerService</wsdl:documentation>
    <wsdl:types>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://dto.persistence.reaco.mx.xxxx.com/xsd";>
       <xs:complexType name="ShipmentRejectionDTO">
          <xs:sequence>
             <xs:element minOccurs="0" name="description" nillable="true" 
type="xs:string"/>
             <xs:element minOccurs="0" name="id" type="xs:long"/>
          </xs:sequence>
       </xs:complexType>
       <xs:complexType name="WSCartonDTO">
          <xs:sequence>
             <xs:element maxOccurs="unbounded" minOccurs="0" name="bags" 
nillable="true" type="ax29:WSBagDTO"/>
             <xs:element minOccurs="0" name="campaign" nillable="true" 
type="xs:string"/>
             <xs:element minOccurs="0" name="idCarton" nillable="true" 
type="xs:string"/>
             <xs:element maxOccurs="unbounded" minOccurs="0" name="products" 
nillable="true" type="ax29:WSProductDTO"/>
             <xs:element minOccurs="0" name="zone" nillable="true" 
type="xs:string"/>
          </xs:sequence>
      </xs:complexType>
      <xs:complexType name="WSBagDTO">
          <xs:sequence>
            <xs:element minOccurs="0" name="idBag" nillable="true" 
type="xs:string"/>
            <xs:element maxOccurs="unbounded" minOccurs="0" name="products" 
nillable="true" type="ax29:WSProductDTO"/>
          </xs:sequence>
      </xs:complexType>
      <xs:complexType name="WSProductDTO">
          <xs:sequence>
            <xs:element minOccurs="0" name="fsc" nillable="true" 
type="xs:string"/>
            <xs:element minOccurs="0" name="quantity" type="xs:int"/>
          </xs:sequence>
       </xs:complexType>
    </xs:schema>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://com.xxx.services";>
        <xs:import namespace="http://dto.persistence.reaco.mx.xxx.com/xsd"/>
            <xs:element name="getScannedLabels">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element maxOccurs="unbounded" minOccurs="0" 
name="labels" nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="getScannedLabelsResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return" type="xs:int"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="getRejectionCatalog">
                <xs:complexType>
                    <xs:sequence/>
                </xs:complexType>
            </xs:element>
            <xs:element name="getRejectionCatalogResponse">
                <xs:complexType>
                <xs:sequence>
                    <xs:element maxOccurs="unbounded" minOccurs="0" 
name="return" nillable="true" type="ax29:ShipmentRejectionDTO"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="getPallets">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="shipment" nillable="true" 
type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="getPalletsResponse">
            <xs:complexType>
                <xs:sequence>
                    <xs:element maxOccurs="unbounded" minOccurs="0" 
name="return" nillable="true" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="getCartons">
            <xs:complexType>
                <xs:sequence>
                    <xs:element minOccurs="0" name="pallet" nillable="true" 
type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="getCartonsResponse">
            <xs:complexType>
                <xs:sequence>
                    <xs:element maxOccurs="unbounded" minOccurs="0" 
name="return" nillable="true" type="ax29:WSCartonDTO"/>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:schema>
    </wsdl:types>
        <wsdl:message name="getRejectionCatalogRequest">
            <wsdl:part name="parameters" element="ns:getRejectionCatalog"/>
        </wsdl:message>
        <wsdl:message name="getRejectionCatalogResponse">
            <wsdl:part name="parameters" 
element="ns:getRejectionCatalogResponse"/>
        </wsdl:message>
        <wsdl:message name="getScannedLabelsRequest">
            <wsdl:part name="parameters" element="ns:getScannedLabels"/>
        </wsdl:message>
        <wsdl:message name="getScannedLabelsResponse">
            <wsdl:part name="parameters" element="ns:getScannedLabelsResponse"/>
        </wsdl:message>
        <wsdl:message name="getPalletsRequest">
          <wsdl:part name="parameters" element="ns:getPallets"/>
        </wsdl:message>
        <wsdl:message name="getPalletsResponse">
          <wsdl:part name="parameters" element="ns:getPalletsResponse"/>
        </wsdl:message>
        <wsdl:message name="getCartonsRequest">
            <wsdl:part name="parameters" element="ns:getCartons"/>
        </wsdl:message>
        <wsdl:message name="getCartonsResponse">
            <wsdl:part name="parameters" element="ns:getCartonsResponse"/>
        </wsdl:message>
        <wsdl:portType name="handHeldScannerServicePortType">
          <wsdl:operation name="getRejectionCatalog">
          <wsdl:input message="ns:getRejectionCatalogRequest" 
wsaw:Action="urn:getRejectionCatalog"/>
          <wsdl:output message="ns:getRejectionCatalogResponse" 
wsaw:Action="urn:getRejectionCatalogResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getScannedLabels">
          <wsdl:input message="ns:getScannedLabelsRequest" 
wsaw:Action="urn:getScannedLabels"/>
          <wsdl:output message="ns:getScannedLabelsResponse" 
wsaw:Action="urn:getScannedLabelsResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getPallets">
          <wsdl:input message="ns:getPalletsRequest" 
wsaw:Action="urn:getPallets"/>
          <wsdl:output message="ns:getPalletsResponse" 
wsaw:Action="urn:getPalletsResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getCartons">
          <wsdl:input message="ns:getCartonsRequest" 
wsaw:Action="urn:getCartons"/>
          <wsdl:output message="ns:getCartonsResponse" 
wsaw:Action="urn:getCartonsResponse"/>
        </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="handHeldScannerServiceSoap11Binding" 
type="ns:handHeldScannerServicePortType">
          <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
        <wsdl:operation name="getRejectionCatalog">
          <soap:operation soapAction="urn:getRejectionCatalog" 
style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getPallets">
            <soap:operation soapAction="urn:getPallets" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getScannedLabels">
            <soap:operation soapAction="urn:getScannedLabels" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getCartons">
            <soap:operation soapAction="urn:getCartons" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="handHeldScannerServiceSoap12Binding" 
type="ns:handHeldScannerServicePortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
        <wsdl:operation name="getRejectionCatalog">
            <soap12:operation soapAction="urn:getRejectionCatalog" 
style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getPallets">
            <soap12:operation soapAction="urn:getPallets" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getScannedLabels">
            <soap12:operation soapAction="urn:getScannedLabels" 
style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getCartons">
            <soap12:operation soapAction="urn:getCartons" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="handHeldScannerServiceHttpBinding" 
type="ns:handHeldScannerServicePortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="getRejectionCatalog">
            <http:operation location="getRejectionCatalog"/>
            <wsdl:input>
                <mime:content type="application/xml" part="parameters"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="application/xml" part="parameters"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getPallets">
            <http:operation location="getPallets"/>
            <wsdl:input>
                <mime:content type="application/xml" part="parameters"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="application/xml" part="parameters"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getScannedLabels">
            <http:operation location="getScannedLabels"/>
            <wsdl:input>
                <mime:content type="application/xml" part="parameters"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="application/xml" part="parameters"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getCartons">
            <http:operation location="getCartons"/>
            <wsdl:input>
                <mime:content type="application/xml" part="parameters"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="application/xml" part="parameters"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="handHeldScannerService">
        <wsdl:port name="handHeldScannerServiceHttpSoap11Endpoint" 
binding="ns:handHeldScannerServiceSoap11Binding">
            <soap:address 
location="http://mxxxxxx1234.sa.xxxx.net:8080/reaco_v3/services/handHeldScannerService.handHeldScannerServiceHttpSoap11Endpoint/"/>
        </wsdl:port>
        <wsdl:port name="handHeldScannerServiceHttpSoap12Endpoint" 
binding="ns:handHeldScannerServiceSoap12Binding">
            <soap12:address 
location="http://mxbdelunaca1234.sa.xxxxx.net:8080/reaco_v3/services/handHeldScannerService.handHeldScannerServiceHttpSoap12Endpoint/"/>
        </wsdl:port>
        <wsdl:port name="handHeldScannerServiceHttpEndpoint" 
binding="ns:handHeldScannerServiceHttpBinding">
            <http:address 
location="http://mxbdelunaca1234.sa.xxxx.net:8080/reaco_v3/services/handHeldScannerService.handHeldScannerServiceHttpEndpoint/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
The generated stubs are being ziped in the ataqchment
 


      De: Martin Gainty <mgai...@hotmail.com>
 Para: "java-user@axis.apache.org" <java-user@axis.apache.org> 
 Enviado: Viernes, 21 de noviembre, 2014 14:24:32
 Asunto: RE: JSR172
   
#yiv4018759861 --.yiv4018759861hmmessage 
P{margin:0px;padding:0px;}#yiv4018759861 
body.yiv4018759861hmmessage{font-size:12pt;font-family:Calibri;}#yiv4018759861 
I guess I dont undestand why you are using Wireless Tooklkit to generate stubs 
from wsdl..can you explain?

the error means that the response contains an element which is not documented 
in any of the XSDs you are referencing OR
the element in the response is of the wrong type xs:string en vez de matriz de 
string por ejemplo
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:ns="http://complex.tempuri.org";....>
    <xs:complexType name="ArrayOfstring">                <xs:sequence>          
          <xs:element maxOccurs="unbounded" minOccurs="0" name="string" 
nillable="true" type="xs:string"/>                </xs:sequence>            
</xs:complexType>     <xs:element name="retArrayString1DResponse">              
  <xs:complexType>                    <xs:sequence>                        
<xs:element minOccurs="0" name="return" nillable="true" 
type="ns:ArrayOfstring"/>                    </xs:sequence>                
</xs:complexType>            </xs:element>    <wsdl:message 
name="retArrayString1DResponse">        <wsdl:part name="parameters" 
element="ns:retArrayString1DResponse"/>    </wsdl:message>        
<wsdl:operation name="retArrayString1D">            <wsdl:input 
message="ns:retArrayString1DRequest" wsaw:Action="urn:retArrayString1D"/>       
     <wsdl:output message="ns:retArrayString1DResponse" 
wsaw:Action="urn:retArrayString1DResponse"/>        </wsdl:operation></wsdl>
Post the WSDL and we will generate the service and client stubs here

Saludos
Martin




Date: Fri, 21 Nov 2014 18:47:15 +0000
From: cdelunasa...@yahoo.com.mx
To: java-user@axis.apache.org
Subject: JSR172

I am working to build an application that will connect to a JME app, the 
application will consume webservices, the webservice returns an String[] value 
but is not being readed well at the client side weither with stubs maden wth 
NetBeans 8, JME 3 wsdlcomiple nor wtk 2.5.2_01the message on the exception says 
that is there a Invalid element on the response... ¿Someone has any idea on how 
to correct this? Axis 2 is in use with tomacat and Spring...final release will 
be made on WebSphere 8...Greetings and thanks in advance

 

   
 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

   

Reply via email to