Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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)
...
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