JAX-WS - wsdl with operations or message that have a long parameter list

708 Views Asked by At

First of all, I would like to say that my English is poor, so I asked you sorry for that.

So, I have a wsdl generated by wfc that have some methods/messages with too many parameters. When I used a tool like wsdl2java from apache cxf or wsimport I receive an error with a message like this on windows:

            [ERROR] CodigoSMS_output\org\tempuri\InformarParticipacaoPromocaoCodigoSMSX0028G
            uidX0020PublicDomainX002CX0020GuidX0020ProtectedDomainX002CX0020StringX0020Codig
            oLojaX002CX0020Int32X0020NumeroPDVX002CX0020Int32X0020NumeroCupomX002CX0020DateT
            imeX0020DataVendaX002CX0020DoubleX0020ValorVendaX002CX0020BooleanX0020Cancelamen
            toX002CX0020BooleanX0020ValidarVendaX0029.java (A sintaxe do nome do arquivo, pa
            sta ou nome do volume estß incorreta)

On Linux I receveid I similar message, but with a FileNotFoundException (File name too long)

this is my wsdl that must be converted in a java class

        <?xml version="1.0" encoding="utf-8"?>
        <wsdl:definitions name="FacadeCodigosSMSIMP" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
          <wsp:Policy wsu:Id="CustomBinding_IFacadeCodigosSMS_policy">
            <wsp:ExactlyOne>
              <wsp:All>
                <wsaw:UsingAddressing/>
              </wsp:All>
            </wsp:ExactlyOne>
          </wsp:Policy>
          <wsdl:types>
            <xsd:schema targetNamespace="http://tempuri.org/Imports">
              <xsd:import schemaLocation="http://dpracticolive.bematech.com.br/Live40/LiveComercial/FacadeCodigosSMS.svc?xsd=xsd0" namespace="http://tempuri.org/"/>
              <xsd:import schemaLocation="http://dpracticolive.bematech.com.br/Live40/LiveComercial/FacadeCodigosSMS.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
              <xsd:import schemaLocation="http://dpracticolive.bematech.com.br/Live40/LiveComercial/FacadeCodigosSMS.svc?xsd=xsd2" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
              <xsd:import schemaLocation="http://dpracticolive.bematech.com.br/Live40/LiveComercial/FacadeCodigosSMS.svc?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/Rentech.PracticoLive.Comercial.Objects"/>
              <xsd:import schemaLocation="http://dpracticolive.bematech.com.br/Live40/LiveComercial/FacadeCodigosSMS.svc?xsd=xsd4" namespace="http://schemas.datacontract.org/2004/07/Rentech.Framework.Data"/>
            </xsd:schema>
          </wsdl:types>
          <wsdl:message name="IFacadeCodigosSMS_InformarParticipacaoPromocaoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_String_x0020_CodigoLoja_x002C__x0020_Int32_x0020_NumeroPDV_x002C__x0020_Int32_x0020_NumeroCupom_x002C__x0020_DateTime_x0020_DataVenda_x002C__x0020_Double_x0020_ValorVenda_x002C__x0020_Boolean_x0020_Cancelamento_x002C__x0020_Boolean_x0020_ValidarVenda_x0029__InputMessage">
            <wsdl:part name="parameters" element="tns:InformarParticipacaoPromocaoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_String_x0020_CodigoLoja_x002C__x0020_Int32_x0020_NumeroPDV_x002C__x0020_Int32_x0020_NumeroCupom_x002C__x0020_DateTime_x0020_DataVenda_x002C__x0020_Double_x0020_ValorVenda_x002C__x0020_Boolean_x0020_Cancelamento_x002C__x0020_Boolean_x0020_ValidarVenda_x0029_"/>
          </wsdl:message>
          <wsdl:message name="IFacadeCodigosSMS_InformarParticipacaoPromocaoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_String_x0020_CodigoLoja_x002C__x0020_Int32_x0020_NumeroPDV_x002C__x0020_Int32_x0020_NumeroCupom_x002C__x0020_DateTime_x0020_DataVenda_x002C__x0020_Double_x0020_ValorVenda_x002C__x0020_Boolean_x0020_Cancelamento_x002C__x0020_Boolean_x0020_ValidarVenda_x0029__OutputMessage">
            <wsdl:part name="parameters" element="tns:InformarParticipacaoPromocaoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_String_x0020_CodigoLoja_x002C__x0020_Int32_x0020_NumeroPDV_x002C__x0020_Int32_x0020_NumeroCupom_x002C__x0020_DateTime_x0020_DataVenda_x002C__x0020_Double_x0020_ValorVenda_x002C__x0020_Boolean_x0020_Cancelamento_x002C__x0020_Boolean_x0020_ValidarVenda_x0029_Response"/>
          </wsdl:message>
          <wsdl:message name="IFacadeCodigosSMS_InformarParticipacaoPromocaoSMSCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029__InputMessage">
            <wsdl:part name="parameters" element="tns:InformarParticipacaoPromocaoSMSCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029_"/>
          </wsdl:message>
          <wsdl:message name="IFacadeCodigosSMS_InformarParticipacaoPromocaoSMSCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029__OutputMessage">
            <wsdl:part name="parameters" element="tns:InformarParticipacaoPromocaoSMSCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029_Response"/>
          </wsdl:message>
          <wsdl:message name="IFacadeCodigosSMS_InformarParticipacaoPromocaoSMSCompactadoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029__InputMessage">
            <wsdl:part name="parameters" element="tns:InformarParticipacaoPromocaoSMSCompactadoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029_"/>
          </wsdl:message>
          <wsdl:message name="IFacadeCodigosSMS_InformarParticipacaoPromocaoSMSCompactadoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029__OutputMessage">
            <wsdl:part name="parameters" element="tns:InformarParticipacaoPromocaoSMSCompactadoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029_Response"/>
          </wsdl:message>
          <wsdl:portType name="IFacadeCodigosSMS">
            <wsdl:operation name="InformarParticipacaoPromocaoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_String_x0020_CodigoLoja_x002C__x0020_Int32_x0020_NumeroPDV_x002C__x0020_Int32_x0020_NumeroCupom_x002C__x0020_DateTime_x0020_DataVenda_x002C__x0020_Double_x0020_ValorVenda_x002C__x0020_Boolean_x0020_Cancelamento_x002C__x0020_Boolean_x0020_ValidarVenda_x0029_">
              <wsdl:input wsaw:Action="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoCodigoSMS(Guid publicDomain, Guid protectedDomain, String CodigoLoja, Int32 NumeroPDV, Int32 NumeroCupom, DateTime DataVenda, Double ValorVenda, Boolean Cancelamento, Boolean ValidarVenda)" message="tns:IFacadeCodigosSMS_InformarParticipacaoPromocaoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_String_x0020_CodigoLoja_x002C__x0020_Int32_x0020_NumeroPDV_x002C__x0020_Int32_x0020_NumeroCupom_x002C__x0020_DateTime_x0020_DataVenda_x002C__x0020_Double_x0020_ValorVenda_x002C__x0020_Boolean_x0020_Cancelamento_x002C__x0020_Boolean_x0020_ValidarVenda_x0029__InputMessage"/>
              <wsdl:output wsaw:Action="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoCodigoSMS(Guid publicDomain, Guid protectedDomain, String CodigoLoja, Int32 NumeroPDV, Int32 NumeroCupom, DateTime DataVenda, Double ValorVenda, Boolean Cancelamento, Boolean ValidarVenda)Response" message="tns:IFacadeCodigosSMS_InformarParticipacaoPromocaoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_String_x0020_CodigoLoja_x002C__x0020_Int32_x0020_NumeroPDV_x002C__x0020_Int32_x0020_NumeroCupom_x002C__x0020_DateTime_x0020_DataVenda_x002C__x0020_Double_x0020_ValorVenda_x002C__x0020_Boolean_x0020_Cancelamento_x002C__x0020_Boolean_x0020_ValidarVenda_x0029__OutputMessage"/>
            </wsdl:operation>
            <wsdl:operation name="InformarParticipacaoPromocaoSMSCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029_">
              <wsdl:input wsaw:Action="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoSMSCodigoSMS(Guid publicDomain, Guid protectedDomain, Objects.InfoPromocaoSMS infoPromocaoSMS)" message="tns:IFacadeCodigosSMS_InformarParticipacaoPromocaoSMSCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029__InputMessage"/>
              <wsdl:output wsaw:Action="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoSMSCodigoSMS(Guid publicDomain, Guid protectedDomain, Objects.InfoPromocaoSMS infoPromocaoSMS)Response" message="tns:IFacadeCodigosSMS_InformarParticipacaoPromocaoSMSCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029__OutputMessage"/>
            </wsdl:operation>
            <wsdl:operation name="InformarParticipacaoPromocaoSMSCompactadoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029_">
              <wsdl:input wsaw:Action="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoSMSCompactadoCodigoSMS(Guid publicDomain, Guid protectedDomain, Objects.InfoPromocaoSMS infoPromocaoSMS)" message="tns:IFacadeCodigosSMS_InformarParticipacaoPromocaoSMSCompactadoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029__InputMessage"/>
              <wsdl:output wsaw:Action="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoSMSCompactadoCodigoSMS(Guid publicDomain, Guid protectedDomain, Objects.InfoPromocaoSMS infoPromocaoSMS)Response" message="tns:IFacadeCodigosSMS_InformarParticipacaoPromocaoSMSCompactadoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029__OutputMessage"/>
            </wsdl:operation>
          </wsdl:portType>
          <wsdl:binding name="CustomBinding_IFacadeCodigosSMS" type="tns:IFacadeCodigosSMS">
            <wsp:PolicyReference URI="#CustomBinding_IFacadeCodigosSMS_policy"/>
            <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
            <wsdl:operation name="InformarParticipacaoPromocaoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_String_x0020_CodigoLoja_x002C__x0020_Int32_x0020_NumeroPDV_x002C__x0020_Int32_x0020_NumeroCupom_x002C__x0020_DateTime_x0020_DataVenda_x002C__x0020_Double_x0020_ValorVenda_x002C__x0020_Boolean_x0020_Cancelamento_x002C__x0020_Boolean_x0020_ValidarVenda_x0029_">
              <soap12:operation soapAction="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoCodigoSMS(Guid publicDomain, Guid protectedDomain, String CodigoLoja, Int32 NumeroPDV, Int32 NumeroCupom, DateTime DataVenda, Double ValorVenda, Boolean Cancelamento, Boolean ValidarVenda)" style="document"/>
              <wsdl:input>
                <soap12:body use="literal"/>
              </wsdl:input>
              <wsdl:output>
                <soap12:body use="literal"/>
              </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="InformarParticipacaoPromocaoSMSCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029_">
              <soap12:operation soapAction="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoSMSCodigoSMS(Guid publicDomain, Guid protectedDomain, Objects.InfoPromocaoSMS infoPromocaoSMS)" style="document"/>
              <wsdl:input>
                <soap12:body use="literal"/>
              </wsdl:input>
              <wsdl:output>
                <soap12:body use="literal"/>
              </wsdl:output>
            </wsdl:operation>
            <wsdl:operation name="InformarParticipacaoPromocaoSMSCompactadoCodigoSMS_x0028_Guid_x0020_publicDomain_x002C__x0020_Guid_x0020_protectedDomain_x002C__x0020_Objects.InfoPromocaoSMS_x0020_infoPromocaoSMS_x0029_">
              <soap12:operation soapAction="http://tempuri.org/IFacadeCodigosSMS/InformarParticipacaoPromocaoSMSCompactadoCodigoSMS(Guid publicDomain, Guid protectedDomain, Objects.InfoPromocaoSMS infoPromocaoSMS)" style="document"/>
              <wsdl:input>
                <soap12:body use="literal"/>
              </wsdl:input>
              <wsdl:output>
                <soap12:body use="literal"/>
              </wsdl:output>
            </wsdl:operation>
          </wsdl:binding>
          <wsdl:service name="FacadeCodigosSMSIMP">
            <wsdl:port name="CustomBinding_IFacadeCodigosSMS" binding="tns:CustomBinding_IFacadeCodigosSMS">
              <soap12:address location="http://dpracticolive.bematech.com.br/Live40/LiveComercial/FacadeCodigosSMS.svc"/>
              <wsa10:EndpointReference>
                <wsa10:Address>http://dpracticolive.bematech.com.br/Live40/LiveComercial/FacadeCodigosSMS.svc</wsa10:Address>
              </wsa10:EndpointReference>
            </wsdl:port>
          </wsdl:service>
        </wsdl:definitions>

I tried to create an binding for change the java class that represents the Method name, but does not work, There is any way for change a message/method.

regards,

Wescley

0

There are 0 best solutions below