26 Jul 2019 13:44
26 Jul 2019 13:58
26 Jul 2019 14:08
01 Ago 2019 22:43
01 Ago 2019 23:15
03 Ago 2019 07:07
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project id="1bcfb632-35f9-48cd-ad67-48bb533f13de" activeEnvironment="Default" name="Integração Fornecedor - HOMOLOGAÇÃO" resourceRoot="" soapui-version="5.2.0" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" id="5403d6bb-cfd2-40ea-ba6f-efe83186f396" wsaVersion="NONE" name="IWSFornecedorCotacaoPortBinding" type="wsdl" bindingName="{http://cotacao.fornecedores.client.webService.apoio.com.br/}IWSFornecedorCotacaoPortBinding" soapVersion="1_1" anonymous="optional" definition="http://homologacao.apoiocotacoes.com.br/app/fornecedores/WSFornecedores?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://homologacao.apoiocotacoes.com.br/app/fornecedores/WSFornecedores?wsdl"><con:part><con:url>http://homologacao.apoiocotacoes.com.br/app/fornecedores/WSFornecedores?wsdl</con:url><con:content><![CDATA[<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.3-b01-.-->
<!--Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.3-b01-.-->
<definitions targetNamespace="http://cotacao.fornecedores.client.webService.apoio.com.br/" name="WSFornecedorCotacaoService" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://cotacao.fornecedores.client.webService.apoio.com.br/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types/>
<message name="post">
<part name="arg0" type="xsd:string"/>
<part name="arg1" type="xsd:string"/>
<part name="arg2" type="xsd:string"/>
<part name="arg3" type="xsd:string"/>
<part name="arg4" type="xsd:string"/>
</message>
<message name="postResponse">
<part name="return" type="xsd:string"/>
</message>
<message name="request">
<part name="arg0" type="xsd:string"/>
<part name="arg1" type="xsd:string"/>
<part name="arg2" type="xsd:string"/>
<part name="arg3" type="xsd:string"/>
</message>
<message name="requestResponse">
<part name="return" type="xsd:string"/>
</message>
<portType name="IWSFornecedorCotacao">
<operation name="post" parameterOrder="arg0 arg1 arg2 arg3 arg4">
<input wsam:Action="http://cotacao.fornecedores.client.webService.apoio.com.br/IWSFornecedorCotacao/postRequest" message="tns:post"/>
<output wsam:Action="http://cotacao.fornecedores.client.webService.apoio.com.br/IWSFornecedorCotacao/postResponse" message="tns:postResponse"/>
</operation>
<operation name="request" parameterOrder="arg0 arg1 arg2 arg3">
<input wsam:Action="http://cotacao.fornecedores.client.webService.apoio.com.br/IWSFornecedorCotacao/requestRequest" message="tns:request"/>
<output wsam:Action="http://cotacao.fornecedores.client.webService.apoio.com.br/IWSFornecedorCotacao/requestResponse" message="tns:requestResponse"/>
</operation>
</portType>
<binding name="IWSFornecedorCotacaoPortBinding" type="tns:IWSFornecedorCotacao">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
<operation name="post">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal" namespace="http://cotacao.fornecedores.client.webService.apoio.com.br/"/>
</input>
<output>
<soap:body use="literal" namespace="http://cotacao.fornecedores.client.webService.apoio.com.br/"/>
</output>
</operation>
<operation name="request">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal" namespace="http://cotacao.fornecedores.client.webService.apoio.com.br/"/>
</input>
<output>
<soap:body use="literal" namespace="http://cotacao.fornecedores.client.webService.apoio.com.br/"/>
</output>
</operation>
</binding>
<service name="WSFornecedorCotacaoService">
<port name="IWSFornecedorCotacaoPort" binding="tns:IWSFornecedorCotacaoPortBinding">
<soap:address location="http://homologacao.apoiocotacoes.com.br:80/app/fornecedores/WSFornecedores"/>
</port>
</service>
</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://homologacao.apoiocotacoes.com.br:80/app/fornecedores/WSFornecedores</con:endpoint></con:endpoints><con:operation id="8280406c-b58f-4215-ba01-37658633a58f" isOneWay="false" action="" name="post" bindingOperationName="post" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="bbd6ec41-c699-45df-9ebf-95822afd968a" name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://homologacao.apoiocotacoes.com.br:80/app/fornecedores/WSFornecedores</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cot="http://cotacao.fornecedores.client.webService.apoio.com.br/">
<soapenv:Header/>
<soapenv:Body>
<cot:post>
<arg0>?</arg0>
<arg1>?</arg1>
<arg2>?</arg2>
<arg3>?</arg3>
<arg4>?</arg4>
</cot:post>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://cotacao.fornecedores.client.webService.apoio.com.br/IWSFornecedorCotacao/postRequest"/></con:call></con:operation><con:operation id="c73e15e7-2a6d-43ab-b5a5-731389cb4db0" isOneWay="false" action="" name="request" bindingOperationName="request" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call id="3cf63423-9243-4f8f-ae8b-b02dbc99e126" name="Buscar Cotação por ID"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://homologacao.apoiocotacoes.com.br:80/app/fornecedores/WSFornecedores</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cot="http://cotacao.fornecedores.client.webService.apoio.com.br/">
<soapenv:Header/>
<soapenv:Body>
<cot:request>
<arg0>?</arg0>
<arg1>?</arg1>
<arg2>?</arg2>
<arg3>?</arg3>
</cot:request>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://cotacao.fornecedores.client.webService.apoio.com.br/IWSFornecedorCotacao/requestRequest"/><con:wsrmConfig version="1.2"/></con:call><con:call id="65e01ac6-ed05-45e7-8e8f-425cb80a50c3" name="Buscar Cotação por DT_BEGIN"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://homologacao.apoiocotacoes.com.br:80/app/fornecedores/WSFornecedores</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cot="http://cotacao.fornecedores.client.webService.apoio.com.br/">
<soapenv:Header/>
<soapenv:Body>
<cot:request>
<arg0>cfernandesws</arg0>
<arg1>qetuo</arg1>
<arg2>WGG</arg2>
<arg3>1234</arg3>
</cot:request>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://cotacao.fornecedores.client.webService.apoio.com.br/IWSFornecedorCotacao/requestRequest"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/><con:oAuth2ProfileContainer/><con:sensitiveInformation/></con:soapui-project>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cot="http://cotacao.fornecedores.client.webservice.apoio.com.br/">
<soapenv:Header/>
<soapenv:Body>
<cot:request>
<usuario>USUARIO</usuario>
<senha>SENHA</senha>
<operacao>WGG</operacao>
<parametros>DT_BEGIN=02/08/2019 17:18:56;DT_END=02/08/2019 17:28:56;LAYOUT=WG;ISO=0</parametros>
</cot:request>
</soapenv:Body>
</soapenv:Envelope>
03 Ago 2019 07:38
gilbertosilverio escreveu:Achei bem didático tua postagem, fácil de entender, mais onde eu enrosco e em saber qual o endereço que devo enviar.
03 Ago 2019 07:43
04 Ago 2019 10:13
04 Ago 2019 10:56
04 Ago 2019 11:04
04 Ago 2019 11:10
06 Ago 2019 09:30
FUNCTION EnviaSOAP()
LOCAL oServer, cXmlEnvio, cRetorno, cUrl, cHost
PRIVATE cXml :="C:\NFE\cXML.XML"
PRIVATE ArquivoXml:="C:\NFE\TESTASOAP.XML"
if hwg_msgyesno([Enviar]) = .t.
cUrl := "http://homologacao.apoiocotacoes.com.br/app/fornecedores/WSFornecedores?wsdl"
cHost := "http://cotacao.fornecedores.client.webService.apoio.com.br"
cXmlEnvio :=[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cot="http://cotacao.fornecedores.client.webService.apoio.com.br/">]
cXmlEnvio += [<soapenv:Header/>]
cXmlEnvio += [<soapenv:Body>]
cXmlEnvio += [<cot:request>]
cXmlEnvio += [<usuario>USUARIO</usuario>]
cXmlEnvio += [<senha>SENHA</senha>]
cXmlEnvio += [<operacao>WGG</operacao>]
cXmlEnvio += [<parametros>DT_BEGIN=06/08/2019 07:50:00;DT_END=06/08/2019 07:59:00;LAYOUT=WG;ISO=0</parametros>]
cXmlEnvio += [</cot:request>]
cXmlEnvio += [</soapenv:Body>]
cXmlEnvio +=[</soapenv:Envelope>]
Hb_MemoWrit( cXML, cXmlEnvio)
//HWG_MSGINFO(STR(LEN(cXmlEnvio)))
oServer := win_OleCreateObject( "MSXML2.ServerXMLHTTP.6.0" )
oServer:Open( "POST", cUrl, .F. )
//oServer:SetRequestHeader( "Accept-Encoding", [gzip,deflate] )
oServer:SetRequestHeader( "Content-Type", [text/xml;charset=UTF-8])
//oServer:SetRequestHeader( "SOAPAction", [request] )
oServer:SetRequestHeader( "Content-Length", [407] )
//oServer:SetRequestHeader( "Host:", cHost )
oServer:SetRequestHeader( "Connection", [Keep-Alive])
oServer:SetRequestHeader( "User-Agent", [Apache-HttpClient/4.1.1 (java 1.5)])
oServer:send( cXmlEnvio )
oServer:WaitForResponse( 1000 )
cRetorno := oServer:responseText
//HWG_MSGINFO(STR(LEN(cRetorno)))
IF ValType( cRetorno ) != "C"
cRetorno := ""
ELSE
Hb_MemoWrit( ArquivoXml, cRETORNO)
ENDIF
ENDIF
RETURN
06 Ago 2019 09:49
gilbertosilverio escreveu:Detalhe, o SoapUI, mostra o uso de SOAPAction e Host, mais so consegui fazer a comunicação tirando estas duas linhas, creio que e por que no ENVELOPE, ja consta.
03 Set 2019 08:01
Error WINOLE/1007 O tempo limite da operação foi atingido
(0x80072EE2): msxml6.dll (DOS Error -2147352567)
Called from ->WIN_OLEAUTO:SEND(0)
Called from ->ENVIA_WH(1854)
Called from ->RESPONDE_WHS_COTACAO(1665)
Hb_MemoWrit( cXML, cXmlEnvio)
oServer := win_OleCreateObject( "MSXML2.ServerXMLHTTP.6.0" )
oServer:Open( "POST", cUrl, .F. )
oServer:SetRequestHeader( "Content-Type", [text/xml;charset=UTF-8])
oServer:SetRequestHeader( "Content-Length", [407] )
oServer:SetRequestHeader( "Transfer-encoding", [chunked])
oServer:SetRequestHeader( "Connection", [Keep-Alive])
oServer:SetRequestHeader( "User-Agent", [Apache-HttpClient/4.1.1 (java 1.5)])
oServer:send( cXmlEnvio )
oServer:WaitForResponse( 1000 )
cRetorno := oServer:responseText