PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - HendersonS

Pages: [1] 2 3 ... 5
Web Services / Re: Posting a File to a Web Service
« on: May 25, 2024, 03:15:43 PM »
Jeff and St├ęphane, thank you for your help, I was finally able to find the solution with the help you gave me.

the line looked like this:
Content-Disposition: form-data; name="xml"; filename="xmlsing.xml"

Web Services / Re: Posting a File to a Web Service
« on: May 24, 2024, 05:01:04 PM »

I tested both ways that you showed me and I still get the same "invalid file" response, I will continue trying...

Web Services / Re: Posting a File to a Web Service
« on: May 24, 2024, 04:23:52 PM »
jeff, this is what it returns:

1>print mid(body$,1,300)
Content-Disposition: form-data; name="xmlsing"; filename="xmlsing.xml"
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<SemillaModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="h

Web Services / Re: Posting a File to a Web Service
« on: May 24, 2024, 03:58:55 PM »
Jeff thanks for your help,

I have something very similar to what you showed, I also added Stephane's program to calculate the boundaries but when I send it with pxplus the API returns an "invalid file" error, I tried it with CURL and the api receives the file correctly, does it work? How could I replicate it? in Pxplus?

Example with CURL:
Code: [Select]
curl -X 'POST' \
  'https://url/api' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'xml=@xmldata.xml;type=text/xml'

Web Services / Re: Posting a File to a Web Service
« on: May 24, 2024, 02:36:43 PM »
Hi Jeff, I'm stuck in the same place trying to send a file via API, could you post the final solution? Maybe it can help me too!

Programming / Re: *web\request
« on: April 01, 2024, 09:57:37 PM »
Jeffrey Ferreira,
I'm working on something similar, how did you create the boundary?

Programming / Re: Sign XML Documents with Digital Signatures
« on: February 23, 2024, 12:43:19 PM »
Loren, thanks for your demonstration,

so far I have not been able to install xmlsec on Windows, and I have not been able to find a solution with pxplus either, so I will have to make some program in C# or another language to invoke it from pxplus, since I do not see a solution with pxplus.

Programming / Re: Sign XML Documents with Digital Signatures
« on: February 20, 2024, 04:47:02 PM »
Thanks Mike for your instructions.

If I understood correctly, you mean that I can invoke this tool from pxplus? And just in case I take another route to do it with pxplus, is there any utility to extract the private key from a .pem?

Programming / Re: Sign XML Documents with Digital Signatures
« on: February 19, 2024, 08:23:19 PM »
Loren thanks for yor reply

Below is the structure that the signature node should have within the xml, I have no experience in building these signatures. Maybe you can show me some example code to do it.

Code: [Select]
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/RECxml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsigmore#rsa-sha256" />
<Reference URI="">
 <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#envelope d-signature" />
 <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />

Programming / Sign XML Documents with Digital Signatures
« on: February 18, 2024, 04:05:16 PM »
Hello everyone,
recently we are working on web services that use digitally signed xml files for validation, these xml files must be signed with digital certificates (.P12 files), does anyone have experience doing this? Or can you guide us how to do this in Pvx Plus? Any idea is welcome, thank you very much in advance.

Below is some example code in VB.NET. Any idea how we can replicate it in pxplus?

Code: [Select]
''' <summary>
 ''' Method for signing XML with digital certificate (*.p12)
 ''' </summary>
 ''' <param name="xmlDoc"> document to sign </param>
 ''' <param name="pathCert">location of certificate to use for signing </param>
 ''' <param name="passCert">digital certificate password</param>
 ''' <returns>Digitally signed XML</returns>
 Private Function Signed (ByVal xmlDoc As XmlDocument, ByVal pathCert As String, ByVal
passCert As String) As XmlDocument
 If Not File.Exists(pathCert) Then Throw New Exception("The signing certificate does not exist")
 Dim cert = New X509Certificate2(pathCert, passCert, X509KeyStorageFlags.Exportable)
 Dim exportedKeyMaterial = cert.PrivateKey.ToXmlString(True)
 Dim key = New RSACryptoServiceProvider(New CspParameters(24))
 key.PersistKeyInCsp = False
 Dim signedXml As SignedXml = New SignedXml(xmlDoc)
  signedXml.SigningKey = key
  signedXml.SignedInfo.SignatureMethod =
  Dim reference As Reference = New Reference()
  reference.AddTransform(New XmlDsigEnvelopedSignatureTransform())
  reference.DigestMethod = "http://www.w3.org/2001/04/xmlenc#sha256"
  reference.Uri = ""
  Dim keyInfo As KeyInfo = New KeyInfo()
  keyInfo.AddClause(New KeyInfoX509Data(cert))
  signedXml.KeyInfo = keyInfo
  Dim xmlDigitalSignature As XmlElement = signedXml.GetXml()
  xmlDoc.DocumentElement.AppendChild(xmlDoc.ImportNode(xmlDigitalSignature, True))
  Return xmlDoc
  Catch ex As Exception
  Throw ex
  End Try
 End Function

ODBC / Re: ODBC Views Issue
« on: May 02, 2023, 07:46:30 AM »
devon, Thanks for your answer, I was able to get it working.

ODBC / Re: ODBC Views Issue
« on: April 28, 2023, 11:41:39 AM »
hi devon,

If I have the sql odbc driver installed as a client, in the options tab I can include an address of a network shared folder, for example: \\\PXPlus19\Pxplus, this being the directory where the pvxwin32.dll is located? With that configuration, would it show the views?

ODBC / Re: ODBC Views Issue
« on: April 26, 2023, 11:42:49 AM »
thanks, i'll check it out

ODBC / Re: ODBC Views Issue
« on: April 26, 2023, 08:33:33 AM »
Hi devon,

 thanks for your answer, we did that setup, in fact we have other views that work without errors, but this one has that error.

ODBC / ODBC Views Issue
« on: April 25, 2023, 07:52:48 PM »
hello All,

we are trying to query data from a view in excel and we are getting this error (attached in the screenshot).

The thing is that when we try the query from Excel to the same file from which the view was created, we can access the data.

What could be happening?

we are using a Pxplus Sql ODBC Driver Version 7 and Pxplus Version 19.1

Pages: [1] 2 3 ... 5