Hi
Can anyone could send a small example how to call a webservices with method
Post
hData := :PostRequest(
"http://192.168.1.6/SIGEHPService.asmx/S ... ent",<?xml version="1.0"
encoding="ISO-8859-1"?><PATIENT_SEARCH>
<INTERNAL_NUMBER>680905F6</INTERNAL_NUMBER></PATIENT_SEARCH > ) )
I supose the sintax is 1º parameter = Url and the second is xth XML right
?
best regards
Pedro Faro
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
tinternet:postrequest
-
- Mensajes: 91
- Registrado: Mié May 30, 2007 5:25 pm
tinternet:postrequest
Pedro,
> I supose the sintax is 1º parameter = Url and the second is xth XML
> right ?
Yes, although the second parameter can be any kind of data. Just send it in
the format expected by the url.
IF you need to know how things gone:
LOCAL hRequest := oInet:PostRequest( ... )
LOCAL cBuffer := Space( 1024 )
LOCAL cData := ""
IF !Empty( hRequest )
WHILE oInet:ReadFile( hRequest, @cBuffer, 1024 )
cData += cBuffer
cBuffer := Space( 1024 )
END
oInet:CloseRequest( hRequest )
ENDIF
I wrote this sample from the top of my head but it should work that way.
Regards,
José Lalín
> I supose the sintax is 1º parameter = Url and the second is xth XML
> right ?
Yes, although the second parameter can be any kind of data. Just send it in
the format expected by the url.
IF you need to know how things gone:
LOCAL hRequest := oInet:PostRequest( ... )
LOCAL cBuffer := Space( 1024 )
LOCAL cData := ""
IF !Empty( hRequest )
WHILE oInet:ReadFile( hRequest, @cBuffer, 1024 )
cData += cBuffer
cBuffer := Space( 1024 )
END
oInet:CloseRequest( hRequest )
ENDIF
I wrote this sample from the top of my head but it should work that way.
Regards,
José Lalín
-
- Mensajes: 91
- Registrado: Mié May 30, 2007 5:25 pm
tinternet:postrequest
Hi Jose
Tanx for you response
The problem is that i need to send a "SOAP" (envelope)message and i think
XAILER can't handle this
the message is like:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns3:denyP1 xmlns:ns3="http://ws.p1.alsc">
<ns3:originInstitutionId>863</ns3:originInstitutionId>
<ns3:p1Code>123792</ns3:p1Code>
<ns3:sendFacility>DEFAULT</ns3:sendFacility>
<ns3:receiveFacility>DEFAULT</ns3:receiveFacility>
<ns3:sendApplication>SHILEIRIA</ns3:sendApplication>
<ns3:receiveApplication>ALERTP1</ns3:receiveApplication>
<ns3:messageXml><P1Row
value="123792" ><P1_CODE>123792</P1_CODE> ;<P1_INSTITUTION>863</P1_INSTITUTION&am p;gt;<P1_REFERENCE_ES>37</P1_REFERENCE_ ES><PATIENT_CODE>187571</PATIENT _CODE><SPECIALITY_CODE>6431</SPE CIALITY_CODE><HEALTH_CARE_UNIT_CODE>113 0900</HEALTH_CARE_UNIT_CODE><PROFESSITI ONAL_ORDER_NUMBER>1607</PROFESSITIONAL_ORDER_N UMBER><PROFESSITIONAL_NAME>IPOP,< ;/PROFESSITIONAL_NAME><SCHEDULE_DATE>&a mp;lt;YEAR>2009</YEAR><MONTH& ;gt;3</MONTH><DAY>16</DAY ><HOUR>9</HOUR><MI NUTE>10</MINUTE><SECOND>0 </SECOND></SCHEDULE_DATE>< ;REFUSAL_CODE>5</REFUSAL_CODE></ P1Row> </ns3:messageXml>
</ns3:denyP1>
</soapenv:Body>
</soapenv:Envelope>
How can i do that ?
Best regards
Pedro Faro
"José Lalín" <notengo@correo.com> escreveu na mensagem
news:48ecb8fb$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
>
> Pedro,
>
>> I supose the sintax is 1º parameter = Url and the second is xth XML
>> right ?
>
> Yes, although the second parameter can be any kind of data. Just send it
> in the format expected by the url.
>
> IF you need to know how things gone:
>
> LOCAL hRequest := oInet:PostRequest( ... )
> LOCAL cBuffer := Space( 1024 )
> LOCAL cData := ""
>
> IF !Empty( hRequest )
> WHILE oInet:ReadFile( hRequest, @cBuffer, 1024 )
> cData += cBuffer
> cBuffer := Space( 1024 )
> END
> oInet:CloseRequest( hRequest )
> ENDIF
>
> I wrote this sample from the top of my head but it should work that way.
>
> Regards,
> José Lalín
>
Tanx for you response
The problem is that i need to send a "SOAP" (envelope)message and i think
XAILER can't handle this
the message is like:
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns3:denyP1 xmlns:ns3="http://ws.p1.alsc">
<ns3:originInstitutionId>863</ns3:originInstitutionId>
<ns3:p1Code>123792</ns3:p1Code>
<ns3:sendFacility>DEFAULT</ns3:sendFacility>
<ns3:receiveFacility>DEFAULT</ns3:receiveFacility>
<ns3:sendApplication>SHILEIRIA</ns3:sendApplication>
<ns3:receiveApplication>ALERTP1</ns3:receiveApplication>
<ns3:messageXml><P1Row
value="123792" ><P1_CODE>123792</P1_CODE> ;<P1_INSTITUTION>863</P1_INSTITUTION&am p;gt;<P1_REFERENCE_ES>37</P1_REFERENCE_ ES><PATIENT_CODE>187571</PATIENT _CODE><SPECIALITY_CODE>6431</SPE CIALITY_CODE><HEALTH_CARE_UNIT_CODE>113 0900</HEALTH_CARE_UNIT_CODE><PROFESSITI ONAL_ORDER_NUMBER>1607</PROFESSITIONAL_ORDER_N UMBER><PROFESSITIONAL_NAME>IPOP,< ;/PROFESSITIONAL_NAME><SCHEDULE_DATE>&a mp;lt;YEAR>2009</YEAR><MONTH& ;gt;3</MONTH><DAY>16</DAY ><HOUR>9</HOUR><MI NUTE>10</MINUTE><SECOND>0 </SECOND></SCHEDULE_DATE>< ;REFUSAL_CODE>5</REFUSAL_CODE></ P1Row> </ns3:messageXml>
</ns3:denyP1>
</soapenv:Body>
</soapenv:Envelope>
How can i do that ?
Best regards
Pedro Faro
"José Lalín" <notengo@correo.com> escreveu na mensagem
news:48ecb8fb$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
>
> Pedro,
>
>> I supose the sintax is 1º parameter = Url and the second is xth XML
>> right ?
>
> Yes, although the second parameter can be any kind of data. Just send it
> in the format expected by the url.
>
> IF you need to know how things gone:
>
> LOCAL hRequest := oInet:PostRequest( ... )
> LOCAL cBuffer := Space( 1024 )
> LOCAL cData := ""
>
> IF !Empty( hRequest )
> WHILE oInet:ReadFile( hRequest, @cBuffer, 1024 )
> cData += cBuffer
> cBuffer := Space( 1024 )
> END
> oInet:CloseRequest( hRequest )
> ENDIF
>
> I wrote this sample from the top of my head but it should work that way.
>
> Regards,
> José Lalín
>
tinternet:postrequest
Pedro,
> The problem is that i need to send a "SOAP" (envelope)message and i
> think XAILER can't handle this
Never used SOAP with Xailer so I can't help on this, sorry.
BTW, in local.olivares2000.xbase forum there are some messages from Rafa
explaining how to use SOAP. Maybe they are usefull for you.
Regards,
José Lalín
> The problem is that i need to send a "SOAP" (envelope)message and i
> think XAILER can't handle this
Never used SOAP with Xailer so I can't help on this, sorry.
BTW, in local.olivares2000.xbase forum there are some messages from Rafa
explaining how to use SOAP. Maybe they are usefull for you.
Regards,
José Lalín