NUSOAP - WSDL STYLE DOCUMENT / LITERAL

0

I currently have 2 webservices running in hospitals that work seamlessly with STCLE / ENCODED STYLE however we will implement in a software for a factory and there they have problem to consume this type of service.

It turns out that switching to DOCUMENT / LITERAL simply does nothing, there is nothing in the send header or the return header. I have tried to use the soapUI but it only says that it has an error in the WSDL and remains blank.

After much searching I came to the conclusion that it did not accept a complexType with SOAP-REF: arrayType which is where I can use associative array.

Also after much research I found this topic: link

I have a WSDL structure with style DOCUMENT / LITERAL and the difference for my structured today is that I can not encapsulate the element in the way it is done in the example:

<element name="myMethod">
            <complexType>
                <sequence>
                    <element name="x" type="xsd:int"/>
                    <element name="y" type="xsd:float"/>
                </sequence>
            </complexType>
        </element>
        <element name="myMethodResponse">
            <complexType/>
        </element>

What I can do is to create complexType and reference in element something like this:

<element name='Pedido' type='tns:LayoutPedido' />
<complexType name='layoutPedido'>
<all:sequence>
<element name='id' type='xsd:string' />
</all:sequence>
</complextType>

What I can not tell you is disturbing the reading of it.

Sorry, I can not post the original WSDL.

    
asked by anonymous 06.05.2014 / 03:45

1 answer

1

The people who did not want to release there how it will be intranet I managed to get the file.

Follows:

<?xml version="1.0" encoding="ISO-8859-1"?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:Integrate" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:Integrate">
<types>
<xsd:schema elementFormDefault="qualified" targetNamespace="urn:Integrate"
>
 <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
 <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
 <xsd:complexType name="itemLayoutStruct">
  <xsd:sequence>
   <xsd:element name="itemLayoutArrayElement" type="tns:itemLayoutArray" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:sequence>
 </xsd:complexType>
 <xsd:complexType name="itemLayoutArray">
  <xsd:sequence>
   <xsd:element name="coditem" type="xsd:string" minOccurs="0"/>
   <xsd:element name="descitem" type="xsd:string" minOccurs="0"/>
   <xsd:element name="unidade" type="xsd:string" minOccurs="0"/>
   <xsd:element name="dtinclusao" type="xsd:string" minOccurs="0"/>
   <xsd:element name="dtalteracao" type="xsd:string" minOccurs="0"/>
   <xsd:element name="nomeabrev" type="xsd:string" minOccurs="0"/>
   <xsd:element name="descfornec" type="xsd:string" minOccurs="0"/>
   <xsd:element name="status1" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="status2" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="status3" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="origem" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="stintegr" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="gramatura" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="largura" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="comprimento" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="compxlarg" type="xsd:string" minOccurs="0"/>
   <xsd:element name="pesoliq" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="cor" type="xsd:string" minOccurs="0"/>
   <xsd:element name="prodlinhadagua" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="tipo" type="xsd:string" minOccurs="0"/>
   <xsd:element name="segmento" type="xsd:string" minOccurs="0"/>
   <xsd:element name="grupoprod" type="xsd:string" minOccurs="0"/>
   <xsd:element name="caracteristica" type="xsd:string" minOccurs="0"/>
   <xsd:element name="fabricante" type="xsd:string" minOccurs="0"/>
   <xsd:element name="agrupgtplan" type="xsd:string" minOccurs="0"/>
   <xsd:element name="fabricanteERP" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="nrfolha" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="nisuzano" type="xsd:string" minOccurs="0"/>
   <xsd:element name="tubete" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="codagrup1" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup2" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup3" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup4" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup5" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup6" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup7" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup8" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup9" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup10" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup11" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codagrup12" type="xsd:string" minOccurs="0"/>
   <xsd:element name="codfornec" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="familia" type="xsd:string" minOccurs="0"/>
   <xsd:element name="famcomer" type="xsd:string" minOccurs="0"/>
   <xsd:element name="grestoque" type="xsd:string" minOccurs="0"/>
   <xsd:element name="depositopad" type="xsd:string" minOccurs="0"/>
   <xsd:element name="fator_conversao" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="codemitente" type="xsd:decimal" minOccurs="0"/>
   <xsd:element name="embalagem" type="xsd:string" minOccurs="0"/>
   <xsd:element name="pesobruto" type="xsd:decimal" minOccurs="0"/>
  </xsd:sequence>
 </xsd:complexType>
 <xsd:complexType name="itemLayoutReturn">
  <xsd:all>
   <xsd:element name="STATUS" type="xsd:string"/>
   <xsd:element name="SUCCESS" type="xsd:string"/>
   <xsd:element name="ERRORS" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
   <xsd:element name="coditem" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="Integrate.itemRequestType">
  <xsd:all>
   <xsd:element name="itemLayout" type="tns:itemLayoutArray" form="unqualified"/>
   <xsd:element name="action" type="xsd:string" form="unqualified"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="Integrate.itemResponseType">
  <xsd:all>
   <xsd:element name="return" type="tns:itemLayoutReturn" form="unqualified"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:element name="Integrate.item" type="tns:Integrate.itemRequestType"/>
 <xsd:element name="Integrate.itemResponse" type="tns:Integrate.itemResponseType"/>
</xsd:schema>
</types>
<message name="Integrate.itemRequest">
  <part name="parameters" element="tns:Integrate.item" /></message>
<message name="Integrate.itemResponse">
  <part name="parameters" element="tns:Integrate.itemResponse" /></message>
<portType name="IntegratePortType">
  <operation name="Integrate.item">
    <input message="tns:Integrate.itemRequest"/>
    <output message="tns:Integrate.itemResponse"/>
  </operation>
</portType>
<binding name="IntegrateBinding" type="tns:IntegratePortType">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="Integrate.item">
    <soap:operation soapAction="urn:Integrate#Integrate.item" style="document"/>
    <input><soap:body use="literal" namespace="urn:integrate"/></input>
    <output><soap:body use="literal" namespace="urn:integrate"/></output>
  </operation>
</binding>
<service name="Integrate">
  <port name="IntegratePort" binding="tns:IntegrateBinding">
    <soap:address location="http://ecopack2/gtplan/webServiceDocument/item.php?wsdl"/>
  </port>
</service>
</definitions>
    
06.05.2014 / 14:31