NUSOAP - WSDL STYLE DOCUMENT/LITERAL

Asked

Viewed 480 times

0

Currently I have 2 webservices running in hospitals that work perfectly with STYLE RPC/ENCODED but we will implement in a software for a factory and there they have problem to consume this type of service.

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

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

Also after much research I found this topic: http://www.ibm.com/developerworks/library/ws-whichwsdl/#listing6

which shows a WSDL structure with DOCUMENT/LITERAL style and the difference for my structured today is that I can’t encapsulate the element the way it’s 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 create complexType and reference in the element more or less 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 say if it is disturbing the reading of the same.

Sorry I can’t post the original WSDL.

1 answer

1

The people who did not want to release there as 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>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.