cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Integrity Webservice via Powershell

dhegland
1-Newbie

Integrity Webservice via Powershell

Has anyone attempted webservices via powershell?

We're familiar with PTC Integrity webservices via soapui and java.

Powershell is proving a challenge.

Here's a code sample:

$mksws = New-WebServiceProxy -Uri "MYSERVER/webservices/10/2/Integrity/?wsdl"

$ns = $mksws.GetType().NameSpace

$pr = New-Object ($ns + ".ProjectRequest")

$pr.transactionId = "?"

$pr.FieldList = "Name"

$pr.Username = "xxxxx"

$pr.Password = "xxxxx"

$pr.ImpersonatedUser = $null

$pr.DateFormat = $null

$pr.DateTimeFormat = $null

$gp = New-Object($ns + ".getProjects")

$gp.arg0 = $pr

#$response = New-Object($ns + ".getProjectsResponse")

$response = $mksws.getProjects($gp)

Returns this wrapped in html

PTC Integrity Server - Error report

  The server encountered an internal error () that prevented it from fulfilling this request.

Server log shows this

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/webservices/10/2/Integrity].[Integrity_10_2]] Cannot find message associated with key standardWrapper.acknowledgeException
java.lang.IllegalArgumentException: You can only write using the application write buffer provided by the handler.
at org.apache.tomcat.util.net.SecureNioChannel.write(SecureNioChannel.java:381)
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:53)

...

1 REPLY 1
KaelLizak
14-Alexandrite
(To:dhegland)

Hello David Hegland‌,

I suspect your best course here would be to open a case with PTC Integrity Support to investigate that server exception.

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
Top Tags